Laplace distribution

In probability theory and statistics, the Laplace distribution is a continuous probability distribution named after Pierre-Simon Laplace. It is also known as the double exponential distribution, because it can be thought of as two exponential distributions (with an additional location parameter) spliced together back-to-back. 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.

Probability density function
A random variable has a Laplace(&mu;, b) distribution if its probability density function is


 * $$f(x|\mu,b) = \frac{1}{2b} \exp \left( -\frac{|x-\mu|}{b} \right) \,\!$$
 * $$   = \frac{1}{2b}

\left\{\begin{matrix} \exp \left( -\frac{\mu-x}{b} \right) & \mbox{if }x < \mu \\[8pt] \exp \left( -\frac{x-\mu}{b} \right) & \mbox{if }x \geq \mu \end{matrix}\right. $$

Here, &mu; is a location parameter and b &gt; 0 is a scale parameter. If &mu; = 0 and b = 1, the positive half-line is exactly an exponential distribution scaled by 1/2.

The pdf 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 &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.

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: The inverse cumulative distribution function is given by


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

Generating Laplace variates
Given a random variate U drawn from the uniform distribution in the interval (-1/2, 1/2], the variate


 * $$X=\mu - b\,\sgn(U)\,\ln(1 - 2|U|)$$

has a Laplace distribution with parameters &mu; and b. This follows from the inverse cumulative distribution function given above.

A Laplace(0, b) variate can also be generated as the difference of two i.i.d. Exponential(1/b) variates. Equivalently, a Laplace(0, 1) variate can be generated as the logarithm of the ratio of two iid uniform variates.

Parameter estimation
Given N independent and identically distributed samples x1, x2, ..., xN, estimator of $$\mu$$, $$\hat{\mu}$$ is the sample median, and the estimator of b is
 * $$\hat{b} = \frac{1}{N} \sum_{i = 1}^{N} |x_i - \hat{\mu}|,$$

using the maximum likelihood estimator.

Moments

 * $$\mu_r' = \bigg({\frac{1}{2}}\bigg) \sum_{k=0}^r \bigg[{\frac{r!}{k! (r-k)!}} b^k \mu^{(r-k)} k! \{1 + (-1)^k\}\bigg]$$

Related distributions

 * If $$X \sim \mathrm{Laplace}(0,b)\,$$ then $$|X| \sim \mathrm{Exponential}(b^{-1})\,$$ is an exponential distribution.
 * If $$X \sim \mathrm{Exponential}(\lambda)\,$$ and $$ Y \sim \mathrm{Bernoulli}(0.5)\,$$ independent of $$X\,$$, then $$ X(2Y-1) \sim \mathrm{Laplace} (0,\lambda^{-1}) \,$$.
 * If $$X_1 \sim \mathrm{Exponential}(\lambda_1)\,$$ and $$X_2 \sim \mathrm{Exponential}(\lambda_2)\,$$ independent of $$X_1\,$$, then $$\lambda_1 X_1-\lambda_2 X_2 \sim \mathrm{Laplace}\left(0,1\right)\,$$ ．