sympy.stats.Logistic() in python
With the help of sympy.stats.Logistic()
method, we can get the continuous random variable which represents the logistic distribution.
Syntax :
sympy.stats.Logistic(name, mu, s)
Where, mu and s are real number and mu, s > 0.
Return : Return the continuous random variable.
Example #1 :
In this example we can see that by using sympy.stats.Logistic()
method, we are able to get the continuous random variable representing logistic distribution by using this method.
# Import sympy and Logistic from sympy.stats import Logistic, density from sympy import Symbol, pprint z = Symbol( "z" ) mu = Symbol( "mu" , positive = True ) s = Symbol( "s" , positive = True ) # Using sympy.stats.Logistic() method X = Logistic( "x" , mu, s) gfg = density(X)(z) pprint(gfg) |
Output :
mu – z
——
s
e
—————-
2
/ mu – z \
| —— |
| s |
s*\e + 1/
Example #2 :
# Import sympy and Logistic from sympy.stats import Logistic, density from sympy import Symbol, pprint z = 0.3 mu = 5 s = 1.3 # Using sympy.stats.Logistic() method X = Logistic( "x" , mu, s) gfg = density(X)(z) pprint(gfg) |
Output :
0.0196269669241977
Contact Us