Condition on the training covariates, and let . The fresh response has the same marginal distribution as and is independent of the complete training response vector, hence independent of . Assume the relevant second moments are finite. Expanding the squared errors gives
The first expectation averages over both training and new responses; the second averages over training responses only. Subtracting cancels both second-moment terms, leaving
Averaging over the design points proves the covariance formula for prediction optimism:
No linear fitting rule or Gaussian noise assumption is needed. The difference arises because a training response and its fitted value are dependent, whereas a fresh response and the fitted value are independent. Ordinary fitting often makes those covariances positive and the training error too favorable, explaining the name prediction optimism.
For example, if is a fixed linear smoother and , then . Thus
This links the optimism correction to effective degrees of freedom. For a data-selected fitting operator, its realized trace alone does not generally give the covariance penalty, since selecting the model uses the responses too.
Prediction optimism 2026-10-14
Prediction optimism is the difference between expected squared prediction error on new independent responses at the training covariates and expected training error. Reusing responses to fit and assess a model tends to make training error too favorable. The covariance formula for prediction optimism measures this reuse without assuming a linear fitting rule.