Why Predictor Location Matters
A prediction interval for a new outcome is not equally wide at every predictor value. In simple regression, its width depends partly on how far the new predictor value is from the sample mean of the observed predictors. The overall spread of those observed predictors matters too: a design spread over a wider range generally gives more information about the slope, which helps limit the increase in uncertainty away from the mean.
It is useful to separate two ideas that can sound similar. A prediction value can lie in a region with few nearby observations, but the simple-regression formula does not include a separate count of nearby observations. Instead, it uses the prediction value’s distance from the sample predictor mean and the overall spread of the observed predictors. Those summaries determine how the design contributes to interval width.
The Width Formula and Its Ingredients
For the usual two-sided \(100(1-\alpha)\%\) prediction interval in simple linear regression, let \(x_0\) be the predictor value for the new case and let \(\hat{y}_0\) be its fitted outcome. The formula is
Here \(s\) is the residual standard error, \(t^*\) is the appropriate critical value from a \(t\) distribution with \(df=n-2\), and \(S_{xx}\) measures the overall spread of the observed predictor values around their mean. The formula applies under the simple-regression model \(Y_i=\beta_0+\beta_1x_i+\epsilon_i\), with independent errors of mean zero and constant variance, and a linear mean relationship. Normal errors support the usual exact \(t\)-based calibration. The observed predictor values are treated as fixed, or the calculation is understood as conditional on them.
The three terms under the square root play different roles. The \(1\) reflects uncertainty in the new individual outcome, not just uncertainty in the fitted mean. The \(1/n\) contributes to uncertainty in estimating the intercept level. The final term, \((x_0-\bar{x})^2/S_{xx}\), captures how predictor location and design spread combine. Since \(S_{xx}\) is a sum of squared distances, a larger value means the observed predictors are more spread out overall.
What the Formula Says About Location and Spread
Hold \(n\), \(s\), and \(t^*\) fixed to focus on the design contribution. At \(x_0=\bar{x}\), the squared-distance term is zero, so the half-width is \(t^*s\sqrt{1+1/n}\). For any other location, the distance term is positive. Thus, for this fixed comparison, the interval is narrowest at the predictor mean and gets wider as the distance from that mean increases.
For a fixed nonzero distance from \(\bar{x}\), increasing \(S_{xx}\) makes the distance term smaller. In that sense, a more widely spread predictor design reduces the additional width associated with predicting away from the mean. It does not remove the \(1+1/n\) part of the multiplier, and it does not guarantee a narrower interval in every real comparison: \(s\), \(n\), and the appropriate \(t^*\) can also differ between fits.
A Short Justification of the Pattern
The width pattern follows directly from comparing the nonnegative distance term. If two prediction locations have distances \(d_1=|x_1-\bar{x}|\) and \(d_2=|x_2-\bar{x}|\), with \(d_2>d_1\), then
because \(S_{xx}>0\) for a predictor that varies in the sample. The square-root function is increasing for positive inputs. Multiplying both square roots by the same positive \(t^*s\) preserves the inequality, so the second location has the larger half-width. Likewise, for a fixed \(d>0\), if \(S_{xx,2}>S_{xx,1}>0\), then \(d^2/S_{xx,2}<d^2/S_{xx,1}\), giving a smaller half-width for the more spread-out design, all else equal.
This comparison isolates the formula’s design pattern; it does not claim that the observed residual standard error must be the same across two actual data sets. The examples below hold \(s\) and other relevant quantities fixed where needed so that location or spread can be compared directly.
Worked Example: Moving From the Mean Toward a Range Edge
Suppose a hypothetical simple-regression fit has \(n=8\), \(\bar{x}=4.5\), \(S_{xx}=42\), residual standard error \(s=3\) outcome units, and \(df=6\). For a 95% prediction interval, use \(t^*=2.447\). Compare the half-width at \(x_0=4.5\) with the half-width at \(x_0=1\). Assume the linear model and error conditions stated above are suitable for this calculation.
At \(x_0=4.5\), the distance from the predictor mean is zero:
The half-width is about 7.786 outcome units, so the full interval width is about \(2(7.786)=15.57\) outcome units.
At \(x_0=1\), the distance is \(3.5\) predictor units:
The full width is about \(2(8.738)=17.48\) outcome units. For this fit, the interval at \(x_0=1\) is wider than the interval at the predictor mean because the location is farther from \(\bar{x}\). These are widths around their respective fitted values; the fitted centers need not be the same.
Worked Example: Comparing Designs With Different Predictor Spread
Consider two hypothetical designs, each with \(n=5\) observed predictor values and \(\bar{x}=6\). The first has \(x\) values \(4,5,6,7,8\), giving \(S_{xx}=10\). The second has \(x\) values \(0,3,6,9,12\), giving \(S_{xx}=90\). Suppose both fitted models have \(s=2\) outcome units and \(df=3\), so use \(t^*=3.182\) for a 95% prediction interval. Assume the regression and error conditions are appropriate in both fits. Compare widths at \(x_0=6\) and \(x_0=9\).
At \(x_0=6\), both designs predict at their sample predictor mean. The half-width is the same:
Thus, each full width is approximately \(2(6.971)=13.94\) outcome units. At the mean, the \(S_{xx}\) term contributes zero in either design.
At \(x_0=9\), the distance from the mean is 3 predictor units. For the first design:
Its full width is approximately \(18.44\) outcome units. For the more spread-out design:
Its full width is approximately \(14.51\) outcome units. With the other quantities held fixed, the more widely spread design has the narrower interval at this non-mean location. This comparison concerns the width formula; it does not imply the two models have the same fitted outcome at \(x_0=9\).
Overall Spread Is Not the Same as Local Density
The formula depends on the observed predictor values through \(n\), \(\bar{x}\), and \(S_{xx}\). It does not contain the number of observations in a small neighborhood of \(x_0\). Consequently, two designs with the same \(n\), \(\bar{x}\), and \(S_{xx}\), paired with the same \(s\) and \(t^*\), have the same formula-based prediction-interval width at a given \(x_0\), even if their observations are arranged differently near that location.
This does not mean the placement of observations is irrelevant to regression analysis. The full pattern can matter for whether a straight-line model and its error assumptions are reasonable. But for the specific width calculation in simple regression, local density is not an extra multiplier or adjustment beyond the summaries in the formula.
Worked Example: A Local Gap Does Not Add a Separate Width Term
Two hypothetical designs each have \(n=4\) predictor values with \(\bar{x}=50\) and \(S_{xx}=10\). Design A has values \(48,49,51,52\), leaving a gap around 50. Design B has values \(50-\sqrt{5},50,50,50+\sqrt{5}\), placing two observations exactly at 50. Both have the stated mean and spread: in Design A the deviations are \(-2,-1,1,2\), whose squared sum is 10; in Design B they are \(-\sqrt{5},0,0,\sqrt{5}\), whose squared sum is also 10.
Suppose each fit has residual standard error \(s=1.5\) outcome units, \(df=2\), and use \(t^*=4.303\) for a 95% prediction interval. At \(x_0=50\), the half-width in either design is
Each interval therefore has a full width of about \(14.43\) outcome units. The local arrangement differs, but the quantities in the width formula are the same, so the widths are the same. This example isolates the formula’s behavior; it does not establish that local spacing can never affect the suitability of a regression model.
Why the Distinction Matters
When reporting or comparing prediction intervals, it is easy to say vaguely that a prediction is less precise because “there are fewer data nearby.” The formula gives a more precise account. First locate \(x_0\) relative to \(\bar{x}\). Then consider the overall predictor spread \(S_{xx}\), alongside \(n\), \(s\), and \(t^*\). A point far from the mean tends to have a wider interval, while a broad predictor spread reduces the distance-related contribution, all else equal.
The distinction also prevents an overstatement: a wide spread does not make every prediction interval narrow. The base terms remain, and actual fits can have different residual standard errors. Width is measured in outcome units, even though \(x_0-\bar{x}\) and \(S_{xx}\) use predictor units; their squared ratio is dimensionless, as required for a multiplier of \(s\).
Common Mistake
Wrong reasoning: “There are no observations exactly at the prediction value, so the interval must be wider than if observations were nearby.” This treats local density as though it were a separate term in the simple-regression width formula.
Correction: Calculate the width from the formula. The location contribution is \((x_0-\bar{x})^2/S_{xx}\), so a prediction can have a wide interval because it is far from the mean relative to the design’s overall spread. A local gap by itself is not a separate width adjustment. Also compare widths only with the relevant quantities—especially \(s\), \(n\), and \(t^*\)—accounted for.
Check Your Understanding
Use the formula and explain the reasoning in each answer.
- With \(n\), \(s\), \(t^*\), and \(S_{xx}\) fixed, why is the prediction-interval half-width smallest at \(x_0=\bar{x}\)?
- If the predictor spread \(S_{xx}\) increases while the distance \(|x_0-\bar{x}|\) is nonzero and other quantities remain fixed, what happens to the distance contribution to the width?
- Why does increasing \(S_{xx}\) alone not change the formula-based width at \(x_0=\bar{x}\)?
- Two designs have the same \(n\), \(\bar{x}\), and \(S_{xx}\), but different numbers of observations near \(x_0\). Under otherwise equal conditions, does the width formula give different widths? Explain.
- What are the units of the square-root multiplier, the prediction standard error, and the interval half-width?