sympy.stats.Frechet() in python
Last Updated :
05 Jun, 2020
With the help of sympy.stats.Frechet()
method, we can get the continuous random variable representing the frechet distribution.
Syntax : sympy.stats.Frechet(name, a, s=1, m=0)
Where, a, s and m denotes the real number.
Return : Return continuous random variable.
Example #1 :
In this example we can see that by using sympy.stats.Frechet()
method, we are able to get the continuous random variable which represents the Frechet distribution by using this method.
from sympy.stats import Frechet, density
from sympy import Symbol
a = Symbol( "a" , integer = True , positive = True )
s = Symbol( "s" , integer = True , positive = True )
m = Symbol( "m" , integer = True , positive = True )
z = Symbol( "z" )
X = Frechet( "x" , a, s, m)
gfg = density(X)(z)
pprint(gfg)
|
Output :
-a
/-m + z\
-a – 1 -|——|
/-m + z\ \ s /
a*|——| *e
\ s /
—————————–
s
Example #2 :
from sympy.stats import Frechet, density
from sympy import Symbol
a = 3
s = 1
m = - 2
z = Symbol( "z" )
X = Frechet( "x" , a, s, m)
gfg = density(X)(z)
pprint(gfg)
|
Output :
-1
——–
3
(z + 2)
3*e
———–
4
(z + 2)
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...