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.
# Import sympy and Zeta from sympy.stats import Zeta, density, E, variance from sympy import Symbol   s = 7   # Using sympy.stats.Zeta() method X = Zeta( "x" , s) gfg = density(X)( 0.33333 )   print (gfg) |
Output :
2187.15309612378/zeta(7)
Example #2 :
# Import sympy and Zeta from sympy.stats import Zeta, density, E, variance from sympy import Symbol   s = 3 z = Symbol( "z" )   # Using sympy.stats.Zeta() method X = Zeta( "x" , s) gfg = density(X)(z)   print (gfg) |
Output :
1/(z**3*zeta(3))