Laplace distribution

Revision as of 07:51, 9 April 2025 by imported>WikiCleanerBot (v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation))
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description Template:Probability distribution 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 along the x-axis,<ref>Template:Citation</ref> although the term 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 timeTemplate:Citation needed. Increments of Laplace motion or a variance gamma process evaluated over the time scale also have a Laplace distribution.

DefinitionsEdit

Probability density functionEdit

A random variable has a <math>\operatorname{Laplace}(\mu, b)</math> distribution if its probability density function is

<math>f(x \mid \mu, b) = \frac{1}{2b} \exp\left( -\frac{|x - \mu|}{b} \right),</math>

where <math>\mu</math> is a location parameter, and <math>b > 0</math>, which is sometimes referred to as the "diversity", is a scale parameter. If <math>\mu = 0</math> and <math>b = 1</math>, the positive half-line is exactly an exponential distribution scaled by 1/2.<ref>Template:Cite journal</ref>

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 <math>\mu</math>, 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. It is a special case of the generalized normal distribution and the hyperbolic distribution. Continuous symmetric distributions that have exponential tails, like the Laplace distribution, but which have probability density functions that are differentiable at the mode include the logistic distribution, hyperbolic secant distribution, and the Champernowne distribution.

Cumulative distribution functionEdit

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:

<math>\begin{align}

F(x) &= \int_{-\infty}^x \!\!f(u)\,\mathrm{d}u = \begin{cases}

            \frac12 \exp \left( \frac{x-\mu}{b} \right) & \mbox{if }x < \mu \\
            1-\frac12 \exp \left( -\frac{x-\mu}{b} \right) & \mbox{if }x \geq \mu
           \end{cases} \\

&=\tfrac{1}{2} + \tfrac{1}{2} \sgn(x-\mu) \left(1-\exp \left(-\frac{|x-\mu|}{b} \right ) \right ). \end{align}</math>

The inverse cumulative distribution function is given by

<math>F^{-1}(p) = \mu - b\,\sgn(p-0.5)\,\ln(1 - 2|p-0.5|).</math>

PropertiesEdit

MomentsEdit

<math>\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].</math>

Related distributionsEdit

  • If <math>X \sim \textrm{Laplace}(\mu, b)</math> then <math>kX + c \sim \textrm{Laplace}(k\mu + c, |k|b)</math>.
  • If <math>X \sim \textrm{Laplace}(0, 1)</math> then <math>bX \sim \textrm{Laplace}(0, b)</math>.
  • If <math>X \sim \textrm{Laplace}(0, b)</math> then <math>\left|X\right| \sim \textrm{Exponential}\left(b^{-1}\right)</math> (exponential distribution).
  • If <math>X, Y \sim \textrm{Exponential}(\lambda)</math> then <math>X - Y \sim \textrm{Laplace}\left(0, \lambda^{-1}\right)</math>.
  • If <math>X \sim \textrm{Laplace}(\mu, b)</math> then <math>\left|X - \mu\right| \sim \textrm{Exponential}(b^{-1})</math>.
  • If <math>X \sim \textrm{Laplace}(\mu, b)</math> then <math>X \sim \textrm{EPD}(\mu, b, 1)</math> (exponential power distribution).
  • If <math>X_1, ...,X_4 \sim \textrm{N}(0, 1)</math> (normal distribution) then <math>X_1X_2 - X_3X_4 \sim \textrm{Laplace}(0, 1)</math> and <math>(X_1^2 - X_2^2 + X_3^2 - X_4^2)/2 \sim \textrm{Laplace}(0, 1)</math>.
  • If <math>X_i \sim \textrm{Laplace}(\mu, b)</math> then <math>\frac{\displaystyle 2}{b} \sum_{i=1}^n |X_i-\mu| \sim \chi^2(2n)</math> (chi-squared distribution).
  • If <math>X, Y \sim \textrm{Laplace}(\mu, b)</math> then <math>\tfrac{|X-\mu|}{|Y-\mu|} \sim \operatorname{F}(2,2)</math>. (F-distribution)
  • If <math>X, Y \sim \textrm{U}(0, 1)</math> (uniform distribution) then <math>\log(X/Y) \sim \textrm{Laplace}(0, 1)</math>.
  • If <math>X \sim \textrm{Exponential}(\lambda)</math> and <math>Y \sim \textrm{Bernoulli}(0.5)</math> (Bernoulli distribution) independent of <math>X</math>, then <math>X(2Y - 1) \sim \textrm{Laplace}\left(0, \lambda^{-1}\right)</math>.
  • If <math>X \sim \textrm{Exponential}(\lambda)</math> and <math>Y \sim \textrm{Exponential}(\nu)</math> independent of <math>X</math>, then <math>\lambda X - \nu Y \sim \textrm{Laplace}(0, 1)</math>.
  • If <math>X</math> has a Rademacher distribution and <math>Y \sim \textrm{Exponential}(\lambda)</math> then <math>XY \sim \textrm{Laplace}(0, 1/\lambda)</math>.
  • If <math>V \sim \textrm{Exponential}(1)</math> and <math>Z \sim N(0, 1)</math> independent of <math>V</math>, then <math>X = \mu + b \sqrt{2 V}Z \sim \mathrm{Laplace}(\mu,b)</math>.
  • If <math>X \sim \textrm{GeometricStable}(2, 0, \lambda, 0)</math> (geometric stable distribution) then <math>X \sim \textrm{Laplace}(0, \lambda)</math>.
  • The Laplace distribution is a limiting case of the hyperbolic distribution.
  • If <math>X|Y \sim \textrm{N}(\mu,Y^2)</math> with <math>Y \sim \textrm{Rayleigh}(b)</math> (Rayleigh distribution) then <math>X \sim \textrm{Laplace}(\mu, b)</math>. Note that if <math>Y \sim \textrm{Rayleigh}(b)</math>, then <math>Y^2 \sim \textrm{Gamma}(1,2b^2) </math> with <math>\textrm{E}(Y^2)=2b^2</math>, which in turn equals the exponential distribution <math>\textrm{Exp}(1/(2b^2))</math>.
  • Given an integer <math>n \ge 1</math>, if <math>X_i, Y_i \sim \Gamma\left(\frac{1}{n}, b\right)</math> (gamma distribution, using <math>k, \theta</math> characterization), then <math>\sum_{i=1}^n \left( \frac{\mu}{n} + X_i - Y_i\right) \sim \textrm{Laplace}(\mu, b)</math> (infinite divisibility)<ref name="Kotz">Template:Cite book</ref>
  • If X has a Laplace distribution, then Y = eX has a log-Laplace distribution; conversely, if X has a log-Laplace distribution, then its logarithm has a Laplace distribution.

Probability of a Laplace being greater than anotherEdit

Let <math>X, Y</math> be independent laplace random variables: <math>X \sim \textrm{Laplace}(\mu_X, b_X)</math> and <math>Y \sim \textrm{Laplace}(\mu_Y, b_Y)</math>, and we want to compute <math>P(X>Y)</math>.

The probability of <math>P(X > Y)</math> can be reduced (using the properties below) to <math>P(\mu + bZ_1 > Z_2)</math>, where <math>Z_1, Z_2 \sim \textrm{Laplace}(0, 1)</math>. This probability is equal to

<math>P(\mu + bZ_1 > Z_2) = \begin{cases} \frac{b^2 e^{\mu/b} - e^\mu}{2(b^2 -1)}, & \text{when } \mu < 0 \\ 1-\frac{ b^2 e^{-\mu/b} - e^{-\mu}}{2(b^2 -1)}, & \text{when } \mu > 0 \\ \end{cases}</math>

When <math> b = 1 </math>, both expressions are replaced by their limit as <math> b \to 1</math>:

<math>P(\mu + Z_1 > Z_2) = \begin{cases} e^\mu\frac{(2-\mu)}4, & \text{when } \mu < 0 \\ 1-e^{-\mu}\frac{(2+\mu)}4, & \text{when } \mu > 0 \\ \end{cases}</math>

To compute the case for <math> \mu > 0 </math>, note that <math>P(\mu + Z_1 > Z_2) = 1 - P(\mu + Z_1 < Z_2) = 1 - P(-\mu - Z_1 > -Z_2) = 1 - P(-\mu + Z_1 > Z_2)</math>

since <math> Z \sim -Z </math> when <math>Z \sim \textrm{Laplace}(0, 1) </math> .

Relation to the exponential distributionEdit

A Laplace random variable can be represented as the difference of two independent and identically distributed (iid) exponential random variables.<ref name="Kotz" /> 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 <math>X, Y \sim \textrm{Exponential}(\lambda)</math>. The characteristic functions for <math>X, -Y</math> are

<math>\frac{\lambda }{-i t+\lambda }, \quad \frac{\lambda }{i t+\lambda }</math>

respectively. On multiplying these characteristic functions (equivalent to the characteristic function of the sum of the random variables <math>X + (-Y)</math>), the result is

<math>\frac{\lambda ^2}{(-i t+\lambda ) (i t+\lambda )} = \frac{\lambda ^2}{t^2+\lambda ^2}.</math>

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

<math>\frac{1}{1+\frac{t^2}{\lambda ^2}}.</math>

Sargan distributionsEdit

Sargan distributions are a system of distributions of which the Laplace distribution is a core member. A <math>p</math>th order Sargan distribution has density<ref>Everitt, B.S. (2002) The Cambridge Dictionary of Statistics, CUP. Template:Isbn</ref><ref>Johnson, N.L., Kotz S., Balakrishnan, N. (1994) Continuous Univariate Distributions, Wiley. Template:Isbn. p. 60</ref>

<math>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},</math>

for parameters <math>\alpha \ge 0, \beta_j \ge 0</math>. The Laplace distribution results for <math>p = 0</math>.

Statistical inferenceEdit

Given <math>n</math> independent and identically distributed samples <math>x_1, x_2, ..., x_n</math>, the maximum likelihood (MLE) estimator of <math>\mu</math> is the sample median,<ref>Template:Cite journal</ref>

<math>\hat{\mu} = \mathrm{med}(x).</math>

The MLE estimator of <math>b</math> is the mean absolute deviation from the median,Template:Citation needed

<math>\hat{b} = \frac{1}{n} \sum_{i = 1}^{n} |x_i - \hat{\mu}|.</math>

revealing a link between the Laplace distribution and least absolute deviations. A correction for small samples can be applied as follows:

<math>\hat{b}^* = \hat{b} \cdot n/(n-2)</math>

(see: exponential distribution#Parameter estimation).

Occurrence and applicationsEdit

The Laplacian distribution has been used in speech recognition to model priors on DFT coefficients <ref>Template:Cite journal</ref> and in JPEG image compression to model AC coefficients <ref>Template:Cite journal</ref> 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.
File:Laplace Surinam.png
Fitted Laplace distribution to maximum one-day rainfalls <ref>CumFreq for probability distribution fitting</ref>
The Laplace distribution, being a composite or double distribution, is applicable in situations where the lower values originate under different external conditions than the higher ones so that they follow a different pattern.<ref>A collection of composite distributions</ref>

Random variate generationEdit

Template:Further

Given a random variable <math>U</math> drawn from the uniform distribution in the interval <math>\left(-1/2, 1/2\right)</math>, the random variable

<math>X=\mu - b\,\sgn(U)\,\ln(1 - 2|U|)</math>

has a Laplace distribution with parameters <math>\mu</math> and <math>b</math>. This follows from the inverse cumulative distribution function given above.

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

HistoryEdit

This distribution is often referred to as "Laplace's first law of errors". He published it in 1774, modeling the frequency of an error as an exponential function of its magnitude once its sign was disregarded. Laplace would later replace this model with his "second law of errors", based on the normal distribution, after the discovery of the central limit theorem.<ref name=Laplace1774>Laplace, P-S. (1774). Mémoire sur la probabilité des causes par les évènements. Mémoires de l’Academie Royale des Sciences Presentés par Divers Savan, 6, 621–656</ref><ref name=Wilson1923>Template:Cite journal Template:PD-notice</ref>

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.<ref name=Keynes1911>Template:Cite journal</ref>

See alsoEdit

ReferencesEdit

Template:Reflist

External linksEdit

Template:ProbDistributions