Forecasting &
Prediction Intervals
Learn how to project future values from regression models and quantify the uncertainty surrounding individual predictions using prediction intervals.
What Is Forecasting?
Forecasting uses a fitted model to estimate future or unobserved values of a response variable. Given a regression equation \( \hat{y} = b_0 + b_1 x \), we substitute a new value of \( x \) to obtain a point forecast \( \hat{y} \).
Two Sources of Uncertainty
When we make a prediction, two distinct sources of variability contribute to our uncertainty about where the actual observation will land.
Visualizing the Two Bands
Why Prediction Intervals Matter
A point forecast tells us the most likely value, but stakeholders need to know the range of plausible outcomes before making decisions. Prediction intervals communicate that range honestly.
The Prediction Interval Formula
$$ \hat{y} \;\pm\; t_{\alpha/2,\, n-2} \cdot s_e \sqrt{1 + \frac{1}{n} + \frac{(x^* - \bar{x})^2}{\sum (x_i - \bar{x})^2}} $$
Anatomy of the Standard Error
Confidence vs Prediction Interval
| Confidence Interval | Prediction Interval | |
|---|---|---|
| Target | Mean response \( \mu_{Y|x^*} \) | Individual observation \( Y \) |
| Includes | Estimation uncertainty only | Estimation + individual variability |
| Width | Narrower | Always wider |
| Extra term | No "1" under radical | "1" under radical |
| Shrinks to zero? | Yes, as \( n \to \infty \) | No: bounded below by \( \sigma \) |
What Makes PIs Wider or Narrower?
How to Compute a Prediction Interval
Example 1: Study Hours and Exam Scores
A professor collects data from \( n = 25 \) students. The regression gives: \( \hat{y} = 40 + 5.2x \), \( s_e = 8.3 \), \( \bar{x} = 6.0 \), \( SS_x = 120 \). Predict the exam score for a student who studies \( x^* = 8 \) hours with a 95% PI.
Example 1: Visualized
Example 2: Extrapolation Warning
Using the same regression (\( \hat{y} = 40 + 5.2x \), \( n=25 \), \( s_e=8.3 \), \( \bar{x}=6 \), \( SS_x=120 \)), now predict for a student studying \( x^* = 14 \) hours: well beyond the observed range.
Example 3: How Distance Affects Width
Using the same model, compare the 95% PI width at three different values of \( x^* \):
| \( x^* \) | \( (x^*-\bar{x})^2/SS_x \) | \(\text{SE}_{\text{pred}}\) | PI Width |
|---|---|---|---|
| \( 6 \) (at \( \bar{x} \)) | 0 | 8.47 | 35.0 |
| \( 8 \) (+2 from \( \bar{x} \)) | 0.033 | 8.60 | 35.6 |
| \( 14 \) (+8 from \( \bar{x} \)) | 0.533 | 10.41 | 43.1 |
Common Mistakes
Summary of Key Concepts
| Concept | Key Idea |
|---|---|
| Point Forecast | \( \hat{y} = b_0 + b_1 x^* \): single best guess |
| Confidence Interval | Interval for the mean \( \mu_{Y|x^*} \): estimation uncertainty only |
| Prediction Interval | Interval for an individual \( Y \): estimation + individual variability |
| Width Drivers | \( s_e \), \( n \), confidence level, \( |x^* - \bar{x}| \), \( SS_x \) |
| Limiting Behavior | \( \text{CI} \to 0 \) as \( n \to \infty \); \( \text{PI} \to \) an interval with width \( \approx 2 z^* \sigma \) |
| Extrapolation | Technically computable, but model validity is not guaranteed beyond data range |
Question 1 of 5
A 95% prediction interval for an individual \( Y \) at \( x^* \) is always ______ than a 95% confidence interval for \( \mu_{Y|x^*} \) at the same \( x^* \).
Question 2 of 5
As the sample size \( n \to \infty \), the width of a 95% prediction interval:
Question 3 of 5
Which value of \( x^* \) will produce the narrowest prediction interval?
Question 4 of 5
A regression model has \( s_e = 12 \), \( n = 50 \), \( \bar{x} = 10 \), \( SS_x = 500 \). At \( x^* = 10 \), what is \( \text{SE}_{\text{pred}} \)?
Question 5 of 5
A 90% prediction interval for a student studying 5 hours is (62, 88). Which interpretation is correct?