ラプラス分布
定義1
$\mu \in \mathbb{R}$と$b > 0$について, 次のような確率密度関数を持つ連続確率分布$\operatorname{Laplace}(\mu, b)$を ラプラス分布Laplace distributionという。
$$ f(x) = \dfrac{1}{2b} \exp \left( -\dfrac{|x - \mu|}{b} \right) $$
説明
正規分布との関係
正規分布に似ているが, 二乗ではなく絶対値 $| x - \mu |$があるため尖った形をしている。$0$ 近辺ではラプラス分布がはるかに急速に減少し, $0$から遠くなると正規分布がより速く減少する。
指数分布との関係
特に $\mu = 0$で, $b = 1$のラプラス分布で$x \ge 0$の場合には, 指数分布$\frac{1}{2} \exp(1)$と同じになる。$x \ge 0$で定義された指数分布を$x \in \mathbb{R}$に拡張したものと見ることができる。$X \sim \operatorname{Laplace}(0, b)$ならば, $|X| \sim \exp(b^{-1})$である。
基本性質
積率生成関数
ラプラス分布の積率生成関数は次のようである。
$$ m(t) = \dfrac{1}{1 - t^{2}b^{2}}\exp(\mu t) \qquad \text{for } |t| < \dfrac{1}{b} $$
平均と分散
$X \sim \operatorname{Laplace}(\mu, b)$のとき
$$ E(X) = \mu $$ $$ \Var(X) = 2b^{2} $$
最尤推定量
ランダムサンプル $\mathbf{X} := \left( X_{1} , \cdots , X_{n} \right) \sim \operatorname{Laplace}(\mu, b)$が与えられたとしよう。
$(\mu, b)$に対する最尤推定量$(\hat{\mu}, \hat{b})$は次のようである。
$$ \hat{\mu} = \text{median}(\mathbf{x}_{1}, \cdots, \mathbf{x}_{n}) $$
$$ \hat{b} = \dfrac{1}{n} \sum\limits_{k=1}^{n} |x_{k} - \mu| $$
視覚化
次はラプラス分布の確率密度関数をアニメーションで示すジュリアコードである。
@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 ↩︎