Friday, September 5, 2025
HomeLanguagessympy.stats.Weibull() in Python

sympy.stats.Weibull() in Python

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

Syntax : sympy.stats.Weibull(name, alpha, beta)
Where, alpha and beta are real number.

Return : Return the continuous random variable.

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




# Import sympy and Weibull
from sympy.stats import Weibull, density
from sympy import Symbol, pprint
  
z = Symbol("z")
a = Symbol("a", positive = True)
l = Symbol("l", positive = True)
  
# Using sympy.stats.Weibull() method
X = Weibull("x", a, l)
gfg = density(X)(z)
  
pprint(gfg)


Output :

l
/z\
l – 1 -|-|
/z\ \a/
l*|-| *e
\a/
—————–
a

Example #2 :




# Import sympy and Weibull
from sympy.stats import Weibull, density
from sympy import Symbol, pprint
  
z = 2
a = 3
l = 4
  
# Using sympy.stats.Weibull() method
X = Weibull("x", a, l)
gfg = density(X)(z)
  
pprint(gfg)


Output :

-16
—-
81
32*e
——–
81

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

Most Popular

Dominic
32267 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6635 POSTS0 COMMENTS
Nicole Veronica
11801 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11865 POSTS0 COMMENTS
Shaida Kate Naidoo
6752 POSTS0 COMMENTS
Ted Musemwa
7026 POSTS0 COMMENTS
Thapelo Manthata
6703 POSTS0 COMMENTS
Umr Jansen
6720 POSTS0 COMMENTS