Log-series distribution

This discrete distributions is also known as the logarithmic distribution [1].

mpsci.distributions.logseries.cdf(k, p)

CDF of the log-series distribution.

mpsci.distributions.logseries.kurtosis(p)

Excess kurtosis of the log-series distribution.

mpsci.distributions.logseries.logpmf(k, p)

Natural log of the PMF of the log-series distribution.

mpsci.distributions.logseries.mean(p)

Mean of the log-series distribution.

mpsci.distributions.logseries.mle(x, *, counts=None)

Maximum likelihood estimation for the log-series distribution.

Examples

>>> from mpsci.distributions import logseries
>>> from mpmath import mp
>>> mp.dps = 40
>>> x = [1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2]
>>> logseries.mle(x)
mpf('0.3500385397570795760273865807843594135596862')
>>> values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
>>> counts = [10, 4, 5, 2, 0, 2, 5, 1, 4, 0, 3]
>>> logseries.mle(values, counts=counts)
mpf('0.9207611550739465028229025367922360801454828')
mpsci.distributions.logseries.mode(p)

Mode of the log-series distribution.

mpsci.distributions.logseries.nll(x, p, *, counts=None)

Negative log-likelihood of the log-series distribution.

mpsci.distributions.logseries.pmf(k, p)

Probability mass function of the log-series distribution.

mpsci.distributions.logseries.sf(k, p)

Survival function of the log-series distribution.

mpsci.distributions.logseries.skewness(p)

Skewness of the log-series distribution.

mpsci.distributions.logseries.support(p)

Support of the log-series distribution.

The support is the integers 1, 2, 3, …, so the support is returned as an instance of itertools.count(start=1).

Examples

>>> from mpsci.distributions import logseries
>>> sup = logseries.support()
>>> next(sup)
1
>>> next(sup)
2
mpsci.distributions.logseries.var(p)

Variance of the log-series distribution.