Predictive error bars
Chapter 2 · The fitted line is a best guess, but the data only pin down w to within some uncertainty. That uncertainty carries into predictions: for a new year xnew, the prediction is ŵᵀxnew with variance σ² xnewᵀ(XᵀX)⁻¹xnew. The band is the prediction ± that spread.
━ fitted prediction ± 1 standard deviation (darker: ± 2) ● data
Prediction: s
Standard deviation: s
± 2 standard deviations:
The variance of the prediction is σ² xnewᵀ(XᵀX)⁻¹xnew = xnewᵀ cov{ŵ} xnew, with σ² replaced by its fitted value. It is smallest near the middle of the data and grows as you move away, because there the line could tilt a little and move the prediction a lot. Raising the polynomial order lets the fit follow the data more closely but leaves the parameters less well determined, so the band widens, especially beyond the last Olympic year.