Open In App

sympy.stats.ShiftedGompertz() in Python

Improve
Improve
Like Article
Like
Save
Share
Report

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

Syntax : sympy.stats.ShiftedGompertz(name, b, eta)
Where, b and eta are real number and b, eta > 0.

Return : Return the continuous random variable.

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




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


Output :

-b*z
/ / -b*z\ \ -b*z -eta*e
b*\eta*\1 – e / + 1/*e *e

Example #2 :




# Import sympy and ShiftedGompertz
from sympy.stats import ShiftedGompertz, density
from sympy import Symbol, pprint
  
z = 1.1
b = 2
eta = 3
  
# Using sympy.stats.ShiftedGompertz() method
X = ShiftedGompertz("x", b, eta)
gfg = density(X)(z)
  
pprint(gfg)


Output :

0.582907142397210



Last Updated : 08 Jun, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads