sympy.stats.Benini() in Python
Last Updated :
18 Aug, 2021
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.
Python3
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" )
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 :
Python3
from sympy.stats import Benini, density, cdf
from sympy import Symbol, simplify, pprint
alpha = 4
beta = 6
sigma = 3
z = 0.2
X = Benini( "x" , alpha, beta, sigma)
GFG = density(X)(z)
pprint(GFG, use_unicode = False )
|
Output :
-5.60587100451865e-13
Share your thoughts in the comments
Please Login to comment...