Predicting One New Response
A fitted regression line estimates the mean response associated with a predictor value. Often, however, the question concerns one particular future case: for example, the delivery time for one new order, given its distance, or the blood pressure of one new patient, given an explanatory measurement. A point prediction gives a single fitted value, but actual individual responses vary around the regression line. A prediction interval gives a range of plausible values for one new response while accounting for that variation and for uncertainty in the fitted line.
The target is important. At a specified predictor value \(x^*\), let \(Y_{\text{new}}\) denote the response for one new individual. A prediction interval concerns \(Y_{\text{new}}\), not the unknown mean response at \(x^*\). The interval is conditional on the chosen predictor value and on the regression model being suitable there.
Model and Prediction-Interval Formula
For simple linear regression, suppose the observed responses satisfy \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\), for \(i=1,\ldots,n\). The predictor values are treated as fixed, or the analysis is understood conditional on them. The errors are independent, have mean zero, have the same variance \(\sigma^2\), and follow a normal distribution. Equivalently, \(Y_i\mid x_i\sim N(\beta_0+\beta_1x_i,\sigma^2)\). A new response at \(x^*\) is assumed to follow this same model and to have an error independent of the data used to fit the line.
In practice, the model conditions are assessed using the data and the study design. The conditional mean should be adequately linear over the predictor range of interest; observations and the new response should be independent; the spread of errors should be reasonably constant; and the error distribution should be approximately normal for a small-sample t interval. The prediction should generally be made within the observed predictor range, since the linear pattern and error behavior may not continue beyond it.
Write \(\hat{y}^*=b_0+b_1x^*\) for the fitted response at \(x^*\), \(\bar{x}\) for the sample mean of the predictor, and \(S_{xx}=\sum_{i=1}^n(x_i-\bar{x})^2\). Let \(s=\sqrt{SSE/(n-2)}\) be the residual standard error, where \(SSE\) is the sum of squared residuals. With \(t^*=t_{n-2,\,1-\alpha/2}\), the critical value having cumulative probability \(1-\alpha/2\) for a t distribution with \(n-2\) degrees of freedom, the prediction interval is:
The square-root factor multiplied by \(s\) is the prediction standard error. Its terms account for uncertainty in estimating the fitted mean at \(x^*\) and for the random variation of a new individual response around that mean. The interval endpoints have the same units as the response. The \(n-2\) degrees of freedom arise because the fitted simple linear regression estimates two coefficients, the intercept and slope.
Why This Standard Error Applies
A brief derivation shows why the formula includes these sources of variability. In the model, the new response is \(Y_{\text{new}}=\beta_0+\beta_1x^*+\varepsilon_{\text{new}}\), while its fitted value is \(b_0+b_1x^*\). Their difference is
The new error is independent of the data used to estimate the line. Its variance is \(\sigma^2\). Under the simple linear regression model, the variance of the estimation error in the fitted mean at \(x^*\) is \(\sigma^2\left(\frac{1}{n}+\frac{(x^*-\bar{x})^2}{S_{xx}}\right)\). Adding the two variances gives:
Replacing \(\sigma\) with \(s\) estimates the standard deviation of this prediction error. Under the stated normal-error model, the standardized prediction error uses the residual estimate \(s\) and has a t distribution with \(n-2\) degrees of freedom. Multiplying its standard error by the corresponding t critical value gives the margin of error in the formula.
Constructing and Interpreting the Interval
The calculation follows a consistent sequence. First identify the new individual response and the predictor value at which it is to be predicted. Then check whether the regression model is appropriate for the data and whether that value is in a suitable range. Finally, obtain the fitted value and the regression summaries, calculate the prediction standard error, choose the t critical value for the desired confidence level, and form the endpoints.
Worked Example: Predicting One Delivery Time
Hypothetical data: A delivery service fits a simple linear regression predicting delivery time, in minutes, from route distance, in kilometers. For \(n=10\) sampled deliveries, the summary values are \(\bar{x}=5\) km, \(S_{xx}=40\) km\(^2\), and residual standard error \(s=3\) minutes. At \(x^*=7\) km, the fitted delivery time is \(\hat{y}^*=20\) minutes. Construct a 95% prediction interval for one new delivery on a 7 km route.
Assume the hypothetical diagnostic checks show no substantial curvature or changing spread, that the observations are independent, and that residuals are reasonably consistent with a normal distribution. The new delivery is assumed to come from the same process. Since 7 km is within the observed range of route distances, using the fitted model there is reasonable.
There are \(n-2=8\) degrees of freedom. The 95% t critical value is approximately \(t^*=2.306\). The prediction standard error is:
The margin of error is \(2.306(3.286335)\approx 7.578\) minutes. Thus the interval is:
Under the model, this 95% prediction-interval procedure is designed to cover the delivery time of one new 7 km delivery in 95% of repeated samples and new deliveries. It does not say that 95% of delivery times must fall in this particular interval, nor does it assign a 95% probability to the fixed, already-calculated endpoints.
Worked Example: Predicting a Patient’s Measurement
Hypothetical data: A clinic models a measurement in milligrams per liter from an explanatory measurement in the same units. The fitted regression uses \(n=16\) hypothetical observations, with \(\bar{x}=12\), \(S_{xx}=300\), and residual standard error \(s=4\) mg/L. At \(x^*=15\) mg/L, the fitted response is \(\hat{y}^*=52\) mg/L. Find a 95% prediction interval for one new patient with predictor value 15 mg/L.
For this example, suppose the study design supports independent observations and the residual checks show an adequately linear mean pattern, roughly constant spread, and no serious departure from normality. Assume also that the new patient is from the same population and that 15 mg/L lies within the sampled predictor range.
Here \(df=16-2=14\), for which the 95% critical value is approximately \(2.145\). The standard error is:
The margin is \(2.145(4.18091)\approx8.968\) mg/L, so:
The interval estimates a range produced by a 95% procedure for one new patient’s response at a predictor value of 15 mg/L. It is not an interval for the average response of all patients with that predictor value.
Worked Example: Prediction at the Mean Predictor Value
Hypothetical data: A researcher fits a regression predicting a laboratory response, in units, from a predictor measured in units. The model has \(n=25\), \(\bar{x}=100\), \(S_{xx}=600\), \(s=5\) response units, and fitted response \(\hat{y}^*=72\) units at \(x^*=100\). Construct a 95% prediction interval for one new response.
Suppose observations were independently collected, residual plots show a plausible linear mean and approximately constant spread, and the residual distribution is reasonably normal. The new response is assumed independent of the sample and drawn from the same process. The target value is the center of the observed predictor values, so this is not an extrapolation.
The degrees of freedom are \(25-2=23\), and the 95% t critical value is approximately \(2.069\). Because \(x^*=\bar{x}\), the location term is zero:
The margin of error is \(2.069(5.09902)\approx10.550\) units. Therefore:
In context, the interval procedure is intended to capture the response of one new individual with predictor value 100 units 95% of the time over repeated sampling under the model. It does not guarantee that any particular new response will lie in the interval.
Common Mistakes and Practical Checks
A prediction interval is useful when a decision concerns an individual case rather than a group average. For example, an organization may need a plausible range for one future service time to plan staffing, or a clinician may want a range of outcomes for one new patient. The interval communicates that the fitted value is not a guaranteed outcome. Its reliability depends on whether the model reasonably describes the population and whether the new case is comparable to the observations used to fit it.
- Confusing the target with a mean. A fitted value \(\hat{y}^*\) estimates the model’s mean response at \(x^*\); the prediction interval targets one new response.
- Omitting the individual-error contribution. Using only the uncertainty for an estimated mean response does not give the prediction standard error shown here. For an individual prediction, use the full formula, including the leading \(1\) under the square root.
- Calling the calculated interval a probability statement about fixed endpoints. The 95% refers to the long-run coverage rate of the interval procedure under the model, not a 95% probability that the fixed endpoints contain a response.
- Ignoring the study design or diagnostics. A formula cannot correct for dependent observations, a badly misspecified linear mean, or a new case outside the model’s useful range.
- Mixing units. The fitted value, residual standard error, margin of error, and interval endpoints all use response units. The predictor’s units appear in the location calculation but not in the final endpoints.
Before reporting a prediction interval, identify the individual response being predicted, state its predictor value and response units, document the model checks, and interpret the confidence level as a repeated-procedure coverage statement. These steps make clear both what the interval says and the conditions on which it depends.
Check Your Understanding
Answer each question using the prediction-interval formula and its interpretation.
- In a simple linear regression with \(n=18\), how many degrees of freedom are used for the t critical value in a prediction interval?
- At \(x^*\), explain what the prediction interval targets and how that differs from the fitted mean response.
- A 95% prediction interval is reported as 14 to 26 minutes for one new case. State a correct interpretation of the 95% confidence level.
- What does the term \(s\) represent in the prediction standard error, and what are its units?
- Why should a prediction at a value far beyond the observed predictor range be treated cautiously, even if the formula can be evaluated?