sympy.stats.Logistic() in python
Last Updated :
05 Jun, 2020
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.
from sympy.stats import Logistic, density
from sympy import Symbol, pprint
z = Symbol( "z" )
mu = Symbol( "mu" , positive = True )
s = Symbol( "s" , positive = True )
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 :
from sympy.stats import Logistic, density
from sympy import Symbol, pprint
z = 0.3
mu = 5
s = 1.3
X = Logistic( "x" , mu, s)
gfg = density(X)(z)
pprint(gfg)
|
Output :
0.0196269669241977
Share your thoughts in the comments
Please Login to comment...