This is documentation for an old release of SciPy (version 0.19.0). Search for this page in the documentation of the latest stable release (version 1.15.1).
Logarithmic (Log-Series, Series) Distribution¶
The logarithmic distribution with parameter p has a probability mass function with terms proportional to the Taylor series expansion of log(1−p)
p(k;p)=−pkklog(1−p)k≥1F(x;p)=−1log(1−p)⌊x⌋∑k=1pkk=1+p1+⌊x⌋Φ(p,1,1+⌊x⌋)log(1−p)
where
Φ(z,s,a)=∞∑k=0zk(a+k)s
is the Lerch Transcendent. Also define r=log(1−p)
μ=−p(1−p)rμ2=−p[p+r](1−p)2r2γ1=−2p2+3pr+(1+p)r2r(p+r)√−p(p+r)rγ2=−6p3+12p2r+p(4p+7)r2+(p2+4p+1)r3p(p+r)2.
M(t)=−1log(1−p)∞∑k=1etkpkk=log(1−pet)log(1−p)
Thus,
μ′n=M(n)(t)|t=0=Li1−n(pet)log(1−p)|t=0=−Li1−n(p)log(1−p).
Implementation: scipy.stats.logser