sympy.stats.Gumbel() in python
Last Updated :
05 Jun, 2020
With the help of sympy.stats.Gumbel()
method, we can get the continuous random variable which represents the gumbel distribution.
Syntax : sympy.stats.Gumbel(name, beta, mu, minimum=False)
Where, If we set minimum is True than we can enable minimum distribution.
Return : Return the continuous random variable.
Example #1 :
In this example we can see that by using sympy.stats.Gumbel()
method, we are able to get the continuous random variable representing gumbel distribution by using this method.
from sympy.stats import Gumbel, density
from sympy import Symbol, pprint
z = Symbol( "z" )
mu = Symbol( "mu" )
beta = Symbol( "beta" , positive = True )
X = Gumbel( "x" , beta, mu)
gfg = density(X)(z)
pprint(gfg)
|
Output :
-(-mu + z)
———–
beta -mu + z
– e – ——-
beta
e
————————-
beta
Example #2 :
from sympy.stats import Gumbel, density
from sympy import Symbol, pprint
z = 0.4
mu = 2
beta = 4
X = Gumbel( "x" , beta, mu)
gfg = density(X)(z)
pprint(gfg)
|
Output :
0.0839008899108612
Share your thoughts in the comments
Please Login to comment...