Confidence vs prediction intervals in regression
A confidence interval estimates the mean response at x₀; a prediction interval covers a single new observation and is always wider.
- fitted value at the new predictor values
- row of predictor values (with a 1 for the intercept)
- model matrix of the fitted data
- the extra term for the new observation's own error variance
- the predictor value at which you predict
When to use
- Confidence interval: "What is the average y for all units with x = x₀?"
- Prediction interval: "Where will the next individual with x = x₀ fall?"
Assumptions
Those of regression inference. Prediction intervals additionally rely heavily on normal, constant-variance errors — they do not improve with n the way confidence intervals do.
How to interpret
- Both are narrowest at and widen as moves away.
- As n grows the confidence interval shrinks towards zero width; the prediction interval shrinks towards , never to zero.
Common mistakes
- Using the confidence interval to describe where individual observations will fall (far too narrow).
- Predicting outside the range of the data, where neither interval is trustworthy.
Example
Spend–sales line at x₀ = 4: , t(4 df) = 2.776.
- Mean response: SE = 0.356, 95% CI (5.61, 7.59).
- One new week: SE = 0.909, 95% PI (4.08, 9.12) — about 2.5 times wider.