Bias, Variance
& MSE
Understanding the bias-variance decomposition of mean squared error: the fundamental tradeoff in statistical estimation.
What is an Estimator?
An estimator \(\hat{\theta}\) is a function of the data used to approximate an unknown parameter \(\theta\). Different samples produce different values of \(\hat{\theta}\), giving it a sampling distribution.
Defining Bias
The bias of an estimator measures the systematic error: the difference between the expected value of the estimator and the true parameter value.
Bias tells you whether your estimator is systematically off-target. An unbiased estimator hits the bullseye on average, even if individual estimates miss.
Defining Variance
The variance of an estimator measures how much estimates scatter around their expected value across repeated samples.
A high-variance estimator gives wildly different answers from sample to sample, even if it's unbiased. Variance tells you about consistency, not correctness of the center.
The Bullseye Analogy
Mean Squared Error: MSE
The mean squared error combines both sources of error into a single measure of estimator quality.
MSE penalizes both systematic error (bias) and random scatter (variance). It is always non-negative, and equals zero only for an estimator that always equals \(\theta\) exactly.
The Decomposition Theorem
Visualizing MSE Decomposition
Bias vs Variance: Key Distinction
| \(\text{Bias}\) | \(\text{Variance}\) | |
|---|---|---|
| Measures | Systematic error (accuracy) | Random scatter (precision) |
| Formula | \(E[\hat{\theta}] - \theta\) | \(E[(\hat{\theta} - E[\hat{\theta}])^2]\) |
| Can be negative? | Yes (can underestimate) | No (always \(\geq 0\)) |
| Enters MSE as | Squared: \([\text{Bias}(\hat{\theta})]^2\) | Directly: \(\text{Var}(\hat{\theta})\) |
| Reduced by | Better model / less restriction | More data / regularization |
The Tradeoff in Action
How to Compute MSE
Example 1: Sample Mean
Let \(X_1, \ldots, X_n \overset{\text{iid}}{\sim} (\mu, \sigma^2)\). Consider \(\hat{\mu} = \bar{X} = \frac{1}{n}\sum_{i=1}^n X_i\) as an estimator of \(\mu\).
Example 2: Biased Variance Estimator
Consider \(\hat{\sigma}^2_{\text{MLE}} = \frac{1}{n}\sum_{i=1}^n(X_i - \bar{X})^2\) as an estimator of \(\sigma^2\) from a normal population.
Example 3: Comparing Two Estimators
Let \(X_1, \ldots, X_n \overset{\text{iid}}{\sim} \text{Uniform}(0, \theta)\). Compare two estimators of \(\theta\):
Var: \(\frac{\theta^2}{3n}\)
MSE: \(\frac{\theta^2}{3n}\)
Var: \(\frac{\theta^2}{n(n+2)}\)
MSE: \(\frac{\theta^2}{n(n+2)}\)
Common Mistakes
Summary at a Glance
| Concept | Formula | Meaning |
|---|---|---|
| \(\text{Bias}\) | \(E[\hat{\theta}] - \theta\) | Systematic error |
| \(\text{Variance}\) | \(E[(\hat{\theta} - E[\hat{\theta}])^2]\) | Random scatter |
| \(\text{MSE}\) | \(E[(\hat{\theta} - \theta)^2]\) | Total expected error |
| Decomposition | \([\text{Bias}(\hat{\theta})]^2 + \text{Var}(\hat{\theta})\) | Tradeoff identity |
| Unbiased \(\text{MSE}\) | \(\text{Var}(\hat{\theta})\) | MSE = Var when bias = 0 |
Question 1 of 5
The bias-variance decomposition states that \(\text{MSE}\) equals:
Question 2 of 5
If \(\hat{\theta}\) is an unbiased estimator of \(\theta\), then its \(\text{MSE}\) equals:
Question 3 of 5
An estimator has \(\text{Bias} = 3\) and \(\text{Var} = 16\). What is its \(\text{MSE}\)?
Question 4 of 5
Estimator A is unbiased with \(\text{Var} = 20\). Estimator B has \(\text{Bias} = 2\) and \(\text{Var} = 10\). Which has lower \(\text{MSE}\)?
Question 5 of 5
The MLE of the population variance divides by \(n\) instead of \(n-1\). This estimator is: