Tuesday, February 3, 2026
HomeLanguagessympy.stats.Gompertz() in python

sympy.stats.Gompertz() in python

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.




# Import sympy and Gompertz
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")
  
# Using sympy.stats.Gompertz() method
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 :




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


Output :

4
8 -4*e
8*e *e

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

Most Popular

Dominic
32478 POSTS0 COMMENTS
Milvus
124 POSTS0 COMMENTS
Nango Kala
6849 POSTS0 COMMENTS
Nicole Veronica
11980 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12066 POSTS0 COMMENTS
Shaida Kate Naidoo
6987 POSTS0 COMMENTS
Ted Musemwa
7222 POSTS0 COMMENTS
Thapelo Manthata
6935 POSTS0 COMMENTS
Umr Jansen
6919 POSTS0 COMMENTS