With the help of sympy.stats.Benini() method, we can get the continuous random variable representing the benini distribution.
Syntax : sympy.stats.Benini(name, alpha, beta, sigma)
Where, alpha, beta and sigma are real number and greater than 0.Return : Return the continuous random variable.
Example #1 :
In this example, we can see that by using sympy.stats.Benini() method, we are able to get the continuous random variable represents the benini distribution by using this method.
# Import sympy and Benini from sympy.stats import Benini, density, cdf
from sympy import Symbol, simplify, pprint
alpha = Symbol( "alpha" , positive = True )
beta = Symbol( "beta" , positive = True )
sigma = Symbol( "sigma" , positive = True )
z = Symbol( "z" )
# Using sympy.stats.Benini() method X = Benini( "x" , alpha, beta, sigma)
GFG = density(X)(z)
pprint(GFG, use_unicode = False )
|
Output :
/ / z \\ / z \ 2/ z \
| 2*beta*log|—–|| – alpha*log|—–| – beta*log |—–|
|alpha \sigma/| \sigma/ \sigma/
|—– + —————–|*e
\ z z /
Example #2 :
# Import sympy and Benini from sympy.stats import Benini, density, cdf
from sympy import Symbol, simplify, pprint
alpha = 4
beta = 6
sigma = 3
z = 0.2
# Using sympy.stats.Benini() method X = Benini( "x" , alpha, beta, sigma)
GFG = density(X)(z)
pprint(GFG, use_unicode = False )
|
Output :
-5.60587100451865e-13