Thursday, January 29, 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
32475 POSTS0 COMMENTS
Milvus
122 POSTS0 COMMENTS
Nango Kala
6848 POSTS0 COMMENTS
Nicole Veronica
11978 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12065 POSTS0 COMMENTS
Shaida Kate Naidoo
6986 POSTS0 COMMENTS
Ted Musemwa
7221 POSTS0 COMMENTS
Thapelo Manthata
6934 POSTS0 COMMENTS
Umr Jansen
6916 POSTS0 COMMENTS