Wednesday, September 25, 2024
Google search engine
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 Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments