One Trend, Many Individual Outcomes
A scatterplot may show a clear upward or downward pattern without placing every point on one straight line. The least-squares regression line summarizes the overall linear trend in paired observations. It does not promise that the response for each individual will equal the value predicted by the line. Recognizing this distinction helps keep a regression equation useful without treating it as a rule that every observation must follow.
For each observed pair \((x_i,y_i)\), the line gives a fitted value \(\hat{y}_i\) at the observed explanatory value \(x_i\). The observed response \(y_i\) may be greater than, less than, or equal to that fitted value. The difference is a residual: the signed prediction error for that observation. Residuals express how far the observed points depart from the line, in the response variable's units.
This subtraction has an exact interpretation:
The observed response is the fitted value plus the residual. Thus the line provides one part of the description—the linear trend—and the residual records the difference between that trend's fitted value and the individual observation. A regression line is not an assertion that all residuals vanish.
Worked Example: Observed Scores and Fitted Scores
Suppose, hypothetically, a tutor records study hours \(x\) and quiz scores \(y\), out of 100, for five students. A fitted regression line for these data is \(\hat{y}=40+6x\). Calculate each fitted value and residual, then describe what the residuals show.
For a student who studied 1 hour, the fitted score is \(40+6(1)=46\). The observed score is 44, so the residual is \(44-46=-2\) points. Applying the same calculations to each pair gives:
| Study hours \(x\) | Observed score \(y\) (points) | Fitted score \(\hat{y}=40+6x\) (points) | Residual \(y-\hat{y}\) (points) |
|---|---|---|---|
| 1 | 44 | 46 | -2 |
| 2 | 55 | 52 | 3 |
| 3 | 56 | 58 | -2 |
| 4 | 67 | 64 | 3 |
| 5 | 68 | 70 | -2 |
For example, at 4 study hours, the line gives \(40+6(4)=64\) points, while the observed score is 67 points. The residual is \(67-64=3\) points, so this student scored 3 points above the fitted value. At 5 hours, the residual is \(68-70=-2\) points: that student scored 2 points below the fitted value.
The fitted scores change by 6 points for each additional study hour because that is the line's slope. Yet the observed scores do not all land on those fitted values. The residuals describe those individual departures; they do not change the fact that the line summarizes the linear pattern in the paired data.
What Would a Perfect Fit Require?
A line fits a set of observations perfectly when every observed point lies exactly on it. In residual language, that requires \(e_i=0\) for every observation. If even one observation has a nonzero residual, the line is not a perfect fit to the full data set.
The key justification follows directly from the least-squares criterion. Least squares chooses a line to minimize the sum of squared residuals among straight lines. Each squared residual is nonnegative, so their sum can equal zero only if every residual equals zero. If no straight line passes through all the observed points, no line can make that sum zero, and the least-squares fit must leave some nonzero residuals.
For the quiz data, the residuals are \(-2, 3, -2, 3,\) and \(-2\) points. Their squared values are \(4, 9, 4, 9,\) and \(4\) points squared, so the sum of squared residuals is \(4+9+4+9+4=30\) points squared. It is positive, confirming that the line does not fit these observations perfectly. The square of a residual is used in the least-squares criterion; when describing a particular student's departure, the original signed residual in points is usually easier to interpret.
Worked Example: Positive and Negative Residuals
Suppose a hypothetical data set relates the number of exercise sessions per week \(x\) to resting heart rate \(y\), measured in beats per minute (bpm). The fitted line is \(\hat{y}=80-2x\). Use the observations below to interpret the residuals.
| Sessions per week \(x\) | Observed heart rate \(y\) (bpm) | Fitted value \(80-2x\) (bpm) | Residual \(y-\hat{y}\) (bpm) |
|---|---|---|---|
| 1 | 77 | 78 | -1 |
| 2 | 79 | 76 | 3 |
| 3 | 71 | 74 | -3 |
| 4 | 73 | 72 | 1 |
At 2 sessions per week, the fitted value is \(80-2(2)=76\) bpm. The observed heart rate is 79 bpm, giving a residual of \(79-76=3\) bpm, or 3 bpm above the line. At 3 sessions per week, the fitted value is \(80-2(3)=74\) bpm and the observed value is 71 bpm, so the residual is \(71-74=-3\) bpm, or 3 bpm below the line.
The signs convey direction, not whether an observation is good or bad: positive means observed above fitted, negative means observed below fitted. Both positive and negative residuals are ordinary in an imperfect fit. The line's negative slope describes a downward linear trend in this hypothetical data set; it does not establish that exercise causes a change in heart rate.
Why Observations Differ From the Line
People, objects, and events differ in many ways, while a regression line uses only one explanatory variable and a straight-line pattern to summarize the paired data. Other characteristics may be related to the response, and measurements may contain variation. The straight-line summary itself may also leave some systematic pattern unrepresented. These are possible reasons for departures, not explanations that can be identified just by looking at a nonzero residual.
A fitted value should therefore not be mistaken for a guaranteed individual outcome. It is the response value assigned by the line at a particular \(x\). If two individuals have the same explanatory value, the line gives them the same fitted value, even though their observed responses can differ.
Worked Example: Equal Fitted Values, Different Observations
In another hypothetical data set, a fitted line relates study hours to quiz score: \(\hat{y}=50+5x\), where \(y\) is measured in points out of 100. Six students studied for 2, 2, 4, 4, 6, and 6 hours, respectively, and earned scores of 56, 64, 67, 73, 78, and 82 points. Calculate the fitted values and residuals.
| Study hours \(x\) | Observed score \(y\) (points) | Fitted score \(50+5x\) (points) | Residual \(y-\hat{y}\) (points) |
|---|---|---|---|
| 2 | 56 | 60 | -4 |
| 2 | 64 | 60 | 4 |
| 4 | 67 | 70 | -3 |
| 4 | 73 | 70 | 3 |
| 6 | 78 | 80 | -2 |
| 6 | 82 | 80 | 2 |
Both students who studied for 2 hours have a fitted score of \(50+5(2)=60\) points, but their observed scores are 56 and 64. Their residuals are \(56-60=-4\) and \(64-60=4\) points. The line gives the same fitted value at the same study time; it does not require the students to earn the same score.
The same pattern appears at 4 and 6 hours. At 4 hours, the fitted value is 70 points while the observed scores are 67 and 73; at 6 hours, the fitted value is 80 points while the observed scores are 78 and 82. These paired observations make visible the difference between describing a trend and reproducing each individual outcome.
When Imperfect Fit Matters
Whether departures matter depends on the purpose and context of the analysis. A line may summarize a clear trend even when individual observations are not close to it. Conversely, a line can be a poor summary if departures are large or if their pattern suggests that a straight line misses important features of the relationship. The regression line alone does not show every detail of the scatter around it.
Keep three questions separate:
- What is the trend? The line summarizes the direction and rate of a linear pattern in the observed data.
- How does an observation compare with that trend? Its residual gives the signed vertical difference, in the response variable's units.
- What caused the difference? A residual alone does not identify a cause or show which other variables matter.
When describing a fit, name both the trend and the remaining variation. For example: “In these hypothetical data, fitted quiz scores increase with study hours, but individual scores differ from the fitted values by several points.” This wording respects what the line shows without implying that it perfectly predicts each score or explains why students differ.
Check Your Understanding
Answer in context, and include units where they are relevant.
- A fitted value for an observed response is 18 kg, and the actual response is 20 kg. Calculate the residual and interpret its sign.
- What must be true of every residual for a regression line to fit all observations perfectly?
- A student has a residual of \(-5\) points. Is the observed score above or below the fitted value, and by how many points?
- Two people have the same value of the explanatory variable but different observed responses. Why can the line still assign them the same fitted value?
- Why does a positive residual, by itself, not explain why the observed response was above the fitted value?