Tutorials › Statistical Theory I - Probability and Distribution Theory › Laplace Distribution: CDF, Quantiles, and Moments

Normal and Tail Families · Tutorial 181 of 994

Laplace Distribution: CDF, Quantiles, and Moments

Learn to work from the Laplace density to its CDF, quantiles, probabilities, and absolute moments.

Intermediate 10 min read

What You'll Learn

  • Define the location and scale parameters of the symmetric Laplace distribution.
  • Derive its piecewise CDF from the density.
  • Invert the CDF to obtain quantiles, including the median.
  • Calculate interval and tail probabilities using the CDF or density.
  • Derive absolute moments and connect them to centered variance.

The Symmetric Laplace Model

The symmetric Laplace distribution has a sharp peak at its center and exponential decay on either side. Its density is built from the distance to that center: moving one scale unit away multiplies the density by \(e^{-1}\). This structure makes the distribution straightforward to integrate, but calculations must respect the change in formula at the center.

Definition: A random variable \(X\) has a symmetric Laplace distribution with location \(\mu\in\mathbb{R}\) and scale \(b>0\), written \(X\sim\operatorname{Laplace}(\mu,b)\), if its density is $$ f(x)=\frac{1}{2b}\exp\left(-\frac{|x-\mu|}{b}\right),\qquad -\infty<x<\infty. $$ The location \(\mu\) is the center of symmetry, and \(b\) is a positive scale parameter. The density is \(1/(2b)\exp((x-\mu)/b)\) for \(x<\mu\) and \(1/(2b)\exp(-(x-\mu)/b)\) for \(x\geq\mu\).

The density integrates to one: each side of \(\mu\) contributes one half. For example, on the right, \(\int_\mu^\infty (1/(2b))e^{-(x-\mu)/b}\,dx=1/2\), and the left-hand integral is also \(1/2\). There is no point mass at \(\mu\); the two density formulas agree there.

Deriving the CDF

The cumulative distribution function is \(F(x)=P(X\leq x)\). For \(x<\mu\), all the probability up to \(x\) lies on the left-hand exponential part of the density. For \(x\geq\mu\), it is simpler to subtract the remaining right tail from one.

Theorem: If \(X\sim\operatorname{Laplace}(\mu,b)\), then $$ F(x)= \begin{cases} \frac{1}{2}\exp\left(\frac{x-\mu}{b}\right),&x<\mu,\\[4pt] 1-\frac{1}{2}\exp\left(-\frac{x-\mu}{b}\right),&x\geq\mu. \end{cases} $$

For \(x<\mu\), integrate the density from \(-\infty\) to \(x\). For \(x\geq\mu\), integrate the density from \(x\) to infinity to get the survival probability \(P(X>x)\), then take its complement:

$$ \begin{aligned} F(x) &=\int_{-\infty}^{x}\frac{1}{2b}\exp\left(\frac{t-\mu}{b}\right)\,dt =\frac{1}{2}\exp\left(\frac{x-\mu}{b}\right), &&x<\mu,\\ 1-F(x) &=\int_x^\infty\frac{1}{2b}\exp\left(-\frac{t-\mu}{b}\right)\,dt =\frac{1}{2}\exp\left(-\frac{x-\mu}{b}\right), &&x\geq\mu. \end{aligned} $$

At the center, both branches give \(F(\mu)=1/2\). The CDF is continuous and strictly increasing, with limits zero and one at the two ends of the real line, so every probability level strictly between zero and one has a unique quantile.

Quantiles by Inverting the CDF

For \(0<p<1\), define the \(p\)-quantile \(Q(p)\) as the unique value satisfying \(F(Q(p))=p\). Because \(F(\mu)=1/2\), levels below one half use the left branch and levels above one half use the right branch.

Theorem: The quantile function of \(X\sim\operatorname{Laplace}(\mu,b)\) is $$ Q(p)= \begin{cases} \mu+b\log(2p),&0<p<\frac12,\\[4pt] \mu,&p=\frac12,\\[4pt] \mu-b\log\bigl(2(1-p)\bigr),&\frac12<p<1. \end{cases} $$

For \(p<1/2\), solve \(p=(1/2)e^{(x-\mu)/b}\): multiplying by two and taking logarithms gives \(x=\mu+b\log(2p)\). For \(p>1/2\), solve \(1-p=(1/2)e^{-(x-\mu)/b}\), which gives \(x=\mu-b\log(2(1-p))\). At \(p=1/2\), the solution is \(\mu\). The limits of \(Q(p)\) are \(-\infty\) as \(p\) decreases to zero and \(+\infty\) as \(p\) increases to one.

Worked Example: Quantiles and a Lower-Tail Probability

Let \(X\sim\operatorname{Laplace}(2,3)\). Find the 10th and 90th percentiles, and calculate \(P(X\leq -1)\).

The 10th percentile is below the location \(2\), so use the lower branch:

$$ Q(0.1)=2+3\log(0.2) \approx 2+3(-1.60944) \approx -2.82832. $$

The 90th percentile is above the location:

$$ Q(0.9)=2-3\log(0.2) \approx 2-3(-1.60944) \approx 6.82832. $$

Since \(-1<2\), evaluate the lower branch of the CDF:

$$ P(X\leq -1)=F(-1) =\frac12\exp\left(\frac{-1-2}{3}\right) =\frac12e^{-1} \approx 0.18394. $$

The two quantiles are equally far from the center, as expected from symmetry: each is about \(4.82832\) units from \(2\). The probability calculation uses the lower branch because the event boundary is left of the location.

Calculating Probabilities

For a continuous Laplace random variable and \(a<c\), the probability of an interval is \(P(a<X\leq c)=F(c)-F(a)\). Whether either endpoint is included does not change the answer, because a continuous distribution assigns probability zero to a single point. If the interval crosses \(\mu\), one may subtract CDF values or integrate the two pieces separately.

Worked Example: An Interval Crossing the Location

Let \(X\sim\operatorname{Laplace}(0,2)\). Calculate \(P(-1<X<3)\) directly from the density, splitting the integral at zero.

On \((-1,0)\), the density is \((1/4)e^{x/2}\); on \((0,3)\), it is \((1/4)e^{-x/2}\). Thus

$$ \begin{aligned} P(-1<X<3) &=\int_{-1}^{0}\frac14e^{x/2}\,dx +\int_{0}^{3}\frac14e^{-x/2}\,dx\\ &=\frac12(1-e^{-1/2})+\frac12(1-e^{-3/2})\\ &=1-\frac12(e^{-1/2}+e^{-3/2})\\ &\approx 1-\frac12(0.60653+0.22313) \approx 0.58517. \end{aligned} $$

As a check, the CDF gives \(F(3)=1-\frac12e^{-3/2}\) and \(F(-1)=\frac12e^{-1/2}\). Their difference is the same \(1-\frac12(e^{-1/2}+e^{-3/2})\).

A one-sided tail probability can also be read directly from the CDF. For \(x\geq\mu\), \(P(X>x)=\frac12e^{-(x-\mu)/b}\); for \(x<\mu\), \(P(X\leq x)=\frac12e^{(x-\mu)/b}\). These are the corresponding pieces of the same exponential form, not a single tail formula to apply indiscriminately on both sides.

Absolute Moments

Absolute moments measure powers of the distance from the center. They are useful summaries of the scale and tail behavior, and the Laplace density makes them an exact gamma integral. Define the gamma function for \(s>0\) by \(\Gamma(s)=\int_0^\infty u^{s-1}e^{-u}\,du\).

Theorem: If \(X\sim\operatorname{Laplace}(\mu,b)\), then for every real \(r>-1\), $$ E\bigl[|X-\mu|^r\bigr]=b^r\Gamma(r+1). $$ In particular, for nonnegative integers \(r\), all absolute moments are finite.

By the definition of expectation for a density, and symmetry about \(\mu\),

$$ \begin{aligned} E\bigl[|X-\mu|^r\bigr] &=\int_{-\infty}^{\infty}|x-\mu|^r \frac{1}{2b}\exp\left(-\frac{|x-\mu|}{b}\right)\,dx\\ &=\frac{1}{b}\int_0^\infty y^r e^{-y/b}\,dy. \end{aligned} $$

The second line follows by substituting \(y=\mu-x\) on the left half and \(y=x-\mu\) on the right half; each half contributes \((1/(2b))\int_0^\infty y^r e^{-y/b}\,dy\). Now set \(u=y/b\), so \(y=bu\) and \(dy=b\,du\). The integral becomes

$$ \frac{1}{b}\int_0^\infty y^r e^{-y/b}\,dy =b^r\int_0^\infty u^r e^{-u}\,du =b^r\Gamma(r+1). $$

The gamma integral is finite at infinity because of exponential decay. Near zero, its integrand behaves as \(u^r\), whose integral is finite exactly when \(r>-1\). This establishes both the formula and its stated range.

For a nonnegative integer \(k\), integration by parts in the gamma integral gives \(\Gamma(k+1)=k!\). Therefore \(E[|X-\mu|^k]=b^k k!\). For signed centered moments, symmetry gives \(E[(X-\mu)^k]=0\) for odd integers \(k\); for even \(k\), the signed moment equals the absolute moment. In particular, \(E[X]=\mu\) and \(\operatorname{Var}(X)=E[(X-\mu)^2]=2b^2\).

Worked Example: Absolute Moments and Variance

Suppose \(X\sim\operatorname{Laplace}(5,1.5)\). Find the first absolute moment about its location, the third absolute moment, and the variance.

For \(r=1\), \(\Gamma(2)=1!=1\), so

$$ E[|X-5|]=(1.5)^1\Gamma(2)=1.5. $$

For \(r=3\), \(\Gamma(4)=3!=6\), and \((1.5)^3=3.375\). Hence

$$ E[|X-5|^3]=(1.5)^3\Gamma(4)=3.375(6)=20.25. $$

For the variance, use \(r=2\), \(\Gamma(3)=2\), and the fact that the second centered signed moment equals the second absolute moment:

$$ \operatorname{Var}(X)=E[(X-5)^2] =E[|X-5|^2] =(1.5)^2\Gamma(3) =2.25(2)=4.5. $$

The standard deviation is therefore \(\sqrt{4.5}\), approximately \(2.1213\). The scale parameter \(1.5\) is not the standard deviation; the variance is twice its square.

Common Mistakes and a Practical Check

  • Using the wrong CDF branch. The formula changes at \(x=\mu\). First compare the point of interest with the location, then substitute into the appropriate branch.
  • Confusing scale and variance. For this parameterization, \(b\) is the scale and \(\operatorname{Var}(X)=2b^2\), not \(b^2\).
  • Dropping the factor of two in an absolute moment. The density has mass on both sides of the center. The two equal contributions combine to give \(1/b\) times the integral over positive distances.
  • Inverting the upper CDF branch with the wrong sign. From \(1-p=(1/2)e^{-(x-\mu)/b}\), taking logarithms yields \(x=\mu-b\log(2(1-p))\).

A useful numerical check is that the CDF is \(1/2\) at \(\mu\), the quantile at \(p=1/2\) is \(\mu\), and the quantiles at \(p\) and \(1-p\) lie equally far from \(\mu\). These checks can reveal a branch or sign error before it affects later calculations.

Check Your Understanding

Use the location-scale parameterization and show the branch or integral that supports each answer.

  1. For \(X\sim\operatorname{Laplace}(1,2)\), find \(F(-1)\).
  2. Write the 75th percentile of \(X\sim\operatorname{Laplace}(\mu,b)\) as a function of \(\mu\) and \(b\).
  3. For \(X\sim\operatorname{Laplace}(0,1)\), calculate \(P(0<X<2)\).
  4. Find \(E[|X-\mu|^4]\) for \(X\sim\operatorname{Laplace}(\mu,b)\).
  5. If a Laplace random variable has scale \(b=4\), what is its variance?