Statistical Inference, Estimation, and the Bias-Variance Decomposition
What an estimator is, why maximum likelihood is the workhorse, and the single decomposition that governs every model you will ever fit.
Leads to: Bias-variance recurs in regression (11.2), model selection (11.3), and regularization (11.4).
Learning Objectives
Click a status chip to cycle: Not started → In progress → Studied → Practiced → Needs review → Mastered.
- Define an estimator and distinguish its bias, variance, and mean-squared error.
- Derive the maximum-likelihood estimator for the Gaussian mean and variance.
- Prove the bias-variance decomposition of mean-squared error.
- Interpret the prediction-error decomposition and its irreducible-noise floor.
- Explain why an unbiased estimator is not always the one to prefer.
Key Vocabulary
- Estimator
- A function \(\hat\theta=T(X_1,\dots,X_n)\) of the data used to approximate an unknown parameter; itself a random variable.
- Bias
- The systematic error \(\E[\hat\theta]-\theta\); zero bias means correct on average across resamples.
- Variance of an estimator
- The spread \(\Var(\hat\theta)\) of the estimate across hypothetical repeated samples.
- Mean-squared error
- Expected squared distance to the truth, \(\E[(\hat\theta-\theta)^2]\); the standard risk under squared loss.
- Likelihood
- The data density viewed as a function of the parameter, \(L(\theta)=\prod_i f(x_i;\theta)\); the MLE maximizes it.
- Consistency
- A sequence of estimators with \(\hat\theta_n\to\theta\) in probability as \(n\to\infty\).
- Irreducible error
- The noise variance \(\sigma^2\) that no model can remove; the floor of prediction error.
Intuition & Motivation
Maximum likelihood is the default recipe because it asks a clean question: which parameter value would have made the data I actually saw most probable? Under mild conditions it is consistent and, asymptotically, as precise as any unbiased estimator can be. But ‘asymptotically optimal’ is a promise about large samples and correct models - two things financial data rarely grant.
Estimators as random variables
Fix an unknown parameter \(\theta\) (a mean return, a volatility, a beta). An estimator \(\hat\theta\) is any function of the sample. Its quality is judged by its sampling distribution - how it behaves across the many samples you could have drawn. Three summaries dominate:
Maximum likelihood, concretely
Given data \(x_1,\dots,x_n\) from a density \(f(\cdot;\theta)\), the likelihood is \(L(\theta)=\prod_i f(x_i;\theta)\). We maximize its logarithm (sums beat products for calculus and numerics):
Unbiased is not the same as good
The bias of \(\hat\sigma^2\) is \(\E[\hat\sigma^2]-\sigma^2=-\sigma^2/n\). The classic fix divides by \(n-1\) to get the unbiased \(s^2\). Yet \(s^2\) has larger MSE than a slightly-biased alternative for Gaussian data: shrinking the estimate toward zero trades a little bias for a bigger variance reduction. This is the first appearance of a theme - deliberately accepting bias to cut variance - that drives ridge and lasso in 11.4.
From parameters to predictions
In supervised learning the target is a prediction \(\hat f(x)\) of a response \(Y=f(x)+\varepsilon\) with \(\E[\varepsilon]=0,\ \Var(\varepsilon)=\sigma^2\). Averaging over both the noise and the training set that produced \(\hat f\), the expected squared prediction error at a fixed \(x\) decomposes as
Interactive: watch bias and variance trade off
- Reporting a point estimate with no sense of its sampling variability - a number without a standard error is not inference.
- Believing ‘unbiased’ means ‘best’; MSE, not bias, is what usually matters for prediction.
- Using the \(n\)-divisor MLE variance and then plugging it into a \(t\)-statistic that assumes the \(n-1\) version.
- Forgetting the irreducible \(\sigma^2\): no amount of modeling removes it, and pretending otherwise is how overfit backtests are born.
- Always ask ‘variance across what?’ - across resampled histories, across bootstraps, across folds. Name the resampling and the standard error follows.
- In low signal-to-noise regimes (returns), a slightly biased, lower-variance estimator usually wins out of sample. Shrink on purpose.
- MLE is asymptotically efficient if the model is correct; under fat tails, robust or quasi-MLE estimators can beat it badly.
- Report MSE, not just bias or variance, when comparing estimators - it is the quantity that actually decomposes.
Knowledge Check
Practical Exercise
Let \(X_1,\dots,X_n\sim\Normal(\mu,\sigma^2)\) i.i.d. Consider the family \(\hat\sigma^2_c=c\sum_i(X_i-\bar X)^2\). (a) For which \(c\) is it unbiased? (b) Using \(\Var(\sum(X_i-\bar X)^2)=2(n-1)\sigma^4\), find the \(c\) minimizing MSE. (c) Comment on which is larger.
(a) Since \(\E[\sum(X_i-\bar X)^2]=(n-1)\sigma^2\), unbiasedness needs \(c=1/(n-1)\) (the usual \(s^2\)).
(b) Let \(S=\sum(X_i-\bar X)^2\), so \(\E[S]=(n-1)\sigma^2\), \(\Var(S)=2(n-1)\sigma^4\), hence \(\E[S^2]=\Var(S)+\E[S]^2=(n^2-1)\sigma^4\). Then \(\text{MSE}(c)=\E[(cS-\sigma^2)^2]=c^2\E[S^2]-2c\sigma^2\E[S]+\sigma^4\). Setting the derivative to zero: \(c^\star=\dfrac{\sigma^2\E[S]}{\E[S^2]}=\dfrac{(n-1)}{(n^2-1)}=\dfrac1{n+1}.\)
(c) \(1/(n+1)\lt 1/(n-1)\): the minimum-MSE estimator shrinks harder than the unbiased one. Accepting a small downward bias buys a larger variance reduction - the recurring lesson of this phase.
Lesson Summary
Formula Sheet Additions
- Did I report a standard error, not just a point estimate?
- Did I state what the variance is taken over (resamples/folds/bootstrap)?
- Did I check whether an unbiased estimator actually has lower MSE than a shrunk one?
- Did I acknowledge the irreducible \(\sigma^2\) floor rather than modeling into it?
Retrieval Practice
Close the lesson and answer from memory before checking. This is deliberate, effortful recall - the single highest-yield study action.
A: \(\text{MSE}=\text{bias}^2+\Var\). Expanding around \(\mu=\E[\hat\theta]\), the cross term is proportional to \(\E[\hat\theta-\mu]=0\).
A: It divides by \(n\) and reuses \(\bar x\) for \(\mu\), so \(\E[\hat\sigma^2]=\tfrac{n-1}{n}\sigma^2\), a bias of \(-\sigma^2/n\).
A: It can have strictly lower MSE: a small bias may buy a large variance reduction, as with shrinkage estimators.
Flashcards
Click to flip. These feed the site-wide spaced-repetition queue.
Completion Checklist
- I can explain the core ideas in my own words
- I worked the derivations/examples by hand
- I completed the interactive workbench(es)
- I passed the knowledge check
Source References
This lesson synthesizes and paraphrases concepts from the sources below. No copyrighted text, problem sets, or solutions are reproduced. Return to the originals for full depth.
- The Elements of Statistical Learning (Hastie, Tibshirani & Friedman, 2nd ed.) current - ESL 2, 7 - Ch. 2 (statistical decision theory, EPE) and Ch. 7 (bias, variance, and model complexity).
- Probability: Theory and Examples (Rick Durrett, 5th ed.) current - Durrett 2 - Weak law of large numbers and moment computations underlying estimator consistency.