Friday, September 5, 2025
HomeLanguagessympy.stats.LogLogistic() in python

sympy.stats.LogLogistic() in python

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 LogLogistic
from sympy.stats import LogLogistic, density
from sympy import Symbol, pprint
  
z = Symbol("z")
alpha = Symbol("alpha", positive = True)
beta = Symbol("beta", positive = True)
  
# Using sympy.stats.LogLogistic() method
X = 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 LogLogistic
from sympy.stats import LogLogistic, density
from sympy import Symbol, pprint
  
z = 1.2
alpha = 2
beta = 3
  
# Using sympy.stats.LogLogistic() method
X = LogLogistic("x", alpha, beta)
gfg = density(X)(z)
  
pprint(gfg)


Output :

0.365196502770083

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32265 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6634 POSTS0 COMMENTS
Nicole Veronica
11801 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11864 POSTS0 COMMENTS
Shaida Kate Naidoo
6752 POSTS0 COMMENTS
Ted Musemwa
7025 POSTS0 COMMENTS
Thapelo Manthata
6703 POSTS0 COMMENTS
Umr Jansen
6718 POSTS0 COMMENTS