sympy.stats.Gompertz() in python
Last Updated :
05 Jun, 2020
With the help of sympy.stats.Gompertz()
method, we can get the continuous random variable representing the Gompertz distribution.
Syntax : sympy.stats.Gompertz(name, b, eta)
Where, b and eta denotes the real number.
Return : Return continuous random variable.
Example #1 :
In this example we can see that by using sympy.stats.Gompertz()
method, we are able to get the continuous random variable which represents the Gompertz distribution by using this method.
from sympy.stats import Gompertz, density
from sympy import Symbol
b = Symbol( "b" , integer = True , positive = True )
eta = Symbol( "eta" , integer = True , positive = True )
z = Symbol( "z" )
X = Gompertz( "x" , b, eta)
gfg = density(X)(z)
pprint(gfg)
|
Output :
b*z
eta b*z -eta*e
b*eta*e *e *e
Example #2 :
from sympy.stats import Gompertz, density
from sympy import Symbol
b = 2
eta = 4
z = 2
X = Gompertz( "x" , b, eta)
gfg = density(X)(z)
pprint(gfg)
|
Output :
4
8 -4*e
8*e *e
Share your thoughts in the comments
Please Login to comment...