Tukey’s Lambda distribution

See https://en.wikipedia.org/wiki/Tukey_lambda_distribution

This implementation uses the same parameter names as scipy.stats.tukeylambda.

mpsci.distributions.tukeylambda.cdf(x, lam, loc=0, scale=1, solver='ridder')

Cumulative distribution function for Tukey’s lambda distribution.

This function uses mpmath.findroot to compute the survival function.

solver is passed to mpmath.findroot. It can be one of [‘bisect’, ‘anderson’, ‘ridder’].

mpsci.distributions.tukeylambda.invcdf(p, lam, loc=0, scale=1)

Quantile function for Tukey’s lambda distribution.

mpsci.distributions.tukeylambda.invsf(p, lam, loc=0, scale=1)

Inverse survival function for Tukey’s lambda distribution.

mpsci.distributions.tukeylambda.logpdf(x, lam, loc=0, scale=1)

Natural logarithm of the PDF for Tukey’s lambda distribution.

This implementation is simply log(pdf(x, lam, loc, scale)).

mpsci.distributions.tukeylambda.mean(lam, loc=0, scale=1)

Mean of Tukey’s lambda distribution.

The mean is loc if lam > -1. Otherwise the mean is not defined, so nan is returned.

mpsci.distributions.tukeylambda.pdf(x, lam, loc=0, scale=1)

Probability density function for Tukey’s lambda distribution.

mpsci.distributions.tukeylambda.sf(x, lam, loc=0, scale=1, solver='ridder')

Survival function for Tukey’s lambda distribution.

This function uses mpmath.findroot to compute the survival function.

solver is passed to mpmath.findroot. It can be one of [‘bisect’, ‘anderson’, ‘ridder’].

mpsci.distributions.tukeylambda.support(lam, loc=0, scale=1)

Support interval for Tukey’s lambda distribution.

mpsci.distributions.tukeylambda.var(lam, loc=0, scale=1)

Variance of Tukey’s lambda distribution.

nan is returned if lam <= -1/2.