Friday, November 21, 2025
HomeLanguagessympy.stats.Pareto() in python

sympy.stats.Pareto() in python

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

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

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




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


Output :

alpha -alpha – 1
alpha*xm *z

Example #2 :




# Import sympy and Pareto
from sympy.stats import Pareto, density
from sympy import Symbol, pprint
  
z = 2.1
xm = 1
alpha = 2.4
  
# Using sympy.stats.Pareto() method
X = Pareto("x", xm, alpha)
gfg = density(X)(z)
  
pprint(gfg)


Output :

0.192604149590925

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

Most Popular

Dominic
32405 POSTS0 COMMENTS
Milvus
97 POSTS0 COMMENTS
Nango Kala
6781 POSTS0 COMMENTS
Nicole Veronica
11928 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11997 POSTS0 COMMENTS
Shaida Kate Naidoo
6907 POSTS0 COMMENTS
Ted Musemwa
7166 POSTS0 COMMENTS
Thapelo Manthata
6862 POSTS0 COMMENTS
Umr Jansen
6847 POSTS0 COMMENTS