sympy.stats.Kumaraswamy() in python
Last Updated :
05 Jun, 2020
With the help of sympy.stats.Kumaraswamy()
method, we can get the continuous random variable which represents the kumaraswamy distribution.
Syntax : sympy.stats.Kumaraswamy(name, a, b)
Where, a and b are real number and a, b > 0.
Return : Return the continuous random variable.
Example #1 :
In this example we can see that by using sympy.stats.Kumaraswamy()
method, we are able to get the continuous random variable representing kumaraswamy distribution by using this method.
from sympy.stats import Kumaraswamy, density
from sympy import Symbol, pprint
z = Symbol( "z" )
a = Symbol( "a" , positive = True )
b = Symbol( "b" , positive = True )
X = Kumaraswamy( "x" , a, b)
gfg = density(X)(z)
pprint(gfg)
|
Output :
b – 1
a – 1 / a\
a*b*z *\1 – z /
Example #2 :
from sympy.stats import Kumaraswamy, density
from sympy import Symbol, pprint
z = 0.3
a = 2
b = 6
X = Kumaraswamy( "x" , a, b)
gfg = density(X)(z)
pprint(gfg)
|
Output :
2.24651572236000
Share your thoughts in the comments
Please Login to comment...