Tutorials › Regression Analysis (Undergraduate) › Prediction Intervals Versus Confidence Intervals for Means

Prediction Intervals for New Outcomes · Tutorial 723 of 991

Prediction Intervals Versus Confidence Intervals for Means

Learn to choose and interpret the right regression interval by identifying whether the target is a conditional mean or one future outcome.

Intermediate 10 min read

What You'll Learn

  • Distinguish the conditional mean at a predictor value from an individual future response.
  • Use the simple-regression confidence-interval and prediction-interval formulas.
  • Explain the additional residual-variation term in a prediction interval.
  • Compare interval widths and interpret both intervals in context.
  • Identify the assumptions required for the intervals and common errors in reporting them.

Two Intervals, Two Different Questions

A fitted regression value gives a point prediction at a specified predictor value. But an interval around that value can answer either of two questions: how uncertain is the mean response at that predictor value, or where might the outcome for one future individual fall? These targets are related, but they are not interchangeable.

A confidence interval for a conditional mean describes uncertainty in the regression line’s estimated mean at a chosen predictor value. A prediction interval describes uncertainty in a future individual response at that value. The prediction interval must account both for uncertainty in the estimated mean and for the individual outcome’s deviation from that mean.

Definition: At predictor value \(x_0\), the conditional mean is the mean response among cases with predictor value \(x_0\), denoted \(E(Y\mid x_0)\). A future outcome is the response \(Y_{\mathrm{new}}\) for one new individual whose predictor value is \(x_0\). A confidence interval for \(E(Y\mid x_0)\) concerns the mean; a prediction interval for \(Y_{\mathrm{new}}\) concerns one individual outcome.

Model and Interval Formulas

The formulas below are for simple linear regression. Assume the model \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\), with independent errors having mean zero, common variance \(\sigma^2\), and a normal distribution. The predictor values are treated as fixed. The conditional mean is \(\beta_0+\beta_1x_0\), estimated by the fitted value \(\hat{y}_0=b_0+b_1x_0\). Let \(S_{xx}=\sum_{i=1}^n(x_i-\bar{x})^2\), and let \(s\) be the residual standard deviation. The residual degrees of freedom are \(df=n-2\).

Under these assumptions, the standard error of the estimated conditional mean at \(x_0\) is \(s\sqrt{1/n+(x_0-\bar{x})^2/S_{xx}}\). For a future individual outcome, the standard error of the prediction error is \(s\sqrt{1+1/n+(x_0-\bar{x})^2/S_{xx}}\). A two-sided interval with confidence level \(1-\alpha\) uses the critical value \(t^*=t_{1-\alpha/2,\,n-2}\).

$$ \text{Confidence interval for } E(Y\mid x_0): \qquad \hat{y}_0 \pm t^*s\sqrt{\frac{1}{n}+\frac{(x_0-\bar{x})^2}{S_{xx}}} $$
$$ \text{Prediction interval for } Y_{\mathrm{new}}\text{ at }x_0: \qquad \hat{y}_0 \pm t^*s\sqrt{1+\frac{1}{n}+\frac{(x_0-\bar{x})^2}{S_{xx}}} $$

The two intervals share the same center, \(\hat{y}_0\), and the same \(t^*\). The prediction interval has an additional \(1\) inside the square root. That term represents the residual variation among individual outcomes around their conditional mean. Estimating the mean does not require predicting that extra individual deviation; predicting one future outcome does.

Why the Prediction Interval Is Wider

The distinction can be seen by writing the future outcome as \(Y_{\mathrm{new}}=E(Y\mid x_0)+\varepsilon_{\mathrm{new}}\). Its prediction error is \(Y_{\mathrm{new}}-\hat{y}_0\), or \(\varepsilon_{\mathrm{new}}+(E(Y\mid x_0)-\hat{y}_0)\). The first part is the new individual’s error; the second is the estimation error in the fitted mean. Under the stated model, these components are independent, so their variances add.

$$ \operatorname{Var}(Y_{\mathrm{new}}-\hat{y}_0\mid x_0) = \operatorname{Var}(\varepsilon_{\mathrm{new}}) + \operatorname{Var}(E(Y\mid x_0)-\hat{y}_0) = \sigma^2+\sigma^2\left(\frac{1}{n}+\frac{(x_0-\bar{x})^2}{S_{xx}}\right) $$

Replacing \(\sigma\) with \(s\) gives the prediction standard error in the formula. By contrast, the confidence interval for the mean includes only the uncertainty in estimating that mean. The corresponding estimated variances differ by \(s^2\), so the prediction interval is wider whenever \(s>0\). The width difference does not mean the conditional mean itself is less precisely estimated; it reflects the different target.

Worked Example: Comparing Both Intervals at the Same Predictor Value

Suppose a hypothetical simple regression has \(n=25\), \(\bar{x}=10\), \(S_{xx}=100\), fitted line \(\hat{y}=26+2x\), and residual standard deviation \(s=4\). At \(x_0=12\), compare a 95% confidence interval for the conditional mean with a 95% prediction interval for one future response. Assume the residual diagnostics are consistent with the linear, independent, constant-variance, normal-error model.

The fitted value is \(\hat{y}_0=26+2(12)=50\). Here \(df=25-2=23\), so the 95% critical value is \(t^*=2.069\). The common predictor-location part is \(1/n+(x_0-\bar{x})^2/S_{xx}=1/25+(12-10)^2/100=0.04+0.04=0.08\).

For the conditional mean, \(SE=4\sqrt{0.08}=1.131\). Thus the confidence interval is \(50\pm2.069(1.131)=50\pm2.341\), or approximately \(47.66\) to \(52.34\) response units.

For one future outcome, \(SE=4\sqrt{1+0.08}=4\sqrt{1.08}=4.157\). Its prediction interval is \(50\pm2.069(4.157)=50\pm8.601\), or approximately \(41.40\) to \(58.60\) response units.

The confidence interval estimates the mean response for cases with \(x=12\); it does not claim that individual outcomes at \(x=12\) are likely to lie between \(47.66\) and \(52.34\). The prediction interval is the relevant interval for one future outcome, and it is wider because that outcome may differ from the mean.

A Second Comparison at the Center of the Data

At \(x_0=\bar{x}\), the location term \((x_0-\bar{x})^2/S_{xx}\) is zero. This makes the distinction especially clear: the standard error for the mean depends on averaging across the sample, while the prediction standard error still includes the individual residual variation.

Worked Example: At the Sample Mean of the Predictor

Suppose a hypothetical fitted regression has \(n=16\), \(\bar{x}=20\), fitted mean \(\hat{y}_0=72\) at \(x_0=20\), and \(s=6\). Assume the model conditions are reasonable based on the design and residual checks. Find both 95% intervals. Here \(df=14\) and \(t^*=2.145\).

Because \(x_0=\bar{x}\), the location term is zero. For the conditional mean, \(SE=6\sqrt{1/16}=6(0.25)=1.5\). The interval is \(72\pm2.145(1.5)=72\pm3.218\), giving approximately \(68.78\) to \(75.22\) response units.

For a future individual, \(SE=6\sqrt{1+1/16}=6\sqrt{1.0625}=6.185\). The prediction interval is \(72\pm2.145(6.185)=72\pm13.27\), giving approximately \(58.73\) to \(85.27\) response units.

Even at the center of the observed predictor values, where the estimated mean has no extra location-related uncertainty, an individual outcome still varies around that mean. The prediction interval therefore remains much wider than the confidence interval.

Choose the Interval That Matches the Question

The choice is determined by what the interval is intended to cover, not by which interval looks more useful or is narrower. A confidence interval is appropriate for a question about an average response at a specified predictor value. A prediction interval is appropriate for a question about one new case. Both are conditional on the regression model being suitable and the new case having the stated predictor value.

Question of interestTargetUse
What is the mean response among cases with \(x=x_0\)?\(E(Y\mid x_0)\)Confidence interval for the conditional mean
What outcome might occur for one new case with \(x=x_0\)?\(Y_{\mathrm{new}}\)Prediction interval

Worked Example: Matching the Interval to a Practical Question

Suppose a hypothetical regression predicts systolic blood pressure from a baseline measurement. At baseline \(x_0=45\) mmHg, assume the fitted value is \(118\) mmHg, with \(n=25\), \(\bar{x}=40\) mmHg, \(S_{xx}=250\) mmHg\(^2\), and \(s=5\) mmHg. Assume the simple-regression conditions are reasonable for these illustrative data. A health planner asks both for the estimated mean blood pressure at this baseline and for a plausible range for one new person.

For this predictor value, \(1/n+(x_0-\bar{x})^2/S_{xx}=1/25+(45-40)^2/250=0.04+0.10=0.14\). With \(df=23\) and \(t^*=2.069\), the confidence-interval standard error is \(5\sqrt{0.14}=1.871\). The 95% confidence interval is \(118\pm2.069(1.871)=118\pm3.871\), or approximately \(114.13\) to \(121.87\) mmHg. This interval concerns the mean blood pressure among people at the specified baseline value.

For a new individual, the prediction standard error is \(5\sqrt{1.14}=5.339\). The 95% prediction interval is \(118\pm2.069(5.339)=118\pm11.05\), or approximately \(106.95\) to \(129.05\) mmHg. This is the interval suited to the planner’s question about one new person. It is wider because individual blood pressure can vary around the conditional mean.

Common Mistakes and a Practical Check

  • Using a mean confidence interval for an individual. A narrow interval around the estimated mean does not describe the spread of individual outcomes. Use a prediction interval when the target is one new response.
  • Calling a prediction interval an interval for the mean. The prediction interval includes residual variation and is not a more cautious confidence interval for the same target. It answers a different question.
  • Thinking both intervals have different centers. For the same \(x_0\), both are centered at \(\hat{y}_0\); they differ in standard error and width.
  • Ignoring units and context. State whether an interval is for a mean or an individual outcome, identify the predictor value, and report the response units.
Key takeaway: The confidence interval uses \(s\sqrt{1/n+(x_0-\bar{x})^2/S_{xx}}\) because it estimates a conditional mean. The prediction interval adds \(1\) under the square root to include the residual variation of one future outcome. First identify the target; then choose the interval.

Check Your Understanding

Use the target of the interval, not its width, to guide your answers.

  1. A researcher wants to estimate the average response among all cases with predictor value \(x_0\). Which interval should be used, and what quantity does it estimate?
  2. In the prediction-interval formula, what does the additional \(1\) inside the square root represent?
  3. Why do the confidence interval for the conditional mean and prediction interval share the same center?
  4. At \(x_0=\bar{x}\), which part of the mean standard error formula becomes zero? Does the prediction interval still include residual variation?
  5. Explain why a confidence interval for a conditional mean should not be used to describe a likely range for one new individual outcome.