추정량 평가 방법 (Methods of Evaluating Estimators)

MSE, 편향-분산 분해, Cramer-Rao 하한, Rao-Blackwell 정리, UMVUE, 손실함수 최적성

추정량을 평가하는 핵심 도구를 심층적으로 다룬다. MSE와 편향-분산 분해의 원리, Cramer-Rao 부등식의 증명과 피셔 정보, Rao-Blackwell 정리에 의한 추정량 개선, 완비충분통계량과 UMVUE의 관계, 그리고 손실함수 기반 의사결정 이론의 기초까지 Casella & Berger Ch.7.3의 핵심을 상세히 정리한다.

Statistics
저자

Kwangmin Kim

공개

2026년 04월 02일

1 개요

점추정 개요에서 추정량 평가의 전체 구조를 요약했고, 추정량 탐색 방법에서 후보 추정량을 찾는 방법을 다루었다. 이 포스트에서는 추정량 평가 방법(Methods of Evaluating Estimators) 을 심층적으로 다룬다 (Casella & Berger, 2002, Ch.7.3).

여러 방법으로 찾은 추정량 후보 중 어떤 것이 가장 좋은가를 판단해야 한다. 적률법, MLE, 베이즈 추정이 서로 다른 추정량을 산출할 때, 체계적인 비교 기준이 필요하다.

평가 도구 역할 핵심 질문
MSE 추정량의 전체적 성능 측정 평균적으로 얼마나 정확한가?
Cramer-Rao 하한 분산의 이론적 하한 제공 분산이 이보다 작아질 수 있는가?
Rao-Blackwell 추정량 개선 메커니즘 충분통계량으로 분산을 줄일 수 있는가?
Lehmann-Scheffe UMVUE 보장 이것이 비편향 중 최선인가?
손실함수 일반화된 평가 프레임워크 어떤 기준으로 “좋다”를 정의하는가?

2 평균제곱오차 (Mean Squared Error)

2.1 정의와 분해

정의 7.3.1: 평균제곱오차

추정량 \(W\) 의 모수 \(\theta\) 에 대한 MSE는

\[ \text{MSE}_\theta(W) = E_\theta[(W - \theta)^2] \]

정의 7.3.2: 편향

추정량 \(W\) 의 편향은 \(\text{Bias}_\theta(W) = E_\theta[W] - \theta\) 이다. \(\text{Bias}_\theta(W) = 0\) (모든 \(\theta\))이면 비편향(unbiased) 이라 한다.

MSE는 편향-분산 분해(bias-variance decomposition) 로 나뉜다:

\[ \text{MSE}_\theta(W) = \text{Var}_\theta(W) + [\text{Bias}_\theta(W)]^2 \]

증명:

\[ \begin{aligned} E[(W-\theta)^2] &= E[(W - EW + EW - \theta)^2] \\ &= E[(W-EW)^2] + 2E[(W-EW)](EW-\theta) + (EW-\theta)^2 \\ &= \text{Var}(W) + 0 + \text{Bias}^2 \end{aligned} \]

비편향 추정량에서는 \(\text{MSE} = \text{Var}\) 이다.

2.2 예시: 정규분포에서 \(\sigma^2\) 의 추정

\(X_1, \ldots, X_n \overset{\text{iid}}{\sim} N(\mu, \sigma^2)\) 에서 두 추정량을 비교한다:

추정량 편향 분산 MSE
\(S^2 = \frac{1}{n-1}\sum(X_i-\bar{X})^2\) \(0\) \(\frac{2\sigma^4}{n-1}\) \(\frac{2\sigma^4}{n-1}\)
\(\hat{\sigma}^2 = \frac{1}{n}\sum(X_i-\bar{X})^2\) \(-\frac{\sigma^2}{n}\) \(\frac{2(n-1)\sigma^4}{n^2}\) \(\frac{(2n-1)\sigma^4}{n^2}\)

\(\hat{\sigma}^2\) (MLE)는 편향이 있지만, MSE가 \(S^2\) 보다 항상 작다:

\[ \frac{2n-1}{n^2} < \frac{2}{n-1} \quad \text{for all } n \geq 2 \]

편향을 도입하는 대가로 분산을 더 크게 줄여 총 MSE가 개선된 것이다. 이것이 편향-분산 트레이드오프의 핵심이다.

주의: MSE가 작다고 해서 반드시 좋은 추정량은 아니다. 위치 모수에서 MSE는 합리적이지만, 척도 모수에서는 과소추정과 과대추정을 동일하게 벌점화하는 것이 부자연스러울 수 있다.

2.3 MSE의 한계: 한 추정량이 모든 곳에서 이길 수는 없다

MSE는 \(\theta\) 의 함수이므로, 두 추정량의 MSE가 교차할 수 있다 — \(\theta\) 의 일부 값에서는 \(W_1\) 이 나으나 다른 값에서는 \(W_2\) 가 나을 수 있다. 모든 \(\theta\) 에서 동시에 가장 작은 MSE를 가지는 추정량은 일반적으로 존재하지 않는다.


3 Cramer-Rao 부등식 (Information Inequality)

3.1 정리와 증명

정리 7.3.9: Cramer-Rao 부등식

\(X_1, \ldots, X_n\) 의 pdf \(f(\mathbf{x}|\theta)\) 가 정칙 조건을 만족하고, \(W(\mathbf{X})\)\(\text{Var}_\theta(W) < \infty\) 이며 미적분 교환 조건 \(\frac{d}{d\theta}E_\theta W(\mathbf{X}) = \int \frac{\partial}{\partial\theta}[W(\mathbf{x})f(\mathbf{x}|\theta)]d\mathbf{x}\) 을 만족하면

\[ \text{Var}_\theta(W(\mathbf{X})) \geq \frac{\left(\frac{d}{d\theta}E_\theta W(\mathbf{X})\right)^2}{E_\theta\left[\left(\frac{\partial}{\partial\theta}\log f(\mathbf{X}|\theta)\right)^2\right]} \]

\(W\)\(\tau(\theta)\) 의 비편향 추정량이면 \(E_\theta W = \tau(\theta)\) 이므로 분자가 \([\tau'(\theta)]^2\) 이 된다.

증명: Cauchy-Schwarz 부등식 \([\text{Cov}(X,Y)]^2 \leq \text{Var}(X)\text{Var}(Y)\) 의 응용이다.

핵심 관찰: 스코어 함수 \(S(\theta) = \frac{\partial}{\partial\theta}\log f(\mathbf{X}|\theta)\) 에 대해

\[ E_\theta[S(\theta)] = 0 \]

이것은 \(\int f(\mathbf{x}|\theta)d\mathbf{x} = 1\) 의 양변을 \(\theta\) 에 대해 미분하면 나온다.

따라서

\[ \text{Cov}_\theta(W, S) = E_\theta[W \cdot S] - E_\theta[W] \cdot \underbrace{E_\theta[S]}_{=0} = E_\theta[W \cdot S] = \frac{d}{d\theta}E_\theta W \]

마지막 등호는 \(E_\theta[W \cdot S] = \int W(\mathbf{x}) \frac{\partial}{\partial\theta}f(\mathbf{x}|\theta) d\mathbf{x} \cdot \frac{1}{f} \cdot f = \frac{d}{d\theta}\int W(\mathbf{x})f(\mathbf{x}|\theta)d\mathbf{x}\) 에서 나온다.

Cauchy-Schwarz에 의해

\[ \text{Var}(W) \geq \frac{[\text{Cov}(W, S)]^2}{\text{Var}(S)} = \frac{\left(\frac{d}{d\theta}E_\theta W\right)^2}{E_\theta[S^2]} \]

\(\text{Var}(S) = E[S^2]\)\(E[S] = 0\) 이기 때문이다. \(\square\)

3.2 피셔 정보 (Fisher Information)

피셔 정보

\[ I(\theta) = E_\theta\!\left[\left(\frac{\partial}{\partial\theta}\log f(X|\theta)\right)^2\right] = -E_\theta\!\left[\frac{\partial^2}{\partial\theta^2}\log f(X|\theta)\right] \]

두 번째 등호는 지수족 등 미적분 교환이 가능한 경우 성립한다 (Lemma 7.3.11).

iid 표본에서는 \(I_n(\theta) = nI(\theta)\) 이므로, Cramer-Rao 하한은

\[ \text{Var}_\theta(W) \geq \frac{[\tau'(\theta)]^2}{nI(\theta)} \]

해석: \(I(\theta)\) 는 하나의 관측값이 \(\theta\) 에 대해 제공하는 정보량이다. 정보가 많을수록(\(I\) 가 클수록) 분산의 하한이 작아진다.

3.3 예시: 포아송 분포

\(X_1, \ldots, X_n \overset{\text{iid}}{\sim} \text{Poisson}(\lambda)\) 에서 \(\lambda\) 의 비편향 추정량 \(W\) 에 대해

\[ I(\lambda) = -E\!\left[\frac{\partial^2}{\partial\lambda^2}(-\lambda + X\log\lambda - \log X!)\right] = -E\!\left[-\frac{X}{\lambda^2}\right] = \frac{1}{\lambda} \]

따라서 \(\text{Var}_\lambda(W) \geq \lambda/n\). \(\bar{X}\)\(\text{Var}(\bar{X}) = \lambda/n\) 이므로 Cramer-Rao 하한을 정확히 달성한다 — \(\bar{X}\)\(\lambda\)최선 비편향 추정량(UMVUE) 이다.

3.4 Cramer-Rao 하한의 한계

  • 정칙 조건이 필요하다 — \(\text{Uniform}(0, \theta)\) 에서는 적용 불가 (지지가 \(\theta\) 에 의존)
  • 하한이 달성 불가능할 수 있다 — \(N(\mu, \sigma^2)\) 에서 \(\sigma^2\) 의 비편향 추정량 \(S^2\) 는 하한을 달성하지 못한다
  • 등호 조건: \(a(\theta)[W(\mathbf{x}) - \tau(\theta)] = \frac{\partial}{\partial\theta}\log L(\theta|\mathbf{x})\) — 지수족에서 자연 모수의 경우에만 달성

4 Rao-Blackwell 정리 (충분성과 비편향성의 결합)

Cramer-Rao가 “하한”을 제공한다면, Rao-Blackwell은 “개선 방법”을 제공한다.

정리 7.3.17: Rao-Blackwell

\(W\)\(\tau(\theta)\) 의 비편향 추정량이고, \(T\)\(\theta\) 에 대한 충분통계량이면

\[ \phi(T) = E[W \mid T] \]

는 다음을 만족한다:

  • \(E_\theta[\phi(T)] = \tau(\theta)\) — 비편향성 유지
  • \(\text{Var}_\theta(\phi(T)) \leq \text{Var}_\theta(W)\) — 분산 감소

증명: 반복기댓값 법칙과 전분산 공식을 사용한다.

비편향성: \(E_\theta[\phi(T)] = E_\theta[E[W|T]] = E_\theta[W] = \tau(\theta)\)

분산 감소:

\[ \text{Var}_\theta(W) = \text{Var}_\theta(E[W|T]) + E_\theta[\text{Var}(W|T)] = \text{Var}_\theta(\phi(T)) + \underbrace{E_\theta[\text{Var}(W|T)]}_{\geq 0} \]

따라서 \(\text{Var}_\theta(\phi(T)) \leq \text{Var}_\theta(W)\). \(\square\)

\(\phi(T) = E[W|T]\)\(\theta\) 에 무관한 이유: \(T\) 가 충분통계량이므로 \(W|T\) 의 분포가 \(\theta\) 에 무관하고, \(W\) 는 표본의 함수이므로 \(\phi(T)\)\(\theta\) 에 무관한 표본의 함수이다.

4.1 비충분통계량에 조건화하면?

반복기댓값과 전분산 공식은 모든 통계량에 적용된다. 그러나 비충분통계량에 조건화하면 \(E[W|U]\)\(\theta\) 에 의존하여 추정량이 아닐 수 있다.

예시: \(X_1, X_2 \overset{\text{iid}}{\sim} N(\theta, 1)\), \(W = \bar{X}\), \(U = X_1\) (비충분)

\[ E[\bar{X}|X_1] = \frac{1}{2}X_1 + \frac{1}{2}E[X_2|X_1] = \frac{1}{2}X_1 + \frac{1}{2}\theta \]

\(\theta\) 에 의존하므로 추정량이 아니다.


5 UMVUE와 Lehmann-Scheffe 정리

5.1 UMVUE의 유일성

정리 7.3.19: UMVUE의 유일성

\(\tau(\theta)\) 의 UMVUE가 존재하면, 유일하다.

증명 스케치: \(W\)\(W'\) 가 모두 UMVUE이면 \(W^* = (W+W')/2\) 도 비편향이고, Cauchy-Schwarz에 의해 \(\text{Var}(W^*) \leq \text{Var}(W)\). 등호 조건에서 \(W = W'\) 가 따라온다.

5.2 완비충분통계량과 UMVUE

정리 7.3.23: Lehmann-Scheffe

\(T\)\(\theta\) 에 대한 완비충분통계량(complete sufficient statistic) 이고, \(\phi(T)\)\(T\) 만의 함수인 비편향 추정량이면, \(\phi(T)\)\(\tau(\theta) = E[\phi(T)]\)유일한 UMVUE 이다.

이 정리가 강력한 이유: 완비충분통계량이 존재하면, \(\tau(\theta)\)아무 비편향 추정량을 찾아 충분통계량에 조건화하면 UMVUE가 자동으로 구해진다.

5.3 UMVUE를 찾는 절차

1. 충분통계량 T를 찾는다 (인수분해 정리)
2. T가 완비인지 확인한다 (지수족 → 자동)
3. τ(θ)의 비편향 추정량 W를 아무거나 찾는다
4. φ(T) = E[W | T] 를 계산한다
5. φ(T)가 유일한 UMVUE이다

5.4 예시: 균등분포 \(\text{Uniform}(0, \theta)\)

\(Y = \max(X_1, \ldots, X_n)\) 은 완비충분통계량이다. \(E[Y] = \frac{n}{n+1}\theta\) 이므로

\[ \phi(Y) = \frac{n+1}{n}Y \]

\(\theta\) 의 UMVUE이다. \(\text{Var}(\phi(Y)) = \frac{\theta^2}{n(n+2)}\) 이다.

이 분포는 정칙 조건을 만족하지 않으므로 Cramer-Rao 하한이 적용되지 않는다. 그러나 Lehmann-Scheffe를 통해 UMVUE를 찾을 수 있다 — 완비성은 Cramer-Rao보다 더 넓은 범위에서 적용 가능하다.


6 손실함수와 의사결정 이론

6.1 일반적 프레임워크

MSE는 제곱 손실함수 \(L(\theta, a) = (\theta - a)^2\) 의 위험함수(risk function)이다. 더 일반적으로:

\[ R(\theta, \delta) = E_\theta[L(\theta, \delta(\mathbf{X}))] \]

  • \(\delta(\mathbf{X})\): 결정 함수(추정량)
  • \(L(\theta, a)\): 손실함수 — 참값 \(\theta\) 일 때 \(a\) 를 선택하는 비용
  • \(R(\theta, \delta)\): 위험함수 — 손실의 기대
손실함수 \(L(\theta, a)\) \(R(\theta, \delta)\) 최적 베이즈 추정량
제곱 손실 \((\theta-a)^2\) \(\text{MSE}_\theta(\delta)\) 사후 평균
절대 손실 \(|\theta-a|\) \(E|\delta-\theta|\) 사후 중앙값
0-1 손실 \(I(\theta \neq a)\) \(P(\delta \neq \theta)\) 사후 최빈값

6.2 허용성 (Admissibility)

정의: 허용 추정량

추정량 \(\delta\)허용(admissible) 이란, 모든 \(\theta\) 에서 \(R(\theta, \delta') \leq R(\theta, \delta)\) 이고 어떤 \(\theta_0\) 에서 \(R(\theta_0, \delta') < R(\theta_0, \delta)\) 인 추정량 \(\delta'\) 가 존재하지 않는 것이다.

비허용 추정량은 다른 추정량에 의해 모든 곳에서 지배되므로, 사용할 이유가 없다. 그러나 허용 추정량 사이의 선택은 여전히 주관적이다.

6.3 미니맥스 원칙

\[ \delta_{\text{minimax}} = \arg\min_\delta \max_\theta R(\theta, \delta) \]

최악의 경우를 최소화하는 추정량이다. 보수적인 전략이며, 빈도주의적 최적성 기준 중 하나이다.


7 핵심 도구의 관계 요약

\[ \boxed{\text{Cramer-Rao}} \xrightarrow{\text{하한 제공}} \boxed{\text{효율적 추정량}} \xleftarrow{\text{달성 여부}} \boxed{\text{Rao-Blackwell + Lehmann-Scheffe}} \]

도구 입력 출력 적용 조건
Cramer-Rao \(f(x|\theta)\), \(\tau(\theta)\) \(\text{Var}(W) \geq B(\theta)\) 정칙 조건
Rao-Blackwell 비편향 \(W\) + 충분 \(T\) 개선된 \(\phi(T) = E[W|T]\) 충분통계량 존재
Lehmann-Scheffe 완비충분 \(T\) + 비편향 조건 유일한 UMVUE 완비충분통계량 존재
손실함수 \(L(\theta, a)\) + \(\pi(\theta)\) 베이즈 최적 추정량 사전분포 필요

데이터 축소의 원리 (Ch.6)에서 다룬 충분성과 완비성이 여기서 추론 이론의 핵심 도구로 변환된다. 충분통계량은 데이터 축소뿐 아니라, 최적 추정량 구성의 토대이다.


8 코드 예시

8.1 Step 1: 순수 Python 구현 (편향-분산 트레이드오프)

정규분포에서 \(\sigma^2\) 의 비편향 추정량 \(S^2\) 과 MLE \(\hat{\sigma}^2\) 의 MSE를 시뮬레이션으로 비교한다.

import math
import random

random.seed(42)

sigma2_true = 4.0
n_values = [5, 10, 20, 50, 100]
n_sim = 50000

print("=== sigma^2 추정: S^2 (비편향) vs MLE (편향) MSE 비교 ===")
print(f"참값: sigma^2 = {sigma2_true}\n")
print(f"{'n':>5} | {'MSE(S^2)':>10} | {'이론':>10} | {'MSE(MLE)':>10} | {'이론':>10} | {'MLE 우월':>8}")
print("-" * 70)

for n in n_values:
    mse_s2 = 0
    mse_mle = 0

    for _ in range(n_sim):
        data = [random.gauss(0, math.sqrt(sigma2_true)) for _ in range(n)]
        x_bar = sum(data) / n
        ss = sum((x - x_bar)**2 for x in data)
        s2 = ss / (n - 1)
        sigma2_hat = ss / n

        mse_s2 += (s2 - sigma2_true)**2
        mse_mle += (sigma2_hat - sigma2_true)**2

    mse_s2 /= n_sim
    mse_mle /= n_sim

    # 이론값
    mse_s2_th = 2 * sigma2_true**2 / (n - 1)
    mse_mle_th = (2*n - 1) * sigma2_true**2 / n**2

    print(f"{n:5d} | {mse_s2:10.4f} | {mse_s2_th:10.4f} | "
          f"{mse_mle:10.4f} | {mse_mle_th:10.4f} | "
          f"{'O' if mse_mle < mse_s2 else 'X':>8}")

print("\nMLE는 편향이지만 모든 n에서 MSE가 S^2보다 작다")
print("→ 편향-분산 트레이드오프의 전형적 사례")

8.2 Step 2: scipy 구현 (Cramer-Rao 하한과 UMVUE 검증)

포아송 분포에서 Cramer-Rao 하한을 계산하고, 표본평균이 이를 달성하는지 시뮬레이션으로 확인한다.

import numpy as np
from scipy.stats import poisson

np.random.seed(42)

lambda_true = 3.0
n = 20
n_sim = 50000

# Cramer-Rao 하한
fisher_info = 1 / lambda_true  # I(lambda) = 1/lambda for Poisson
crlb = lambda_true / n  # tau'(lambda)^2 / (n * I(lambda)) = 1 / (n/lambda) = lambda/n

# 시뮬레이션: 다양한 비편향 추정량의 분산
vars_xbar = []
vars_s2 = []
vars_combo = []  # a*X_bar + (1-a)*S^2

for _ in range(n_sim):
    data = poisson.rvs(lambda_true, size=n)
    vars_xbar.append(np.mean(data))
    vars_s2.append(np.var(data, ddof=1))
    # 0.7*X_bar + 0.3*S^2 도 비편향
    vars_combo.append(0.7 * np.mean(data) + 0.3 * np.var(data, ddof=1))

vars_xbar = np.array(vars_xbar)
vars_s2 = np.array(vars_s2)
vars_combo = np.array(vars_combo)

print(f"=== 포아송 분포 UMVUE 검증 ===")
print(f"lambda = {lambda_true}, n = {n}, CRLB = {crlb:.6f}\n")

estimators = {
    "X_bar (UMVUE)": vars_xbar,
    "S^2 (비편향)": vars_s2,
    "0.7*X_bar+0.3*S^2": vars_combo,
}

print(f"{'추정량':25s} | {'E[W]':>8s} | {'Var(W)':>10s} | {'CRLB 달성?':>10s}")
print("-" * 60)
for name, vals in estimators.items():
    var_est = np.var(vals)
    mean_est = np.mean(vals)
    achieves = "O" if abs(var_est - crlb) / crlb < 0.05 else "X"
    print(f"  {name:23s} | {mean_est:8.4f} | {var_est:10.6f} | {achieves:>10s}")

print(f"\nCRLB = {crlb:.6f}")
print("X_bar만 CRLB를 달성 → X_bar가 UMVUE")

# Rao-Blackwell 시뮬레이션: X_1 vs X_bar
print(f"\n=== Rao-Blackwell 시뮬레이션 ===")
print(f"W = X_1 (비편향), T = sum(X) (충분), phi(T) = X_bar (Rao-Blackwell화)\n")

mse_x1 = np.mean([(poisson.rvs(lambda_true) - lambda_true)**2
                   for _ in range(n_sim)])
mse_xbar = np.mean([(np.mean(poisson.rvs(lambda_true, size=n)) - lambda_true)**2
                     for _ in range(n_sim)])

print(f"  MSE(X_1) = {mse_x1:.4f}  (이론: {lambda_true:.4f})")
print(f"  MSE(X_bar) = {mse_xbar:.6f}  (이론: {lambda_true/n:.6f})")
print(f"  MSE 감소율: {(1 - mse_xbar/mse_x1)*100:.1f}%  (이론: {(1-1/n)*100:.1f}%)")

9 관련 주제

선행 지식

상위 주제

관련 포스트

후속 주제


10 참고 문헌

  • Casella, G. & Berger, R. L. (2002). Statistical Inference (2nd ed.). Duxbury. Chapter 7, Section 7.3.
  • Lehmann, E. L. & Casella, G. (1998). Theory of Point Estimation (2nd ed.). Springer.
  • Rao, C. R. (1945). Information and accuracy attainable in the estimation of statistical parameters. Bull. Calcutta Math. Soc., 37, 81-91.
  • Blackwell, D. (1947). Conditional expectation and unbiased sequential estimation. Ann. Math. Statist., 18, 105-110.
  • Cramer, H. (1946). Mathematical Methods of Statistics. Princeton University Press.
  • Chapman, D. G. & Robbins, H. (1951). Minimum variance estimation without regularity assumptions. Ann. Math. Statist., 22, 581-586.

Subscribe

Enjoy this blog? Get notified of new posts by email: