Predicting Y and building a prediction interval
Plug X_f into the fitted line: Ŷ_f = b̂₀ + b̂₁X_f. The interval is Ŷ_f ± t_c × s_f. The standard error of the forecast, s_f, is larger with a larger standard error of the estimate (s_e), a smaller sample, an X_f farther from X̄ and less spread in X.
Before this: The ANOVA table and the standard error of the estimate
On the exam
- Calculate and interpret predicted values, the standard error of the estimate, and prediction intervals for the dependent variable in a simple linear regression model and describe different functional forms
Calculate and interpret predicted values and prediction intervals. Expect a predicted value from a regression output (keep the intercept), s_f given or built from s_e, and Ŷ_f ± t_c × s_f with n − 2 degrees of freedom, plus what makes the interval wider. Wrong options use z instead of t, or s_e in place of s_f.
How deeply to learn each part
- Know the idea
- Understand it in general. It frames other topics, but you will not calculate with it.
- Use it
- Understand it well enough to solve a question with it. Recognize when it applies.
- Memorize
- Learn it by heart. The exam will not give it to you.
You know this one. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still do.
You tested strong here. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still know it.
How do you make a point prediction?
Plug the new value of X into the fitted line. The result is the predicted value of Y.
That is a single best guess. The line is estimated, and any one retailer will miss it, so we want a range.
How do you build the prediction interval?
A prediction interval is the range expected to contain a single new observation of Y at a given X, with a stated confidence.
The critical t-value comes from the t-table with degrees of freedom. The standard error of the forecast measures the uncertainty in predicting one new Y. It is built from the standard error of the estimate (, also called SEE; lesson 4).
The same formula can be written in variance form, where is written with the sample variance of X (for the retailers, 5 × 7.5 = 37.5):
The three terms under the root are three sources of uncertainty. The 1 is the new observation’s own error. The reflects that the line was estimated from a finite sample. The last term grows as moves away from . So four things set (the drivers of forecast uncertainty ): the standard error of the estimate (fit), the sample size, the distance of from , and the spread of X (more spread pins the slope down better). Since the root is always above 1, is always larger than .
- Larger s_e Use it noisier data around the line
- Smaller sample, n Use it the 1/n term and the larger t_c
- X_f farther from X̄ Memorize the distance term grows
- Less spread in X Use it the slope is estimated less precisely
- Higher confidence level Use it a larger t_c
A simple regression has s_e = 0.8327, n = 6, X̄ = 5.5 and Σ(X − X̄)² = 37.5. For X_f = 7, the standard error of the forecast is closest to:
0.8327 × √(1 + 1/6 + 1.5² ÷ 37.5) = 0.9223
Standard error of the forecast, s_f0.9223
- 0.8327×((7−5.5)x²÷37.5+1+61/x)√x=
x² square · 1/x reciprocal · √x square root
- 7ENTER5.5−ENTER×37.5÷1+61/x+g√x0.8327×
ENTER enter (on the HP, puts the number on the stack) · 1/x reciprocal · g blue shift key · √x square root
A regression predicts Ŷ = 10.44 with a standard error of the forecast of 0.9222. With a critical t-value of 2.776, the upper bound of the prediction interval is closest to:
10.44 + 2.776 × 0.9222 = 13
Upper bound13
- 2.776×0.9222+10.44=
- 2.776ENTER0.9222×10.44+
ENTER enter (on the HP, puts the number on the stack)
Try this 0 of 3
- Drag X_f to the point where the interval is narrowest.
- Load “Far from the data (X = 12)” and compare s_f with X_f = 7.
- Make the band narrower at X_f = 12 without adding data.
A retailer spending 7.0% of sales on marketing is predicted to grow 10.44%, with a 95% prediction interval of 7.88% to 13.00% (s_f 0.922, critical t 2.776, n = 6). The band is narrowest at X̄ = 5.5 and widens away from it. Predictions are tightest near the middle of the data.
Drag the X_f marker, tap the chart, or focus the handle and use the arrow keys.
- 95% prediction band
- Fitted line
- Interval at X_f
- Observed range of X
Show working
Ŷ_f = b̂₀ + b̂₁X_f = 1.3867 + 1.2933 × 7.0 = 10.4400.
s_f = s_e × √(1 + 1/n + (X_f − X̄)² ÷ Σ(X − X̄)²) = 0.8327 × √(1 + 1/6 + 2.2500 ÷ 37.5) = 0.8327 × √1.2267 = 0.9222.
Critical t, df = n − 2 = 4, 95% two-tailed: 2.7764. Half-width = 2.7764 × 0.9222 = 2.5605.
Interval: 10.4400 ± 2.5605 = 7.88 to 13.00.
s_f is always above s_e (0.9222 > 0.8327): the "1 +" is the new observation's own error, and the other two terms are the error in the estimated line.
- 1.2933×7+1.3867=STO1Ŷ = 10.4400
- 7−5.5=x²÷37.5+61/x+1=√x×0.8327=STO2s_f = 0.9222
- ×2.7764=STO3half-width 2.5605
- RCL1−RCL3=lower 7.88
- RCL1+RCL3=upper 13.00
STO store · x² square · 1/x reciprocal · √x square root · RCL recall a stored number
- 1.2933ENTER7×1.3867+STO1Ŷ = 10.4400
- 7ENTER5.5−ENTER×37.5÷61/x+1+g√x0.8327×STO2s_f = 0.9222
- 2.7764×STO3half-width 2.5605
- RCL1RCL3−lower 7.88
- RCL1RCL3+upper 13.00
ENTER enter (on the HP, puts the number on the stack) · STO store · 1/x reciprocal · g blue shift key · √x square root · RCL recall a stored number
Display: 7.88 to 13.00
Exam tip In a spreadsheet, FORECAST.LINEAR (FORECAST in Google Sheets) returns and TREND returns fitted values. On the exam you calculate them by hand.
What happens far from the data?
The interval widens as X moves away from . At (well beyond the largest observed X of 9) the prediction is and the standard error of the forecast rises to 1.261, so the 95% interval is 13.41% to 20.41%, with a margin of 3.50 against 2.56 at 7%, roughly 37% wider.
Exam tip On most exam items the standard error of the forecast is given. Your job is then only Ŷ_f, then Ŷ_f ± t_c × s_f. Do not substitute s_e.
Go deeper Prediction interval versus confidence interval for the mean
A prediction interval covers one new observation. A confidence interval for the mean of Y at that X covers the average of many observations, which is a more certain target. Its standard error drops the “1 +” under the root, so it is narrower. The exam asks for the prediction interval of a single outcome.
Go deeper The danger of extrapolation
A regression describes the relationship in the range of X it has seen. Beyond that range the true relationship could flatten or curve, and no formula can warn you. The widening interval captures only the statistical part of the risk, not that structural risk.
Memorize this
MemorizePrediction recipe
| Step | Rule |
|---|---|
| Point forecast | |
| Interval | , |
| vs | always; |
| Wider when | larger , smaller n, far from , less spread in X, higher confidence |
Memory hook Three sources of doubt, three terms under the root: the new error itself (the 1), the line being estimated from a finite sample (1/n), and the slope error magnified away from the middle (the distance term).
Know it cold Use t with n − 2 degrees of freedom, not z, and s_f, not s_e.
- Larger s_e Use it noisier data around the line
- Smaller sample, n Use it the 1/n term and the larger t_c
- X_f farther from X̄ Memorize the distance term grows
- Less spread in X Use it the slope is estimated less precisely
- Higher confidence level Use it a larger t_c
Quick example
Intercept 2.0, slope 0.75, forecast X = 6. Ŷ = 2.0 + 0.75 × 6 = 6.5.
- 0.75×6+2= 6.5
- 0.75ENTER6×2+ 6.5
ENTER enter (on the HP, puts the number on the stack)
Quick example
s_e = 3.0, n = 25 and X_f = X̄. s_f = 3.0 × √(1 + 1/25) = 3.06, just above s_e.
- 3×(1+251/x)√x= 3.0594
1/x reciprocal · √x square root
- 251/x1+g√x3× 3.0594
1/x reciprocal · g blue shift key · √x square root
Quick example
s_e = 1.5, n = 31, s_X = 2.0 and X_f is 3 above X̄: s_f = 1.5 × √(1 + 1/31 + 9 ÷ 120) = 1.5 × 1.0523 = 1.58.
- 9÷120+311/x+1=√x×1.5= 1.5784
1/x reciprocal · √x square root
- 9ENTER120÷311/x+1+g√x1.5× 1.5784
ENTER enter (on the HP, puts the number on the stack) · 1/x reciprocal · g blue shift key · √x square root
Quick example
Ŷ = 8.4, t_c = 2.04, s_f = 1.4. Interval = 8.4 ± 2.04 × 1.4 = 8.4 ± 2.86 = 5.54 to 11.26.
- 2.04×1.4=STO1 2.856
- 8.4−RCL1= 5.544
- 8.4+RCL1= 11.256
STO store · RCL recall a stored number
- 2.04ENTER1.4×STO1 2.856
- 8.4RCL1− 5.544
- 8.4RCL1+ 11.256
ENTER enter (on the HP, puts the number on the stack) · STO store · RCL recall a stored number
How it is asked
-
Build the interval
b̂₀ = 2.2, b̂₁ = 0.9, X = 6, s_f = 1.3, t_c = 2.06. Interval?
Ŷ = 7.6; 7.6 ± 2.68 = 4.92 to 10.28. Trap: z = 1.96 gives 5.05 to 10.15.
-
Where is it narrowest?
Other things equal, for which X_f is the interval narrowest?
At the sample mean of X.
-
s_e or s_f?
How does the standard error of the forecast compare with the standard error of the estimate?
s_f is larger: the root is always above 1.
-
Interpret the interval
A 95% prediction interval for 7% marketing spend is 7.9% to 13.0%.
We are 95% confident that a single new retailer with 7% spend will grow between 7.9% and 13.0%, if the assumptions hold.
Exam traps
- Using s_e instead of the standard error of the forecast. s_e ignores the uncertainty in the estimated line.
- Using a z critical value (1.96) instead of t with n − 2 degrees of freedom.
- Forgetting the interval widens as X moves away from the sample mean of X.
- Extrapolating far beyond the observed X range: the linear relation may not hold there.
- Dropping the intercept when computing the predicted value.
Checkpoint
4 exam-style questions. About 90 seconds each.
1A fitted model has b̂₀ = 1.5 and b̂₁ = 0.8. For X = 5, the standard error of the forecast is 1.2 and the critical t-value is 2.05. The 95% prediction interval is closest to:
2Other things equal, the prediction interval is narrowest when the new X equals:
3Compared with the standard error of the estimate, the standard error of the forecast is:
4A regression has a standard error of the estimate of 2.0 and n = 20. For a forecast at X equal to the sample mean, the standard error of the forecast is closest to:
Key takeaways
- Ŷ_f = b̂₀ + b̂₁X_f for the point prediction.
- Interval: Ŷ_f ± t_c × s_f with n − 2 degrees of freedom.
- s_f is larger than s_e and grows with the distance of X_f from X̄; more data and more spread in X shrink it.
Quick example
Intercept 2.0, slope 0.75, forecast X = 6. Ŷ = 2.0 + 0.75 × 6 = 6.5.
- 0.75×6+2= 6.5
- 0.75ENTER6×2+ 6.5
ENTER enter (on the HP, puts the number on the stack)
Quick example
s_e = 3.0, n = 25 and X_f = X̄. s_f = 3.0 × √(1 + 1/25) = 3.06, just above s_e.
- 3×(1+251/x)√x= 3.0594
1/x reciprocal · √x square root
- 251/x1+g√x3× 3.0594
1/x reciprocal · g blue shift key · √x square root
Quick example
s_e = 1.5, n = 31, s_X = 2.0 and X_f is 3 above X̄: s_f = 1.5 × √(1 + 1/31 + 9 ÷ 120) = 1.5 × 1.0523 = 1.58.
- 9÷120+311/x+1=√x×1.5= 1.5784
1/x reciprocal · √x square root
- 9ENTER120÷311/x+1+g√x1.5× 1.5784
ENTER enter (on the HP, puts the number on the stack) · 1/x reciprocal · g blue shift key · √x square root
Quick example
Ŷ = 8.4, t_c = 2.04, s_f = 1.4. Interval = 8.4 ± 2.04 × 1.4 = 8.4 ± 2.86 = 5.54 to 11.26.
- 2.04×1.4=STO1 2.856
- 8.4−RCL1= 5.544
- 8.4+RCL1= 11.256
STO store · RCL recall a stored number
- 2.04ENTER1.4×STO1 2.856
- 8.4RCL1− 5.544
- 8.4RCL1+ 11.256
ENTER enter (on the HP, puts the number on the stack) · STO store · RCL recall a stored number
All Quantitative Methods formulas, every lesson
Practice exam-style questions on Simple Linear Regression in Finance
Questions about this lesson?
Where this comes back
- Functional forms: log-lin, lin-log and log-log models Simple Linear Regression in Finance
- Financial Statement Forecasting Equities
Questions candidates ask
How do you calculate a prediction interval in regression?
Find the predicted value Ŷ_f = b̂₀ + b̂₁X_f, then compute Ŷ_f ± t_c × s_f. The critical t-value has n − 2 degrees of freedom, and s_f is the standard error of the forecast, which is larger than the standard error of the estimate (s_e, also called SEE). The result is the range expected to contain a new observation.
What is the standard error of the forecast?
It measures the uncertainty in predicting a single new Y. It combines the error scatter (s_e), the uncertainty in the estimated line (1/n), the distance of the new X from the sample mean and how spread out X is. It is s_f = s_e × √(1 + 1/n + (X_f − X̄)² ÷ Σ(X − X̄)²).
Why is a prediction interval wider away from the mean?
Any error in the estimated slope is magnified the farther X is from X̄, because the line pivots around the point of means. So the forecast is least certain at the extremes and beyond the data, where extrapolating is especially risky.
Spotted an error? Tell us and we will fix it.