With the help of sympy.stats.ExGaussian()
method, we can get the continuous random variable representing the exponentially modified gaussian distribution.
Syntax :
sympy.stats.ExGaussian(name, mean, std, rate)
Return : Return continuous random variable.
Example #1 :
In this example we can see that by using sympy.stats.ExGaussian()
method, we are able to get the continuous random variable which represents the Exponentially modified Gaussian distribution by using this method.
# Import sympy and ExGaussian from sympy.stats import ExGaussian, density
from sympy import Symbol
mean = Symbol( "mean" , integer = True , positive = True )
std = Symbol( "std" , integer = True , positive = True )
rate = Symbol( "rate" , integer = True , positive = True )
z = Symbol( "z" )
# Using sympy.stats.ExGaussian() method X = ExGaussian( "x" , mean, std, rate)
gfg = density(X)(z)
pprint(gfg) |
Output :
/ 2 \
rate*\2*mean + rate*std – 2*z/
——————————- / ___ / 2 \\
2 |\/ 2 *\mean + rate*std – z/|
rate*e *erfc|—————————-|
\ 2*std /
————————————————————————
2
Example #2 :
# Import sympy and ExGaussian from sympy.stats import ExGaussian, density
from sympy import Symbol
mean = 22
std = 21
rate = 7
z = 0.4
# Using sympy.stats.ExGaussian() method X = ExGaussian( "x" , mean, std, rate)
gfg = density(X)(z)
pprint(gfg) |
Output :
/ ___\
3.50044639861837e+4758*erfc\74.0142857142857*\/ 2 /