Zipf (Zeta) Distribution#

A random variable has the zeta distribution (also called the zipf distribution) with parameter α>1 if it’s probability mass function is given by

p(k;α)=1ζ(α)kαk1

where

ζ(α)=n=11nα

is the Riemann zeta function. Other functions of this distribution are

F(x;α)=1ζ(α)k=1x1kαμ=ζ1ζ0α>2μ2=ζ2ζ0ζ12ζ02α>3γ1=ζ3ζ023ζ0ζ1ζ2+2ζ13[ζ2ζ0ζ12]3/2α>4γ2=ζ4ζ034ζ3ζ1ζ02+12ζ2ζ12ζ06ζ143ζ22ζ02(ζ2ζ0ζ12)2.
M(t)=Liα(et)ζ(α)

where ζi=ζ(αi) and Lin(z) is the nth polylogarithm function of z defined as

Lin(z)k=1zkkn
μn=M(n)(t)|t=0=Liαn(et)ζ(a)|t=0=ζ(αn)ζ(α)

Implementation: scipy.stats.zipf