Consider fixed-design regression () with independent noise and , and let be any fitted predictor. How do you prove that the expected in-sample optimism equals , and how does this simplify to for rank- ordinary least squares (giving Mallows' )?
Foundations, Model selection
Level L5 Expert. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can derive the covariance formula for training-error optimism from first principles and specialise it to linear smoothers and OLS.
Key idea
Training error uses the same twice (to fit and to evaluate it), creating a downward bias relative to fresh responses ; for linear smoothers , .
Steps
- Define both errors: let be the training MSE, and let be an independent copy of the response at the same fixed input , so .
- Expand the expected in-sample error for coordinate : since has zero mean and is independent of ,
- Expand the expected training error for coordinate : write to obtain
- Subtract to get the optimism: because , the cross term simplifies without assuming is unbiased: . Averaging over yields
- Specialise to linear smoothers (such as OLS or ridge regression, where is the smoother matrix): since , , so .
- Specialise to OLS with full-rank design matrix (): satisfies , so the optimism is . Adding an unbiased estimate gives Mallows' , which matches (up to a constant) for Gaussian linear models with known .
Common mistakes
- Assuming in Step 4: the covariance identity holds for *any* biased or non-linear estimator (including ridge, lasso and trees).
- Confusing fixed-design in-sample error (fresh at the same ) with random-design test error at unseen , which can differ when is random and is non-negligible.
How long your answer should be
One page; 8–10 minutes.
Last checked on 4 December 2026.
Read this
Previous in Foundations: How is Schwarz's Bayesian Information Criterion derived from the Bayesian marginal likelihood using Laplace's approximation?
Next in Foundations: none