Two Different Sources of Spread
A fitted regression model can be used to describe an average relationship and to predict individual outcomes. These uses involve two kinds of spread that are easy to confuse. Effect uncertainty is uncertainty about an estimated slope, contrast, or conditional mean. Outcome variability is the spread of individual responses around their conditional mean. A confidence interval for an effect or mean addresses the first; a prediction interval for an individual outcome must address both.
The distinction matters when interpreting an interval. A wide prediction interval does not necessarily mean that the estimated effect is imprecise: individual outcomes can vary substantially even when the fitted mean is estimated precisely. Conversely, a narrow residual spread does not guarantee a precise effect estimate, especially when the data provide limited information about the relevant predictor values.
A Model for Conditional Effects
Consider a continuous predictor \(X\), a categorical group indicator \(G\) coded 0 or 1, and an outcome \(Y\). A simple interaction model is
The model's conditional mean is \(E(Y_i\mid X_i,G_i)=\beta_0+\beta_1X_i+\beta_2G_i+\beta_3X_iG_i\). The slope for \(X\) when \(G=0\) is \(\beta_1\); when \(G=1\), it is \(\beta_1+\beta_3\). At a specified value \(x\), the conditional mean difference between group 1 and group 0 is \(\beta_2+x\beta_3\). These are model quantities, and their estimates have sampling uncertainty.
For the usual small-sample \(t\)-based intervals in this tutorial, assume the conditional mean has the stated linear form, errors are independent with mean zero and constant variance \(\sigma^2\), and errors are normally distributed. The predictor values are treated as fixed for the inference. Under these assumptions, the estimated coefficients are unbiased, their covariance matrix measures their sampling uncertainty, and the stated \(t\) intervals have their usual exact coverage in repeated samples. In applications, these assumptions need to be considered before relying on the intervals.
Let \(s^2\) estimate the error variance and let \(df\) denote the residual degrees of freedom. Any linear combination of estimated coefficients can be written as an estimate of a model quantity. Its standard error is the square root of its estimated sampling variance, calculated using coefficient variances and covariances. A confidence interval is the estimate plus or minus a \(t\) critical value times that standard error. It describes uncertainty in the model quantity, not the scatter of individual outcomes.
Worked Example: Uncertainty in a Conditional Slope
Suppose a hypothetical interaction-model fit estimates the slope for \(X\) when \(G=1\) as \(\hat{\beta}_1+\hat{\beta}_3=0.0\) outcome units per unit of \(X\). The estimated variances are \(\widehat{\mathrm{Var}}(\hat{\beta}_1)=0.16\) and \(\widehat{\mathrm{Var}}(\hat{\beta}_3)=0.04\), and the estimated covariance is \(\widehat{\mathrm{Cov}}(\hat{\beta}_1,\hat{\beta}_3)=-0.02\). Take \(df=30\) and a 95% critical value of 2.042.
For a sum, its variance includes twice the covariance:
Thus the standard error is \(\sqrt{0.16}=0.400\) outcome units per unit of \(X\). The confidence interval is
The interval expresses uncertainty about the population slope for group 1. It does not say that individual outcomes lie between these slope values, nor does it give the spread of outcomes around their fitted means.
Intervals for Conditional Mean Contrasts
The same distinction applies to a conditional mean contrast. In the model above, the group difference at \(X=x\) is \(\beta_2+x\beta_3\), so the estimated difference is \(\hat{\beta}_2+x\hat{\beta}_3\). Its estimated variance is
The covariance term is essential: coefficient estimates from the same model are generally related. The standard error obtained from this variance describes how much the estimated contrast would vary across repeated samples under the model. It does not describe how far an individual response may be from its group-specific conditional mean.
Worked Example: A Group Contrast at a Chosen Predictor Value
For a hypothetical model, suppose the estimated group difference at \(X=5\) is \(\hat{\beta}_2+5\hat{\beta}_3=1.0\) outcome units. Suppose \(\widehat{\mathrm{Var}}(\hat{\beta}_2)=0.81\), \(\widehat{\mathrm{Var}}(\hat{\beta}_3)=0.04\), and \(\widehat{\mathrm{Cov}}(\hat{\beta}_2,\hat{\beta}_3)=-0.12\). Use \(df=30\) and the 95% critical value 2.042.
First calculate the estimated variance of the contrast:
The standard error is \(\sqrt{0.61}=0.7810\) outcome units. The 95% confidence interval is
Under the model assumptions, this interval is for the population difference in conditional means between the two groups at \(X=5\). It includes zero, so the data do not distinguish the contrast from zero at the corresponding two-sided 5% level. That conclusion concerns the mean contrast, not whether individual outcomes in the groups overlap or how variable those outcomes are.
Mean Response and Individual Prediction
At specified predictor values, a fitted regression model gives an estimated conditional mean, \(\hat{Y}_0\). A confidence interval for the true conditional mean accounts for the sampling uncertainty in \(\hat{Y}_0\). A prediction interval for one future individual outcome must also account for that individual's residual variation around the conditional mean.
In ordinary least squares with independent, constant-variance normal errors, write \(h_0\) for the design-based variance factor at the predictor values of interest. The estimated standard error for the fitted mean is \(s\sqrt{h_0}\). For one new individual at those same predictor values, the prediction standard error is \(s\sqrt{1+h_0}\). The extra 1 represents the new individual's error variance, measured in units of \(s^2\).
For a new individual, the prediction error can be written as \(Y_{\mathrm{new}}-\hat{Y}_0=(Y_{\mathrm{new}}-\mu_0)+(\mu_0-\hat{Y}_0)\), where \(\mu_0\) is the true conditional mean at the chosen predictor values.
The new individual's error is independent of the errors used to estimate the regression mean. Both terms have mean zero, so the variance of their sum is the sum of their variances.
The first term has variance \(\sigma^2\), and the fitted-mean estimation error has variance \(\sigma^2h_0\). Therefore the prediction-error variance is \(\sigma^2(1+h_0)\); replacing \(\sigma\) with \(s\) gives the prediction standard error \(s\sqrt{1+h_0}\).
The derivation shows exactly why the intervals differ. For the fitted mean, the standard error is \(s\sqrt{h_0}\); there is no new individual's residual in the target. For an individual outcome, the additional residual term cannot be omitted. Since \(1+h_0>h_0\), a prediction interval is wider than the corresponding confidence interval for the mean, assuming both use the same \(t\) critical value.
Worked Example: Confidence Interval for a Mean Versus Prediction Interval
A hypothetical model gives a fitted conditional mean of 52.0 points at specified predictor values. Suppose the residual degrees of freedom are 30, the 95% \(t\) critical value is 2.042, the residual variance estimate is \(s^2=32.25\) points squared, and the variance factor for the fitted mean is \(h_0=6/32.25\). Thus the estimated variance of the fitted mean is 6.00 points squared.
The standard error for the conditional mean is \(\sqrt{6.00}=2.449\) points. Its 95% confidence interval is
This interval concerns the model's true conditional mean at those predictor values. For a single new outcome, add the residual variance to the fitted-mean variance. The prediction standard error is therefore
The 95% prediction interval is
The prediction interval is wider because it includes both uncertainty in the estimated mean and the residual variation of an individual outcome. Its interpretation is about a future individual outcome at the specified predictor values, not about where the true conditional mean lies.
Reading an Interval Before Interpreting It
An interval's numerical endpoints alone do not identify what it describes. The target quantity and the method used to calculate the interval matter. Before interpreting a reported interval, ask whether the target is a slope, a contrast, a conditional mean, or an individual outcome. Then check whether the calculation includes only coefficient-estimation uncertainty or also includes residual variation.
A useful summary is:
| Interval target | What its uncertainty represents | Residual variation for one individual included? |
|---|---|---|
| Conditional slope or mean contrast | Sampling uncertainty in a linear combination of coefficients | No |
| Conditional mean at specified predictors | Sampling uncertainty in the fitted mean | No |
| One future individual outcome | Uncertainty in the fitted mean plus the individual's residual variation | Yes |
Common mistake: “The prediction interval is wide, so the regression effect must be estimated imprecisely.” This reasoning confuses outcome scatter with effect uncertainty. The correction is to identify the interval's target: a prediction interval is wide partly because individual outcomes vary around their means. To assess uncertainty in a slope or mean contrast, use the standard error and interval for that specific model quantity instead.
The reverse mistake is to use a confidence interval for a conditional mean as though it describes likely individual outcomes. Such an interval can be narrow while individual responses remain widely scattered. It does not promise that most individuals fall inside it; it concerns the conditional mean, not the residual distribution of individual observations.
Check Your Understanding
For each question, identify the interval's target and distinguish effect uncertainty from outcome variability.
- A 95% interval is reported for the slope of \(X\) in group 1 of an interaction model. Does it describe the spread of individual \(Y\) values? Explain.
- At \(X=5\), what target does a confidence interval for the group difference in fitted means describe?
- Why does a prediction interval for one new outcome include an additional variance contribution beyond the variance of the fitted mean?
- A prediction interval is much wider than a confidence interval for the conditional mean at the same predictor values. Does this alone show that the fitted mean is imprecise? Explain.
- When calculating the variance of \(\hat{\beta}_2+x\hat{\beta}_3\), why must the covariance term be included?