sympy.stats.Zeta() in Python
Last Updated :
08 Jun, 2020
With the help of sympy.stats.Zeta()
method, we can get the random variable representing the Zeta distribution.
Syntax : sympy.stats.Zeta(name, s)
Return : Return the random variable.
Example #1 :
In this example we can see that by using sympy.stats.Zeta()
method, we are able to get the Zeta distribution by using this method.
from sympy.stats import Zeta, density, E, variance
from sympy import Symbol
s = 7
X = Zeta( "x" , s)
gfg = density(X)( 0.33333 )
print (gfg)
|
Output :
2187.15309612378/zeta(7)
Example #2 :
from sympy.stats import Zeta, density, E, variance
from sympy import Symbol
s = 3
z = Symbol( "z" )
X = Zeta( "x" , s)
gfg = density(X)(z)
print (gfg)
|
Output :
1/(z**3*zeta(3))
Share your thoughts in the comments
Please Login to comment...