Monday, October 6, 2025
HomeLanguagessympy.stats.Benini() in Python

sympy.stats.Benini() in Python

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




# 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 :

Python3




# 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 
 

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32338 POSTS0 COMMENTS
Milvus
86 POSTS0 COMMENTS
Nango Kala
6707 POSTS0 COMMENTS
Nicole Veronica
11871 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11936 POSTS0 COMMENTS
Shaida Kate Naidoo
6825 POSTS0 COMMENTS
Ted Musemwa
7089 POSTS0 COMMENTS
Thapelo Manthata
6779 POSTS0 COMMENTS
Umr Jansen
6781 POSTS0 COMMENTS