logo

Laplace Distribution 📂Probability Distribution

Laplace Distribution

Definition1

For μR\mu \in \mathbb{R} and b>0b > 0, a continuous probability distribution Laplace(μ,b)\operatorname{Laplace}(\mu, b) with the following probability density function is called the Laplace distribution.

f(x)=12bexp(xμb) f(x) = \dfrac{1}{2b} \exp \left( -\dfrac{|x - \mu|}{b} \right)

Explanation

Relationship with the Normal Distribution

Although it looks similar to the normal distribution, it has an absolute value xμ| x - \mu | instead of a square, giving it a sharper shape. Near 00, the Laplace distribution decreases much more rapidly, while farther from 00, the normal distribution decreases more rapidly.

Relationship with the Exponential Distribution

Particularly when μ=0\mu = 0 and b=1b = 1 in the Laplace distribution, it coincides with the exponential distribution 12exp(1)\frac{1}{2} \exp(1) when x0x \ge 0. It can be seen as an extension of the exponential distribution defined in x0x \ge 0 to xRx \in \mathbb{R}. If XLaplace(0,b)X \sim \operatorname{Laplace}(0, b), then Xexp(b1)|X| \sim \exp(b^{-1}).

Basic Properties

Moment Generating Function

The moment generating function for the Laplace distribution is given by:

m(t)=11t2b2exp(μt)for t<1b m(t) = \dfrac{1}{1 - t^{2}b^{2}}\exp(\mu t) \qquad \text{for } |t| < \dfrac{1}{b}

Mean and Variance

If XLaplace(μ,b)X \sim \operatorname{Laplace}(\mu, b), then

E(X)=μ E(X) = \mu Var(X)=2b2 \Var(X) = 2b^{2}

Maximum Likelihood Estimator

Suppose that a random sample X:=(X1,,Xn)Laplace(μ,b)\mathbf{X} := \left( X_{1} , \cdots , X_{n} \right) \sim \operatorname{Laplace}(\mu, b) is given.

The maximum likelihood estimator for (μ,b)(\mu, b) is as follows:

μ^=median(x1,,xn) \hat{\mu} = \text{median}(\mathbf{x}_{1}, \cdots, \mathbf{x}_{n})

b^=1nk=1nxkμ \hat{b} = \dfrac{1}{n} \sum\limits_{k=1}^{n} |x_{k} - \mu|

Visualization

The following is a Julia code snippet illustrating the probability density function of the Laplace distribution as a GIF.

@time using LaTeXStrings
@time using Distributions
@time using Plots

cd(@__DIR__)

x = -10:0.1:10
B = collect(0.1:0.1:5.0); append!(B, reverse(B))

animation = @animate for b ∈ B
    plot(x, pdf.(Laplace(0, b), x),
     color = :black,
     label = "b = $(round(b, digits = 2))", size = (400,300))
    xlims!(-10,10); ylims!(0,1); title!(L"\mathrm{pdf\,of\,} \operatorname{Laplace}(0, b)")
end
gif(animation, "pdf.gif", fps = 15)

plot(x, pdf.(Laplace(0, 1), x), lw=2, label="Laplace(0, 1)", color=:royalblue, dpi=200)
plot!(x, pdf.(Normal(0, 1), x), lw=2, label="Normal(0, 1)", color=:tomato)

  1. Hogg et al. (2018). Introduction to Mathematical Statistcs(8th Edition): p77 ↩︎