Why the Sign of a Residual Matters
A regression model can make predictions that are close on average yet consistently miss in a particular range. For example, it might tend to predict too low for observations with small fitted values and too high for observations with large fitted values. Looking at a residual plot helps reveal this kind of systematic offset: a sustained region of positive residuals or negative residuals is different from residuals that fluctuate around zero without a visible pattern.
A residual plot is a diagnostic, not a verdict. A visible offset suggests that prediction errors may depend on where an observation lies in the fitted-value range. It does not, by itself, identify the cause or prove that a particular change to the model is appropriate.
A residual-versus-fitted plot places \(\hat{y}_i\) on the horizontal axis and \(e_i\) on the vertical axis. The horizontal line \(e_i=0\) marks exact agreement between observed and predicted responses. A point above this line represents underprediction; a point below it represents overprediction. A sustained offset is a run or region of nearby fitted values where residuals tend to have the same sign, rather than alternating around zero without an apparent structure.
What a Sustained Offset Suggests
The main question is not whether every residual is exactly zero. That is rarely expected. Instead, look for a region in which the residuals are mostly on one side of zero, or cluster at values noticeably above or below zero. The pattern may indicate that predictions are systematically too low or too high for observations in that range. The residual magnitudes matter too: a handful of tiny residuals on one side of zero is weaker evidence of a practically important offset than a sustained group of larger residuals.
A residual plot does not tell you why a region is offset. It may prompt a closer look at the model, the data, or the prediction task, but a plot alone cannot establish which explanation is correct. Nor does a visible offset automatically show that the model is wrong in every respect: a model can be useful for some purposes and still have limitations in a particular range.
The interpretation also depends on what data the predictions come from. On a training sample, the model was fitted using the same outcomes whose residuals are plotted. If predictions are evaluated on a separate validation sample, the residuals are calculated for data not used to fit the model. A run of same-sign residuals in either plot is worth noticing, but the samples serve different purposes and their residual patterns should be described accordingly.
Worked Example: Underprediction in a Middle Range
Suppose a hypothetical model predicts a response measured in units. The following table summarizes ten training observations: two observations at each of five fitted values. Each listed residual occurs twice at that fitted value.
| Fitted value \(\hat{y}\) | Residuals \(e_i\) for two observations | Mean residual at that fitted value |
|---|---|---|
| 10 | \(-2, -2\) | \((-2-2)/2=-2\) |
| 20 | \(0, 0\) | \((0+0)/2=0\) |
| 30 | \(3, 3\) | \((3+3)/2=3\) |
| 40 | \(2, 2\) | \((2+2)/2=2\) |
| 50 | \(-3, -3\) | \((-3-3)/2=-3\) |
For example, at fitted value 30, each observation is \(3\) units above its prediction because \(e_i=y_i-\hat{y}_i=3\). Thus each observed response there is \(30+3=33\), and the model underpredicts by \(3\) units. At fitted value 40, each observed response is \(40+2=42\), also an underprediction.
The residuals are positive at fitted values 30 and 40, with a mean of \((3+2)/2=2.5\) across the four observations in those two groups. The model therefore tends to underpredict in this middle range. The endpoints have negative residual means, \((-2-3)/2=-2.5\), so the model overpredicts there. This pattern merits investigation; the plot alone does not establish its cause or prescribe a particular model change.
A Justification for Reading Residuals This Way
A simple calculation explains why residual sign has this interpretation. Suppose the response is \(Y_i\), and its conditional mean under the candidate model is \(m_i\). Write \(Y_i=m_i+\varepsilon_i\), where \(\varepsilon_i\) is the deviation from that mean. For a residual plot to support reasoning about conditional means given the predictors used in the fit, a relevant assumption is \(E(\varepsilon\mid X)=0\), where \(X\) denotes the full predictor information used in the model. This is stronger than assuming only \(E(\varepsilon_i\mid x_i)=0\) for a single predictor value when other predictor information is also used. Under the full-information assumption, \(E(Y_i\mid X)=m_i\).
For a particular observation, the residual is the observed response minus its fitted value. Taking its conditional expectation, under that stated assumption, gives:
This identity says that the conditional mean residual compares the conditional mean response with the conditional mean fitted prediction. A group of residuals that tends to be positive is therefore evidence that responses in that region tend to exceed the fitted predictions. The calculation does not make every finite-sample pattern conclusive: residuals vary from observation to observation, and a plot is used to inspect the pattern in the observed data.
For a correctly specified linear mean model, this idea has a useful special case. Let \(Y\) be the vector of responses, \(X\) the full design matrix, and suppose \(E(Y\mid X)=X\beta\). For least squares with an intercept and a full-rank design matrix, the fitted vector is \(HY\), where \(H=X(X^\mathsf{T}X)^{-1}X^\mathsf{T}\). The residual vector is \(e=(I-H)Y\). Since \(HX=X\), its conditional expectation under the specified mean model is:
This result describes the expectation under the model; it does not mean that observed residuals must be scattered perfectly at random, or that an apparent pattern proves the model’s conditional mean is incorrect. It explains why a sustained offset is a diagnostic signal to examine rather than a pattern to ignore.
Worked Example: A Validation Sample with Positive Residuals
A hypothetical model predicts systolic blood pressure in millimeters of mercury (mmHg). It was fitted on one sample and evaluated on four separate validation observations.
| Predicted \(\hat{y}_i\) (mmHg) | Observed \(y_i\) (mmHg) | Residual \(e_i=y_i-\hat{y}_i\) (mmHg) |
|---|---|---|
| 100 | 104 | \(104-100=4\) |
| 110 | 114 | \(114-110=4\) |
| 120 | 123 | \(123-120=3\) |
| 130 | 132 | \(132-130=2\) |
All four residuals are positive. Their mean is \((4+4+3+2)/4=3.25\) mmHg. For these validation observations, the predictions are lower than the observed values by an average of 3.25 mmHg. In a residual-versus-fitted plot, the points would all lie above zero across this range.
This small hypothetical sample shows a descriptive offset, not proof that the model will underpredict every future observation or that the offset is statistically distinguishable from chance. The appropriate conclusion is limited to the data shown: the model underpredicted all four validation responses, and the average residual was 3.25 mmHg.
Why the Overall Average Can Hide an Offset
For least-squares regression with an intercept, the residuals in the fitting sample sum to zero. This is a property of the fitted model, not evidence that predictions are equally good throughout the fitted-value range. Positive residuals in one region can be balanced by negative residuals elsewhere. A plot can reveal this cancellation when a single overall average cannot.
Worked Example: Opposite Offsets Cancel Overall
Consider eight hypothetical training observations with fitted values and residuals as shown. The response is measured in the same units as the residuals.
| Fitted value | Residual | Fitted value | Residual |
|---|---|---|---|
| 5 | 3 | 9 | \(-1\) |
| 6 | 2 | 10 | \(-2\) |
| 7 | 2 | 11 | \(-2\) |
| 8 | 1 | 12 | \(-3\) |
The overall residual mean is \((3+2+2+1-1-2-2-3)/8=0/8=0\). Looking only at that number might suggest no overall offset, but the regional averages tell a different story. For fitted values 5 through 8, the mean residual is \((3+2+2+1)/4=2\). For fitted values 9 through 12, it is \((-1-2-2-3)/4=-2\).
The lower fitted range therefore shows a positive offset, or underprediction on average, while the higher fitted range shows a negative offset, or overprediction on average. The two regional patterns cancel in the overall mean. A residual plot is valuable partly because it retains this information about where predictions tend to err.
Reading the Plot Carefully
When inspecting a residual-versus-fitted plot for offsets, describe what is visible before proposing an explanation. It is useful to state the response units, the range of fitted values involved, which side of zero the residuals occupy, and whether the pattern is sustained or based on only a few points. For example: “Between fitted values of 30 and 40 units, most residuals are positive, suggesting underprediction in that range.” This is more informative than saying only that “the residual plot looks bad.”
A residual plot is not a formal test with a universal cutoff for how many same-sign points count as an offset. The visual assessment should account for the number and spread of observations: a region supported by many points is generally more informative than a region represented by one or two. Numerical summaries, such as mean residuals in clearly described ranges, can help communicate what the plot shows, but they do not replace the plot or automatically provide a formal test.
Keep the conclusion appropriately narrow. An offset indicates a pattern in prediction errors; it does not establish causation, identify a missing variable, or determine which model should replace the current one. The pattern is a reason to investigate further, using the study context and other diagnostics.
Common Mistake
Wrong reasoning: “The residuals average to zero, so there cannot be systematic prediction errors.”
Correction: In least-squares regression with an intercept, an overall residual average of zero can result from cancellation. Positive residuals in one fitted-value region and negative residuals in another may sum to zero while showing clear regional offsets. Examine the residual plot across the range, not just the overall average.
Check Your Understanding
Try these questions without looking back.
- An observation has an observed response of 28 units and a fitted value of 31 units. Calculate its residual and interpret its sign in context.
- What does a sustained group of positive residuals over a range of fitted values suggest about the model’s predictions in that range?
- Why can an overall mean residual of zero fail to reveal a regional offset in a least-squares training sample with an intercept?
- A validation sample has residuals of \(-2\), \(-1\), and \(-3\) mmHg. Calculate their mean and describe the pattern without making a claim about all future observations.
- Does a residual plot alone establish the cause of a systematic offset? Explain what it can and cannot support.