Laplace distribution

(Redirected from Laplacian distribution)
Parameters Probability density function Cumulative distribution function ${\displaystyle \mu }$ location (real) ${\displaystyle b>0}$ scale (real) ${\displaystyle x\in (-\infty ;+\infty )\,}$ ${\displaystyle {\frac {1}{2\,b}}\exp \left(-{\frac {|x-\mu |}{b}}\right)\,}$ ${\displaystyle {\begin{cases}{\frac {1}{2}}\exp \left({\frac {x-\mu }{b}}\right)&{\mbox{if }}x<\mu \\[8pt]1-{\frac {1}{2}}\exp \left(-{\frac {x-\mu }{b}}\right)&{\mbox{if }}x\geq \mu \end{cases}}}$ ${\displaystyle \mu }$ ${\displaystyle \mu }$ ${\displaystyle \mu }$ ${\displaystyle 2b^{2}}$ ${\displaystyle 0}$ ${\displaystyle 3}$ ${\displaystyle \log(2be)}$ ${\displaystyle {\frac {\exp(\mu \,t)}{1-b^{2}\,t^{2}}}\,\!{\text{ for }}|t|<1/b\,}$ ${\displaystyle {\frac {\exp(\mu \,i\,t)}{1+b^{2}\,t^{2}}}\,\!}$

In probability theory and statistics, the Laplace distribution is a continuous probability distribution named after Pierre-Simon Laplace. It is also sometimes called the double exponential distribution, because it can be thought of as two exponential distributions (with an additional location parameter) spliced together back-to-back, although the term 'double exponential distribution' is also sometimes used to refer to the Gumbel distribution. The difference between two independent identically distributed exponential random variables is governed by a Laplace distribution, as is a Brownian motion evaluated at an exponentially distributed random time. Increments of Laplace motion or a variance gamma process evaluated over the time scale also have a Laplace distribution.

Characterization

Probability density function

A random variable has a ${\displaystyle {\textrm {Laplace}}(\mu ,b)}$ distribution if its probability density function is

${\displaystyle f(x\mid \mu ,b)={\frac {1}{2b}}\exp \left(-{\frac {|x-\mu |}{b}}\right)\,\!}$
${\displaystyle ={\frac {1}{2b}}\left\{{\begin{matrix}\exp \left(-{\frac {\mu -x}{b}}\right)&{\text{if }}x<\mu \\[8pt]\exp \left(-{\frac {x-\mu }{b}}\right)&{\text{if }}x\geq \mu \end{matrix}}\right.}$

Here, ${\displaystyle \mu }$ is a location parameter and ${\displaystyle b>0}$, which is sometimes referred to as the diversity, is a scale parameter. If ${\displaystyle \mu =0}$ and ${\displaystyle b=1}$, the positive half-line is exactly an exponential distribution scaled by 1/2.

The probability density function of the Laplace distribution is also reminiscent of the normal distribution; however, whereas the normal distribution is expressed in terms of the squared difference from the mean ${\displaystyle \mu }$, the Laplace density is expressed in terms of the absolute difference from the mean. Consequently, the Laplace distribution has fatter tails than the normal distribution.

Differential equation

The pdf of the Laplace distribution is a solution of the following differential equation:

${\displaystyle {\begin{cases}\left\{{\begin{array}{l}bf'(x)+f(x)=0\\[8pt]f(0)={\frac {e^{\frac {\mu }{b}}}{2b}}\end{array}}\right\}&{\text{if }}x\geq \mu \\[8pt]\left\{{\begin{array}{l}bf'(x)-f(x)=0\\[8pt]f(0)={\frac {e^{-{\frac {\mu }{b}}}}{2b}}\end{array}}\right\}&{\text{if }}x<\mu \end{cases}}}$

Cumulative distribution function

The Laplace distribution is easy to integrate (if one distinguishes two symmetric cases) due to the use of the absolute value function. Its cumulative distribution function is as follows:

{\displaystyle {\begin{aligned}F(x)&=\int _{-\infty }^{x}\!\!f(u)\,\mathrm {d} u={\begin{cases}{\frac {1}{2}}\exp \left({\frac {x-\mu }{b}}\right)&{\mbox{if }}x<\mu \\1-{\frac {1}{2}}\exp \left(-{\frac {x-\mu }{b}}\right)&{\mbox{if }}x\geq \mu \end{cases}}\\&={\tfrac {1}{2}}+{\tfrac {1}{2}}\operatorname {sgn}(x-\mu )\left(1-\exp \left(-{\frac {|x-\mu |}{b}}\right)\right).\end{aligned}}}

The inverse cumulative distribution function is given by

${\displaystyle F^{-1}(p)=\mu -b\,\operatorname {sgn}(p-0.5)\,\ln(1-2|p-0.5|).}$

Generating random variables according to the Laplace distribution

Given a random variable ${\displaystyle U}$ drawn from the uniform distribution in the interval ${\displaystyle \left(-1/2,1/2\right]}$, the random variable

${\displaystyle X=\mu -b\,\operatorname {sgn}(U)\,\ln(1-2|U|)}$

has a Laplace distribution with parameters ${\displaystyle \mu }$ and ${\displaystyle b}$. This follows from the inverse cumulative distribution function given above.

A ${\displaystyle {\textrm {Laplace}}(0,b)}$ variate can also be generated as the difference of two i.i.d. ${\displaystyle {\textrm {Exponential}}(1/b)}$ random variables. Equivalently, ${\displaystyle {\textrm {Laplace}}(0,1)}$ can also be generated as the logarithm of the ratio of two i.i.d. uniform random variables.

Parameter estimation

Given ${\displaystyle N}$ independent and identically distributed samples ${\displaystyle x_{1},x_{2},...,x_{N}}$, the maximum likelihood estimator ${\displaystyle {\hat {\mu }}}$ of ${\displaystyle \mu }$ is the sample median,[1] and the maximum likelihood estimator ${\displaystyle {\hat {b}}}$ of ${\displaystyle b}$ is

${\displaystyle {\hat {b}}={\frac {1}{N}}\sum _{i=1}^{N}|x_{i}-{\hat {\mu }}|}$

(revealing a link between the Laplace distribution and least absolute deviations).

Moments

${\displaystyle \mu _{r}'={\bigg (}{\frac {1}{2}}{\bigg )}\sum _{k=0}^{r}{\bigg [}{\frac {r!}{(r-k)!}}b^{k}\mu ^{(r-k)}\{1+(-1)^{k}\}{\bigg ]}={\frac {m^{n+1}}{2b}}\left(e^{m/b}E_{-n}(m/b)-e^{-m/b}E_{-n}(-m/b)\right)}$

where ${\displaystyle E_{n}()}$ is the generalized exponential integral function ${\displaystyle E_{n}(x)=x^{n-1}\Gamma (1-n,x)}$.

Related distributions

• If ${\displaystyle X\sim {\textrm {Laplace}}(\mu ,b)}$ then ${\displaystyle kX+c\sim {\textrm {Laplace}}(k\mu +c,kb)}$.
• If ${\displaystyle X\sim {\textrm {Laplace}}(0,b)}$ then ${\displaystyle \left|X\right|\sim {\textrm {Exponential}}\left(b^{-1}\right)}$. (Exponential distribution)
• If ${\displaystyle X,Y\sim {\textrm {Exponential}}(\lambda )}$ then ${\displaystyle X-Y\sim {\textrm {Laplace}}\left(0,\lambda ^{-1}\right)}$
• If ${\displaystyle X\sim {\textrm {Laplace}}(\mu ,b)}$ then ${\displaystyle \left|X-\mu \right|\sim {\textrm {Exponential}}(b^{-1})}$.
• If ${\displaystyle X\sim {\textrm {Laplace}}(\mu ,b)}$ then ${\displaystyle X\sim {\textrm {EPD}}(\mu ,b,0)}$. (Exponential power distribution)
• If ${\displaystyle X_{1},...,X_{4}\sim {\textrm {N}}(0,1)}$ (Normal distribution) then ${\displaystyle X_{1}X_{2}-X_{3}X_{4}\sim {\textrm {Laplace}}(0,1)}$.
• If ${\displaystyle X_{i}\sim {\textrm {Laplace}}(\mu ,b)}$ then ${\displaystyle {\frac {\displaystyle 2}{b}}\sum _{i=1}^{n}|X_{i}-\mu |\sim \chi ^{2}(2n)}$. (Chi-squared distribution)
• If ${\displaystyle X,Y\sim {\textrm {Laplace}}(\mu ,b)}$ then ${\displaystyle {\tfrac {|X-\mu |}{|Y-\mu |}}\sim \operatorname {F} (2,2)}$. (F-distribution)
• If ${\displaystyle X,Y\sim {\textrm {U}}(0,1)}$ (Uniform distribution) then ${\displaystyle \log(X/Y)\sim {\textrm {Laplace}}(0,1)}$.
• If ${\displaystyle X\sim {\textrm {Exponential}}(\lambda )}$ and ${\displaystyle Y\sim {\textrm {Bernoulli}}(0.5)}$ (Bernoulli distribution) independent of ${\displaystyle X}$, then ${\displaystyle X(2Y-1)\sim {\textrm {Laplace}}\left(0,\lambda ^{-1}\right)}$.
• If ${\displaystyle X\sim {\textrm {Exponential}}(\lambda )}$ and ${\displaystyle Y\sim {\textrm {Exponential}}(\nu )}$ independent of ${\displaystyle X}$, then ${\displaystyle \lambda X-\nu Y\sim {\textrm {Laplace}}(0,1)}$
• If ${\displaystyle X}$ has a Rademacher distribution and ${\displaystyle Y\sim {\textrm {Exponential}}(\lambda )}$ then ${\displaystyle XY\sim {\textrm {Laplace}}(0,1/\lambda )}$.
• If ${\displaystyle V\sim {\textrm {Exponential}}(1)}$ and ${\displaystyle Z\sim N(0,1)}$ independent of ${\displaystyle V}$, then ${\displaystyle X=\mu +b{\sqrt {2V}}Z\sim \mathrm {Laplace} (\mu ,b)}$.
• If ${\displaystyle X\sim {\textrm {GeometricStable}}(2,0,\lambda ,0)}$ (geometric stable distribution) then ${\displaystyle X\sim {\textrm {Laplace}}(0,\lambda )}$.
• The Laplace distribution is a limiting case of the hyperbolic distribution.
• If ${\displaystyle X|Y\sim {\textrm {N}}(\mu ,\sigma =Y)}$ with ${\displaystyle Y\sim {\textrm {Rayleigh}}(b)}$ (Rayleigh distribution) then ${\displaystyle X\sim {\textrm {Laplace}}(\mu ,b)}$.

Relation to the exponential distribution

A Laplace random variable can be represented as the difference of two iid exponential random variables.[2] One way to show this is by using the characteristic function approach. For any set of independent continuous random variables, for any linear combination of those variables, its characteristic function (which uniquely determines the distribution) can be acquired by multiplying the corresponding characteristic functions.

Consider two i.i.d random variables ${\displaystyle X,Y\sim {\textrm {Exponential}}(\lambda )}$. The characteristic functions for ${\displaystyle X,-Y}$ are

${\displaystyle {\frac {\lambda }{-it+\lambda }},\quad {\frac {\lambda }{it+\lambda }}}$

respectively. On multiplying these characteristic functions (equivalent to the characteristic function of the sum of therandom variables ${\displaystyle X+(-Y)}$), the result is

${\displaystyle {\frac {\lambda ^{2}}{(-it+\lambda )(it+\lambda )}}={\frac {\lambda ^{2}}{t^{2}+\lambda ^{2}}}.}$

This is the same as the characteristic function for ${\displaystyle Z\sim {\textrm {Laplace}}(0,1/\lambda )}$, which is

${\displaystyle {\frac {1}{1+{\frac {t^{2}}{\lambda ^{2}}}}}.}$

Sargan distributions

Sargan distributions are a system of distributions of which the Laplace distribution is a core member. A ${\displaystyle p}$th order Sargan distribution has density[3][4]

${\displaystyle f_{p}(x)={\tfrac {1}{2}}\exp(-\alpha |x|){\frac {\displaystyle 1+\sum _{j=1}^{p}\beta _{j}\alpha ^{j}|x|^{j}}{\displaystyle 1+\sum _{j=1}^{p}j!\beta _{j}}},}$

for parameters ${\displaystyle \alpha \geq 0,\beta _{j}\geq 0}$. The Laplace distribution results for ${\displaystyle p=0}$.

Applications

The Laplacian distribution has been used in speech recognition to model priors on DFT coefficients [5] and in JPEG image compression to model AC coefficients [6] generated by a DCT.

The addition of noise drawn from a Laplacian distribution, with scaling parameter appropriate to a function's sensitivity, to the output of a statistical database query is the most common means to provide differential privacy in statistical databases.

In regression analysis, the least absolute deviations estimate arises as the maximum likelihood estimate if the errors have a Laplace distribution.

The Lasso can be thought of as a Bayesian regression with a Laplacian prior.

History

This distribution is often referred to as Laplace's first law of errors. He published it in 1774 when he noted that the frequency of an error could be expressed as an exponential function of its magnitude once its sign was disregarded.[7][8]

Keynes published a paper in 1911 based on his earlier thesis wherein he showed that the Laplace distribution minimised the absolute deviation from the median.[9]