Thursday, March 12, 2026
HomeLanguagessympy.stats.Zeta() in Python

sympy.stats.Zeta() in Python

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))

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32506 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6882 POSTS0 COMMENTS
Nicole Veronica
12005 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12099 POSTS0 COMMENTS
Shaida Kate Naidoo
7011 POSTS0 COMMENTS
Ted Musemwa
7255 POSTS0 COMMENTS
Thapelo Manthata
6967 POSTS0 COMMENTS
Umr Jansen
6956 POSTS0 COMMENTS