Laplace distribution

The parameters are mu (the location) and b (the scale).

mpsci.distributions.laplace.cdf(x, mu=0, b=1)

Laplace distribution cumulative distribution function.

mpsci.distributions.laplace.invcdf(p, mu=0, b=1)

Laplace distribution inverse CDF.

This function is also known as the quantile function or the percent point function.

mpsci.distributions.laplace.invsf(p, mu=0, b=1)

Laplace distribution inverse survival function.

mpsci.distributions.laplace.logpdf(x, mu=0, b=1)

Log of the PDF of the Laplace distribution.

mpsci.distributions.laplace.mean(mu=0, b=1)

Mean of the Laplace distribution.

mpsci.distributions.laplace.mle(x, *, mu=None, b=None)

Laplace distribution maximum likelihood parameter estimation.

Returns (mu, b).

Note: When len(x) is even, the maximum likelihood estimate for mu is not unique, because the likelihood function has a “flat top”. This function returns the median, with the convention that the median of x when len(x) is even is the midpoint of s[n//2-1] and s[n//2], where s is sorted(x) and n is len(x). In fact, any value between s[n//2 - 1] and s[n//2] is a valid maximum likelihood estimate for mu.

mpsci.distributions.laplace.mom(x)

Method of moments estimation for the Laplace distribution.

x must be a sequence of numbers.

Returns (mu, b).

mpsci.distributions.laplace.pdf(x, mu=0, b=1)

Laplace distribution probability density function.

mpsci.distributions.laplace.sf(x, mu=0, b=1)

Laplace distribution survival function.

mpsci.distributions.laplace.support(mu=0, b=1)

Support of the Laplace distribution.

mpsci.distributions.laplace.var(mu=0, b=1)

Variance of the Laplace distribution.