Open In App

sympy.stats.YuleSimon() in Python

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

With the help of sympy.stats.YuleSimon() method, we can get the random variable representing the Yule-Simon distribution.

Syntax : sympy.stats.YuleSimon(name, rho)
Return : Return the random variable.

Example #1 :
In this example we can see that by using sympy.stats.YuleSimon() method, we are able to get the Yule-Simon distribution by using this method.




# Import sympy and Yule-Simon
from sympy.stats import YuleSimon, density, E, variance
from sympy import Symbol, simplify
  
rho = 5
  
# Using sympy.stats.YuleSimon() method
X = YuleSimon("X", rho)
gfg = density(X)(0.5)
  
print(gfg)


Output :

5*beta(0.5, 6)

Example #2 :




# Import sympy and Yule-Simon
from sympy.stats import YuleSimon, density, E, variance
from sympy import Symbol, simplify
  
rho = 5
z = Symbol("z")
  
# Using sympy.stats.YuleSimon() method
X = YuleSimon("X", rho)
gfg = density(X)(z)
  
print(gfg)


Output :

5*beta(z, 6)


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads