Friday, February 6, 2026
HomeLanguagessympy.stats.ShiftedGompertz() in Python

sympy.stats.ShiftedGompertz() in Python

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

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

Most Popular

Dominic
32491 POSTS0 COMMENTS
Milvus
126 POSTS0 COMMENTS
Nango Kala
6862 POSTS0 COMMENTS
Nicole Veronica
11986 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12075 POSTS0 COMMENTS
Shaida Kate Naidoo
6995 POSTS0 COMMENTS
Ted Musemwa
7236 POSTS0 COMMENTS
Thapelo Manthata
6947 POSTS0 COMMENTS
Umr Jansen
6932 POSTS0 COMMENTS