0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

正規分布の分散推定量の平均二乗誤差

Last updated at Posted at 2025-10-29

不偏標本分散の平均二乗誤差

 正規分布の分散$\sigma^2$の不偏推定量

s^2 = \frac{1}{N - 1}\sum_i\,(X_i - \overline{X})^2

の平均二乗誤差がどうなるかを見ていきます。

 まず、$X_1, \ldots, X_N$が独立で同一の$\text{N}(\mu,\ \sigma^2)$にしたがうとき、残差$X_i - \overline{X}$の平方和を$\frac{1}{\sigma^2}$倍したものはカイ二乗分布にしたがいます。

\frac{1}{\sigma^2}\sum_i\,(X_i - \overline{X})^2 \sim \chi^2(\nu = N - 1)

 カイ二乗分布の唯一のパラメータは自由度$\nu$です。
 この$\nu$が決まると分布の形状、ひいては期待値や分散なども決まります。楽をするために、ものの本……ではなく百科事典サイトを参照して進めることにします。

カイ二乗分布 - Wikipedia

期待値 分散
$\nu$ $2\nu$

 これを利用して、$s^2$の分散を求めます。

\begin{align}
\text{Var}(s^2) &= \text{Var}\!\left(\frac{1}{N - 1}\sum_i\,(X_i - \overline{X})^2\right) \\
&= \frac{\sigma^4}{(N - 1)^2}\text{Var}\!\left(\frac{1}{\sigma^2}\sum_i\,(X_i - \overline{X})^2\right) \\
&= 2\,(N - 1)\,\frac{\sigma^4}{(N - 1)^2} \\
&= \frac{2\sigma^4}{N - 1}
\end{align}

 続いて、平均二乗誤差は

\text{MSE}(\hat{\theta}) = \text{Var}(\hat{\theta}) + (\text{Bias}(\hat{\theta}))^2

の関係から、不偏推定量の場合は分散と等しいので、

\text{MSE}(s^2) = \frac{2\sigma^4}{N - 1}

となります。

最小平均二乗誤差推定量

 さて、$s^2$は平均二乗誤差の意味で最良の分散推定量なのでしょうか?
 他の分散推定量で平均二乗誤差がより小さいものが存在しないか検討していきます。
 あらゆる関数形を議論するのは難しいことから、

\hat{\sigma^2} = c\sum_i\,(X_i - \overline{X})^2

の形のものだけを考えます。式中の$c$は、$N$に依存してもよいとします。この中には$s^2$も含まれています。($c = \frac{1}{N-1}$の場合)

 では、$\hat{\sigma^2}$の期待値、偏り、分散を求めていきます。

\begin{align}
\text{E}(\hat{\sigma^2}) &= \text{E}\!\left(c\sum_i\,(X_i - \overline{X})^2\right) \\
&= c\sigma^2\,\text{E}\!\left(\frac{1}{\sigma^2}\sum_i\,(X_i - \overline{X})^2\right) \\
&= (N - 1)\,c\sigma^2
\end{align}
\begin{align}
\text{Bias}(\hat{\sigma^2}) &= \text{E}(\hat{\sigma^2}) - \sigma^2 \\
&= (N - 1)\,c\sigma^2 - \sigma^2 \\
&= ((N - 1)\,c - 1)\,\sigma^2
\end{align}
\begin{align}
\text{Var}(\hat{\sigma^2}) &= \text{Var}\!\left(c\sum_i\,(X_i - \overline{X})^2\right) \\
&= c^2\,\sigma^4\,\text{Var}\!\left(\frac{1}{\sigma^2}\sum_i\,(X_i - \overline{X})^2\right) \\
&= 2\,(N - 1)\,c^2\,\sigma^4
\end{align}

 続いて、平均二乗誤差を

\text{MSE}(\hat{\theta}) = \text{Var}(\hat{\theta}) + (\text{Bias}(\hat{\theta}))^2

の関係から求めます。

\begin{align}
\text{MSE}(\hat{\sigma^2}) &= \text{Var}(\hat{\sigma^2}) + (\text{Bias}(\hat{\sigma^2}))^2 \\
&= 2\,(N - 1)\,c^2\,\sigma^4 + (((N - 1)\,c - 1)\,\sigma^2)^2 \\
&= (2\,(N - 1)\,c^2 + ((N - 1)\,c - 1)^2)\,\sigma^4 \\
&= (2\,(N - 1)\,c^2 + (N - 1)^2\,c^2 - 2\,(N - 1)\,c + 1)\,\sigma^4 \\
&= ((N + 1)\,(N - 1)\,c^2 - 2\,(N - 1)\,c + 1)\,\sigma^4
\end{align}

 これは$c$の二次式で下に凸とわかります。つまり、平均二乗誤差を最小化する$c$が存在するので、この$c$を求めます。

\frac{\partial (((N + 1)\,(N - 1)\,c^2 - 2\,(N - 1)\,c + 1)\,\sigma^4)}{\partial c} = 0

を解くと、

(2\,(N + 1)\,(N - 1)\,c - 2\,(N - 1))\,\sigma^4 = 0
2\,(N + 1)\,(N - 1)\,c = 2\,(N - 1)
c = \frac{1}{N + 1}

となります。

 よって、正規分布の分散$\sigma^2$の最小平均二乗誤差推定量は

\hat{\sigma^2} = \frac{1}{N + 1}\sum_i\,(X_i - \overline{X})^2

のようになります。

 確かに、上の$\hat{\sigma^2}$の平均二乗誤差は、

\begin{align}
\text{MSE}(\hat{\sigma^2}) &= \left(\frac{N - 1}{N + 1} - 2\,\frac{N - 1}{N + 1} + 1\right)\sigma^4 \\
&= \frac{2\sigma^4}{N + 1}
\end{align}

となり、

\text{MSE}(s^2) = \frac{2\sigma^4}{N - 1}

よりも小さくなっています。この$\hat{\sigma^2}$と$s^2$は、推定量の平均二乗誤差の記事で触れた、分散が小さい偏った推定量と分散が大きい不偏推定量で前者の平均二乗誤差が小さい場合の一例といえます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?