Con la ayuda del sympy.stats.StudentT()
método, podemos obtener la variable aleatoria continua que representa la distribución t de Student.
Sintaxis:
sympy.stats.StudentT(name, nu)
Donde, nu es un número real y nu > 0.
Retorno: Retorna la variable aleatoria continua.
Ejemplo #1:
En este ejemplo, podemos ver que al usar sympy.stats.StudentT()
el método, podemos obtener la variable aleatoria continua que representa la distribución T de Student al usar este método.
# Import sympy and StudentT from sympy.stats import StudentT, density from sympy import Symbol, pprint z = Symbol("z") nu = Symbol("nu", positive = True) # Using sympy.stats.StudentT() method X = StudentT("x", nu) gfg = density(X)(z) pprint(gfg)
Producción :
nu 1
– — – –
2 2
/ 2\
| z |
|1 + –|
\ nu/
—————–
____ / nu\
\/ nu *B|1/2, –|
\ 2 /
Ejemplo #2:
# Import sympy and StudentT from sympy.stats import StudentT, density from sympy import Symbol, pprint z = 0.46 nu = 2 # Using sympy.stats.StudentT() method X = StudentT("x", nu) gfg = density(X)(z) pprint(gfg)
Producción :
___
0.214993401181957*\/ 2
Publicación traducida automáticamente
Artículo escrito por Jitender_1998 y traducido por Barcelona Geeks. The original can be accessed here. Licence: CCBY-SA