Why the Sample Mean Predictor Value Is Special
In simple linear regression, an interval for a response depends partly on where the predictor value lies relative to the observed predictor values. At the sample mean predictor value, that location term becomes zero. This makes the standard-error formulas especially simple, while preserving the important distinction between uncertainty about an average response and uncertainty about one individual response.
The intervals discussed here use the fitted simple linear regression model. Write the observed responses as \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\), where the errors are independent, have mean zero and a common variance \(\sigma^2\), and are normally distributed for the usual exact t procedures. The mean response is linear in the predictor. The predictor values are treated as fixed, or the inference is understood as conditional on the observed predictor values. In an application, the model’s linearity, independence, constant spread, and error-distribution conditions should be checked as described in the earlier material on checking conditions before slope inference.
Let \(\bar{x}\) be the sample mean of the predictor, \(s\) the residual standard error, \(n\) the sample size, and \(S_{xx}=\sum_{i=1}^{n}(x_i-\bar{x})^2\). At a predictor value \(x_0\), the fitted response is \(\hat{y}_0=b_0+b_1x_0\). For a confidence interval for the population mean response at \(x_0\), the estimated standard error is \(s\sqrt{1/n+(x_0-\bar{x})^2/S_{xx}}\). For a prediction interval for one new individual response at \(x_0\), it is \(s\sqrt{1+1/n+(x_0-\bar{x})^2/S_{xx}}\). Both use a t critical value with \(n-2\) degrees of freedom.
Why the Formulas Simplify at \(\bar{x}\)
The simplification follows by substituting \(x_0=\bar{x}\) into each standard-error formula. Since \(\bar{x}-\bar{x}=0\), its squared value is also zero:
The fitted response at this predictor value is also \(\bar{y}\), the sample mean response. One way to see this is to use the least-squares identities \(\sum(x_i-\bar{x})=0\) and \(\sum(y_i-\bar{y})=0\). The fitted slope and intercept satisfy \(b_0=\bar{y}-b_1\bar{x}\). Therefore:
Thus, both intervals are centered at \(\bar{y}\) when \(x_0=\bar{x}\). This does not make the intervals interchangeable: the prediction standard error has an additional \(1\) inside the square root, representing the variation of an individual response around its mean. That extra term makes the prediction interval wider.
Calculating a Mean-Response Interval at \(\bar{x}\)
A confidence interval for the population mean response describes the average response among individuals with predictor value \(x_0\). At the sample mean predictor value, its center is \(\bar{y}\) and its standard error is \(s/\sqrt{n}\). The interval has the form \(\bar{y}\pm t^*s/\sqrt{n}\), where \(t^*\) is chosen for the desired confidence level and \(n-2\) degrees of freedom.
Worked Example: Mean Response at the Sample Mean
Suppose a hypothetical regression uses \(n=12\) observations to relate a predictor to a measured change from baseline, in units where positive and negative changes are possible. At \(x_0=\bar{x}\), the fitted response is \(\bar{y}=25\) units and the residual standard error is \(s=12.728\) units. Construct a 95% confidence interval for the population mean change at this predictor value. For \(df=10\), use \(t^*=2.228\).
At the sample mean predictor value, the mean-response standard error is:
The margin of error is \(t^*SE_{\text{mean}}\):
The interval is centered at \(\bar{y}=25\) units:
To two decimal places, the 95% confidence interval is approximately (16.81, 33.19) units. In repeated sampling under the stated model, intervals constructed this way would cover the population mean change at \(x_0=\bar{x}\) about 95% of the time. This is an interval for the mean response, not for a single individual’s change.
Calculating an Individual-Prediction Interval at \(\bar{x}\)
A prediction interval targets one future individual response at the specified predictor value. Its center is the same fitted response as the mean-response interval’s center, but its standard error includes both uncertainty in estimating the mean and the individual-level variation around that mean. At \(x_0=\bar{x}\), the standard error is \(s\sqrt{1+1/n}\). The prediction interval is \(\hat{y}_0\pm t^*s\sqrt{1+1/n}\), with the same \(n-2\) degrees of freedom when based on the same fitted regression.
Worked Example: Individual Prediction at the Sample Mean
Use the hypothetical regression from the previous calculation: \(n=12\), \(\bar{y}=25\) units, \(s=12.728\) units, and \(t^*=2.228\) for 95% confidence with \(df=10\). Find the prediction interval for one individual response at \(x_0=\bar{x}\).
The standard error for an individual prediction is:
The margin of error is:
Since the fitted response at \(x_0=\bar{x}\) is 25 units, the prediction interval is:
To three decimal places, the 95% prediction interval is approximately (-4.516, 54.516) units. Under the model, this procedure is designed to capture a single individual response at this predictor value in about 95% of repeated applications. The interval is wider than the mean-response interval because it includes individual-to-individual variation as well as uncertainty in the estimated mean.
Putting Both Intervals Side by Side
The simplifications at \(\bar{x}\) make the contrast especially clear. Both intervals have the same center, and both use the same critical t value. Their standard errors differ by the additional \(1\) in the prediction formula. Because \(1+1/n>1/n\), the prediction standard error is larger whenever \(s>0\), so its margin of error is larger as well.
| Target | Standard error at \(x_0=\bar{x}\) | Center |
|---|---|---|
| Population mean response | \(s/\sqrt{n}\) | \(\bar{y}\) |
| One individual response | \(s\sqrt{1+1/n}\) | \(\bar{y}\) |
For example, the second standard error can be written as \(s\sqrt{(n+1)/n}\), while the first is \(s\sqrt{1/n}\). Their ratio is \(\sqrt{n+1}\), so at the same confidence level the prediction margin of error is \(\sqrt{n+1}\) times the mean-response margin of error at \(\bar{x}\). This ratio compares the widths under the same fitted model and confidence level; it does not mean that either interval gives the probability that its target is in the observed interval.
Worked Example: Comparing the Two Interval Widths
In a separate hypothetical regression, \(n=16\), \(\bar{x}=40\) hours, the fitted response at \(\bar{x}\) is \(\bar{y}=72.5\) points, and \(s=6.0\) points. Construct both 95% intervals at \(x_0=\bar{x}\). Use \(t^*=2.145\) for \(df=14\). Assume the regression conditions are reasonable for these hypothetical data.
For the mean response:
Thus, the confidence interval for the population mean response is:
or approximately (69.28, 75.72) points.
For an individual response:
The prediction interval is:
or approximately (59.23, 85.77) points. Both intervals are centered at 72.5 points, but the individual-prediction interval is substantially wider. The first describes the mean response for all individuals at 40 hours; the second describes one individual response at 40 hours.
Assumptions and Interpretation
The formulas are not guaranteed to give reliable intervals just because a regression line can be calculated. For the usual t-based intervals, the mean response should be linear in the predictor, errors should be independent with constant variance, and the errors should be approximately normal for exact small-sample inference. The predictor value should also be within a region supported by the observed data; evaluating the fitted line far beyond that region is extrapolation and can make its conclusions unreliable. A prediction interval concerns a new individual at the specified predictor value, so the model’s assumptions must also be appropriate for that individual.
The confidence level describes the long-run performance of the interval procedure under the model. A 95% confidence interval does not mean there is a 95% probability that the fixed population mean response lies in this particular calculated interval. Likewise, a 95% prediction interval is not a guarantee that a particular future response will fall inside it. The procedures are constructed to achieve their stated coverage over repeated applications when their assumptions hold.
These intervals matter because a fitted value alone does not show how uncertain or variable responses are. At the sample mean predictor value, a mean-response interval can quantify uncertainty about the average, while a prediction interval communicates the wider range expected for an individual. The distinction matters whenever an analysis is used to describe group averages versus anticipate an individual outcome.
Common Mistake
A frequent error is to use \(s/\sqrt{n}\) for both types of interval because both are centered at the same fitted value. That standard error belongs to the mean-response interval. For one individual response, use \(s\sqrt{1+1/n}\); omitting the \(1\) ignores individual variation and produces an interval that is too narrow. A related error is to interpret the mean-response interval as a range containing most individual responses. It estimates uncertainty about the mean, not the spread of individual outcomes.
Check Your Understanding
Try these questions using the formulas and distinctions developed above.
- At \(x_0=\bar{x}\), why does the predictor-location term disappear from each standard-error formula?
- For a fitted regression with \(n=25\), residual standard error \(s=10\), and \(x_0=\bar{x}\), calculate the mean-response standard error and the individual-prediction standard error.
- At \(x_0=\bar{x}\), what value is the fitted response equal to, and why?
- Explain why an individual-prediction interval is wider than a mean-response interval at the same predictor value and confidence level.
- In context, distinguish what a 95% confidence interval for a mean response describes from what a 95% prediction interval describes.