Open In App

sympy.stats.Kumaraswamy() in python

Last Updated : 05 Jun, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

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.




# Import sympy and Kumaraswamy
from sympy.stats import Kumaraswamy, density
from sympy import Symbol, pprint
  
z = Symbol("z")
a = Symbol("a", positive = True)
b = Symbol("b", positive = True)
  
# Using sympy.stats.Kumaraswamy() method
X = Kumaraswamy("x", a, b)
gfg = density(X)(z)
  
pprint(gfg)


Output :

b – 1
a – 1 / a\
a*b*z *\1 – z /

Example #2 :




# Import sympy and Kumaraswamy
from sympy.stats import Kumaraswamy, density
from sympy import Symbol, pprint
  
z = 0.3
a = 2
b = 6
  
# Using sympy.stats.Kumaraswamy() method
X = Kumaraswamy("x", a, b)
gfg = density(X)(z)
  
pprint(gfg)


Output :

2.24651572236000



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads