Laplace Distribution
Definition1
For $\mu \in \mathbb{R}$ and $b > 0$, a continuous probability distribution $\operatorname{Laplace}(\mu, b)$ with the following probability density function is called the Laplace distribution.
$$ 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 - \mu |$ instead of a square, giving it a sharper shape. Near $0$, the Laplace distribution decreases much more rapidly, while farther from $0$, the normal distribution decreases more rapidly.
Relationship with the Exponential Distribution
Particularly when $\mu = 0$ and $b = 1$ in the Laplace distribution, it coincides with the exponential distribution $\frac{1}{2} \exp(1)$ when $x \ge 0$. It can be seen as an extension of the exponential distribution defined in $x \ge 0$ to $x \in \mathbb{R}$. If $X \sim \operatorname{Laplace}(0, b)$, then $|X| \sim \exp(b^{-1})$.
Basic Properties
Moment Generating Function
The moment generating function for the Laplace distribution is given by:
$$ m(t) = \dfrac{1}{1 - t^{2}b^{2}}\exp(\mu t) \qquad \text{for } |t| < \dfrac{1}{b} $$
Mean and Variance
If $X \sim \operatorname{Laplace}(\mu, b)$, then
$$ E(X) = \mu $$ $$ \Var(X) = 2b^{2} $$
Maximum Likelihood Estimator
Suppose that a random sample $\mathbf{X} := \left( X_{1} , \cdots , X_{n} \right) \sim \operatorname{Laplace}(\mu, b)$ is given.
The maximum likelihood estimator for $(\mu, b)$ is as follows:
$$ \hat{\mu} = \text{median}(\mathbf{x}_{1}, \cdots, \mathbf{x}_{n}) $$
$$ \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)
Hogg et al. (2018). Introduction to Mathematical Statistcs(8th Edition): p77 ↩︎