Related Articles

# sympy.stats.LogLogistic() in python

• Last Updated : 05 Jun, 2020

With the help of sympy.stats.LogLogistic() method, we can get the continuous random variable which represents the Log-Logistic distribution.

Syntax : sympy.stats.LogLogistic(name, alpha, beta)
Where, alpha and beta are real number and alpha, beta > 0.
Return : Return the continuous random variable.

Example #1 :
In this example we can see that by using sympy.stats.LogLogistic() method, we are able to get the continuous random variable representing Log-Logistic distribution by using this method.

 # Import sympy and LogLogisticfrom sympy.stats import LogLogistic, densityfrom sympy import Symbol, pprint  z = Symbol("z")alpha = Symbol("alpha", positive = True)beta = Symbol("beta", positive = True)  # Using sympy.stats.LogLogistic() methodX = LogLogistic("x", alpha, beta)gfg = density(X)(z)  pprint(gfg)

Output :

beta – 1
/ z \
beta*|—–|
\alpha/
————————
2
/ beta \
|/ z \ |
alpha*||—–| + 1|
\\alpha/ /

Example #2 :

 # Import sympy and LogLogisticfrom sympy.stats import LogLogistic, densityfrom sympy import Symbol, pprint  z = 1.2alpha = 2beta = 3  # Using sympy.stats.LogLogistic() methodX = LogLogistic("x", alpha, beta)gfg = density(X)(z)  pprint(gfg)

Output :

0.365196502770083

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

My Personal Notes arrow_drop_up