01 / 21

Loss Functions &
Decision Theory

A rigorous introduction to the decision-theoretic framework: how loss functions quantify estimation error and guide the choice of optimal estimators.

Statistics Graduate Level

What Is a Loss Function?

A loss function \( L(\theta, a) \) maps the true parameter \( \theta \) and an action (estimate) \( a \) to a non-negative real number measuring the penalty for choosing \( a \) when the truth is \( \theta \).

The loss function is the building block of statistical decision theory: it tells us what we pay for being wrong, and by how much.

The Decision-Theoretic Framework

State of Nature
The unknown parameter \( \theta \in \Theta \) that governs the data-generating process.
Decision Rule
An estimator \( \delta(X) \) mapping observed data \( X \) to an action \( a \in \mathcal{A} \).
Loss
\( L(\theta, \delta(X)) \) quantifies the cost of action \( \delta(X) \) when truth is \( \theta \).

From Loss to Risk

Since loss depends on the random data \( X \), we average over the sampling distribution to obtain the risk function:

The risk function \( R(\theta, \delta) \) is a function of \( \theta \): for each possible true parameter value, it tells us the average loss of the decision rule \( \delta \). An ideal estimator would have uniformly low risk across all \( \theta \).

Common Loss Functions

\( \theta - a \) Loss Squared Error Absolute Error 0-1 Loss
Squared Error
\( L = (\theta - a)^2 \): penalizes large errors heavily.
Absolute Error
\( L = |\theta - a| \): linear penalty, more robust to outliers.
0-1 Loss
\( L = \mathbf{1}(\theta \neq a) \): used in classification and hypothesis testing.

Squared Error Loss and MSE

Under squared error loss \( L(\theta, a) = (\theta - a)^2 \), the risk function becomes the mean squared error:

Frequentist vs. Bayes Risk

Frequentist Risk Bayes Risk
Definition \( R(\theta, \delta) = E_\theta[L(\theta, \delta(X))] \) \( r(\pi, \delta) = \int R(\theta, \delta)\, \pi(\theta)\, d\theta \)
Averages over Data \( X \) (for fixed \( \theta \)) Data \( X \) and prior \( \pi(\theta) \)
Result type Function of \( \theta \) Single number
Optimality Minimax: \( \inf_\delta \sup_\theta R(\theta, \delta) \) Bayes: \( \inf_\delta r(\pi, \delta) \)
Philosophy \( \theta \) is fixed but unknown \( \theta \) is random with prior \( \pi \)

Admissibility & Dominance

A decision rule \( \delta_1 \) dominates \( \delta_2 \) if \( R(\theta, \delta_1) \leq R(\theta, \delta_2) \) for all \( \theta \), with strict inequality for at least one \( \theta \). An estimator is admissible if no other rule dominates it.

\( \theta \) Risk \( \delta_1 \) (admissible) \( \delta_2 \) (dominated by \( \delta_1 \)) \( \delta_3 \) (admissible)

The Minimax Principle

A minimax decision rule \( \delta^* \) minimizes the worst-case risk over all possible parameter values:

Conservative
Guards against the worst case: nature is adversarial.
Connection to Bayes
Often the Bayes rule under the least favorable prior \( \pi^* \).

Bayes Estimator via Posterior Loss

The Bayes estimator minimizes the posterior expected loss given the observed data:

1
Squared error loss: Bayes estimator = posterior mean \( E[\theta \mid X] \).
2
Absolute error loss: Bayes estimator = posterior median.
3
0-1 loss: Bayes estimator = posterior mode (MAP estimator).

How to Apply Decision Theory

1
Specify the model: Define the parameter space \( \Theta \), data distribution \( f(x \mid \theta) \), and action space \( \mathcal{A} \).
2
Choose a loss function: Select \( L(\theta, a) \) that reflects the real-world cost of estimation errors.
3
Compute the risk: Calculate \( R(\theta, \delta) = E_\theta[L(\theta, \delta(X))] \) for candidate decision rules.
4
Choose an optimality criterion: Bayes (minimize average risk under prior), minimax (minimize worst-case risk), or admissibility.
5
Derive the optimal rule: Solve the optimization problem to find \( \delta^* \).

Example 1: Normal Mean Estimation

Setup: \( X_1, \ldots, X_n \overset{\text{iid}}{\sim} N(\theta, \sigma^2) \), squared error loss \( L(\theta, a) = (\theta - a)^2 \). Consider estimator \( \delta(X) = \bar{X} \).

Example 2: The James-Stein Surprise

Setup: \( X \sim N_p(\theta, I_p) \) with \( p \geq 3 \). Estimate \( \theta \) under total squared error loss \( L(\theta, a) = \|\theta - a\|^2 \).

Example 3: Bayes Normal-Normal

Setup: Prior \( \theta \sim N(\mu_0, \tau^2) \), likelihood \( X \mid \theta \sim N(\theta, \sigma^2) \), squared error loss.

As \( \tau^2 \to \infty \) (vague prior), \( \delta^{\pi}(X) \to X \). As \( \sigma^2 \to \infty \) (noisy data), \( \delta^{\pi}(X) \to \mu_0 \).

Common Mistakes

✕ Confusing Loss and Risk
Loss \( L(\theta, a) \) is for a single outcome. Risk \( R(\theta, \delta) \) is the expected loss averaged over the data distribution.
✕ Ignoring Admissibility
Using the MLE blindly without checking if a dominating estimator exists (e.g., James-Stein when \( p \geq 3 \)).
✕ Misapplying Minimax
Minimax protects against the worst case, but can be overly conservative. Not always the right criterion for every problem.

Summary of Key Concepts

Concept Formula / Definition Key Insight
Loss Function \( L(\theta, a) \geq 0 \) Penalty for action \( a \) when truth is \( \theta \)
Risk \( R(\theta, \delta) = E_\theta[L(\theta, \delta(X))] \) Average loss over data; function of \( \theta \)
Bayes Risk \( r(\pi, \delta) = \int R(\theta, \delta)\, \pi(\theta)\, d\theta \) Single-number summary; averages over prior
Minimax \( \min_\delta \sup_\theta R(\theta, \delta) \) Worst-case optimal; conservative
Admissibility No \( \delta' \) with \( R(\theta, \delta') \leq R(\theta, \delta) \) for all \( \theta \) Bayes rules are (usually) admissible

Question 1 of 5

Under squared error loss, the risk function \( R(\theta, \delta) \) is equal to which of the following?

Question 2 of 5

Under absolute error loss, the Bayes estimator is the:

Question 3 of 5

The James-Stein estimator dominates the MLE \( \delta(X) = X \) for \( X \sim N_p(\theta, I_p) \) under total squared error loss when:

Question 4 of 5

In the bias-variance decomposition \( \text{MSE}_\theta(\delta) = [\text{Bias}]^2 + \text{Var} \), introducing a small amount of bias can be beneficial if:

Question 5 of 5

A decision rule \( \delta \) is admissible if: