Open In App

sympy.stats.Logistic() in python

Last Updated : 05 Jun, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
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. Python3 1=1
# 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 : Python3 1=1
# 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

Next Article
Practice Tags :

Similar Reads