
compute and plot residuals to judge whether a linear model fits, and compute and interpret the correlation coefficient.
Instruction
Every model is wrong by some amount at every data point. Measuring those amounts tells you whether the model is useful.
Residuals. A residual is the actual value minus the predicted value:
residual = actual − predicted
For the student 160 cm tall with an arm span of 162 cm, the model predicts 1.02(160) − 3.76 ≈ 159.6 cm, so the residual is 162 − 159.6 = +2.4 cm. A positive residual means the point is above the line: the model underestimated. For the student 183 cm tall with an arm span of 181 cm, the prediction is about 183.1, and the residual is about −2.1 cm: the model overestimated.
All eight residuals, in order of height, are about −1.4, −0.6, 2.4, −1.7, 2.2, −0.9, 2.0 and −2.1 cm. For a least-squares line, the residuals always add to zero, like the deviations from a mean.
Residual plots. Plot each residual against its x-value, with a horizontal line at 0. If the linear model fits, the residuals scatter randomly above and below zero with no pattern, as they do here. If the residuals form a curve, for instance positive at both ends and negative in the middle, the relationship is curved and a line is the wrong kind of model. If the residuals fan out, the model predicts some ranges much better than others. A residual plot can reveal a bad fit that the scatter plot hid.
The correlation coefficient. The correlation coefficient r measures the direction and strength of a linear association. It is always between −1 and 1. Positive r means a positive association and negative r a negative one. Values near 1 or −1 mean points lie close to a line; values near 0 mean no linear pattern. For the arm-span data, technology gives r ≈ 0.98: a strong positive linear association. In a spreadsheet use CORREL; in Desmos the regression output shows r.
What r does not say. r has no units and does not change if you switch centimeters to inches. It does not measure the slope: a gentle line and a steep line can have the same r. It measures only linear association: points on a perfect parabola can have r near 0. And one outlier can change r dramatically, so always look at the plot.
Discourse protocol. Each group receives four claims to evaluate, such as “r = 0.9 means 90% of the points are on the line”, “r = −0.95 is weaker than r = 0.5 because it is negative” and “a residual of −3 means the model was 3 units too low”. For each, decide whether it is true, then write a correction or a justification with an example. Present the claim your group found hardest, and invite another group to challenge your reasoning.
📖 Read for this lesson
The reading opens over the lesson; close it to come back to exactly where you were. The checks below draw on it.
Formative check
Work through these before moving on. They are not graded — they tell you whether the standard below has landed yet.
A model predicts a value of 50 and the actual value is 46. What is the residual?
Which correlation coefficient shows the strongest linear association?
Simulation & tools
Residuals, the best-fit line and r
Set up. Open the sim and drag about eight points from the bucket onto the graph so they roughly follow an upward line.
Observe and record. (1) Turn on My Line and adjust it by eye; turn on its residuals and squared residuals and record the sum of squares it shows. (2) Turn on Best-Fit Line and record its equation, its sum of squares and the correlation coefficient r. Is the best-fit sum of squares smaller than yours? It must be; explain why in one sentence using the meaning of least squares.
Test a claim. Drag one point far from the others and record the new r. Then arrange points in a U shape and record r. What do these two experiments show about what r measures?
No device? Use the printed scatter plots: draw a line by eye, measure each residual with a ruler, and compare your sum of squares with the one given for the best-fit line.
Open in a new tab ↗ · PhET Interactive Simulations, University of Colorado Boulder · CC BY 4.0
Evaluate the claim “r = 0.9 means 90% of the points are on the line.” Explain what r = 0.9 actually tells you, and describe a data set whose r would be near 0 even though the variables are closely related.
How confident are you that you can use residuals and the correlation coefficient to judge how well a linear model fits?
Practice
Work these on paper or in your notebook, then open Check your answer. Aim for all of Fluency and Application; try at least one Challenge.
Printable version: this unit’s practice workbook (PDF)
Fluency
Build speed and accuracy with the core skill.
- Use technology to find the least-squares line and the correlation coefficient for (3, 19), (4, 18), (5, 27), (7, 32), (8, 36), (9, 38), (11, 42).
Check your answer
Answer: ŷ = 9.017 + 3.168x; r = 0.975Interpret the slope in context: the predicted change in y for each one-unit increase in x. - Use technology to find the least-squares line and the correlation coefficient for (1, 9), (2, 6), (3, 5), (6, -1), (7, -1), (10, -2), (11, -3).
Check your answer
Answer: ŷ = 8.375 − 1.141x; r = −0.946Interpret the slope in context: the predicted change in y for each one-unit increase in x. - Use technology to find the least-squares line and the correlation coefficient for (4, -4), (8, 2), (9, 1), (11, 3), (12, 5).
Check your answer
Answer: ŷ = −7.763 + 1.041x; r = 0.965Interpret the slope in context: the predicted change in y for each one-unit increase in x. - Use technology to find the least-squares line and the correlation coefficient for (1, 0), (3, -2), (4, 0), (5, 0), (11, 8), (12, 6).
Check your answer
Answer: ŷ = −2.920 + 0.820x; r = 0.917Interpret the slope in context: the predicted change in y for each one-unit increase in x. - For the model ŷ = 2x + 5, find the residuals for (3, 12), (5, 14) and (8, 22).
Check your answer
Answer: 1, −1, 1Residual = actual − predicted. - A residual is −3. Is the point above or below the line, and did the model overestimate or underestimate?
Check your answer
Answer: Below the line; the model overestimated by 3.
Application
Use the skill in context. Show your reasoning.
- Find the residual for the student 168 cm tall with a 170 cm arm span in Lesson 4.2.
Check your answer
Answer: About 2.23 cmPredicted 167.77 cm; 170 minus that. - Order these by strength of linear association: r = 0.45, r = −0.92, r = 0.78, r = −0.10.
Check your answer
Answer: −0.92, 0.78, 0.45, −0.10Compare |r|. - A residual plot shows residuals positive at both ends and negative in the middle. What does that say about the linear model?
Check your answer
Answer: The relationship is curved; a line is the wrong form.
Challenge
Stretch problems. Expect to think before you write.
- For the points (1, 2), (2, 4), (3, 5), find the least-squares line and r, and show that the residuals add to zero.
Check your answer
Answer: ŷ = 1.5x + 0.667; r ≈ 0.982; residuals −0.167, 0.333, −0.167 sum to 0Least-squares residuals always sum to zero.
Review
Keep earlier skills sharp.
- Solve the system: −5x + 4y = 0 and 6x − 2y = −14
Check your answer
Answer: (−4, −5)Check the ordered pair in both equations. - Solve: |x + 3| = 5
Check your answer
Answer: x = −8 or x = 2x + 3 = 5 or x + 3 = −5.
Six Claims About r, and the Data Sets That Settle Them
SLS original: six constructed data sets, each built so that one common claim about the correlation coefficient can be tested against it. All values are illustrative teaching data, not measurements of anything. · SLS original
Why this reading. The lab hands each group claims about r to evaluate and expects a correction with an example. An example is the hard part: it is easy to say “that is wrong” and hard to produce numbers that prove it. Here are six claims and six data sets, each one built so that the claim can be checked rather than argued about. Everything below is constructed teaching data — the numbers measure nothing real, and they were chosen precisely because real data rarely lands on a clean r.
Every set uses x = 1, 2, 3, …, 10 unless the table says otherwise. Each one’s least-squares line and r are given so that you can spend your time on the argument. Verify at least one of them with the column method from Lesson 4.2 before you trust any of them.
Set P — r = 0.900
y = 4, 8, 4, 15, 8, 14, 14, 23, 19, 26.
Sxx = 82.5, Sxy = 186.5, Syy = 520.5. Line: ŷ = 2.2606x + 1.0667. r = 0.900.
Residuals: +0.67, +2.41, −3.85, +4.89, −4.37, −0.63, −2.89, +3.85, −2.41, +2.33.
Not one residual is zero, so no point lies on the line: zero of the ten, not nine of the ten. Note also that the residuals add to zero, as they always do for a least-squares line.
Set P′ — Set P with every y tripled
y = 12, 24, 12, 45, 24, 42, 42, 69, 57, 78.
Line: ŷ = 6.7818x + 3.20. r = 0.900, exactly as before.
The slope is three times steeper and the correlation has not moved a thousandth. That is what it means to say r has no units: multiplying y by 3 multiplies Sxy by 3 and √Syy by 3, and they cancel.
Set Q — r = −0.950
y = 39, 37, 35, 29, 29, 28, 25, 28, 22, 22.
Sxx = 82.5, Sxy = −153, Syy = 314.4. Line: ŷ = −1.8545x + 39.60. r = −0.950.
Set R — r = 0.500
y = 6, 2, 13, 2, 12, 6, 8, 14, 8, 13.
Sxx = 82.5, Sxy = 61, Syy = 180.4. Line: ŷ = 0.7394x + 4.3333. r = 0.500.
Residuals: +0.93, −3.81, +6.45, −5.29, +3.97, −2.77, −1.51, +3.75, −2.99, +1.27.
Plot Q and R side by side. Q’s points hug its line; R’s scatter widely around its own. Strength is about how far the points sit from the line, and the sign has nothing to do with it.
Set T — a perfect parabola, r = 0.000
x = −4, −3, −2, −1, 0, 1, 2, 3, 4 and y = x² = 16, 9, 4, 1, 0, 1, 4, 9, 16.
Sxy = 0 exactly, so r = 0.000 and the least-squares line is the flat line ŷ = 6.667.
Knowing x here tells you y exactly. The relationship could not be tighter, and r is zero, because r measures only how close the points are to a straight line. The residual plot is the giveaway: +9.33, +2.33, −2.67, −5.67, −6.67, −5.67, −2.67, +2.33, +9.33, a clear valley.
Set U — one point, two conclusions
Eight points: x = 1 to 8, y = 5, 7, 4, 6, 5, 7, 4, 6.
Sxy = 0, so r = 0.000 and the best-fit line is ŷ = 5.5.
Now add a ninth point at (20, 40) and recompute everything from scratch: x̄ = 6.222, ȳ = 9.333, Sxx = 255.56, Sxy = 475.33, Syy = 1068. Line: ŷ = 1.86x − 2.24, and r = 0.910.
One point out of nine took the correlation from “no linear association at all” to “strong positive.” Look at the residuals of the nine-point fit: +5.38, +5.52, +0.66, +0.80, −2.06, −1.92, −6.78, −6.64, +5.04. The original eight points are now badly fitted by a line that exists to reach the ninth.
The six claims
- “r = 0.9 means 90% of the points are on the line.” Test against Set P.
- “r = −0.95 is weaker than r = 0.5 because it is negative.” Sets Q and R.
- “A residual of −3 means the model was 3 units too low.” Set P: the third point has residual −3.85. Was the prediction too low or too high there?
- “A steeper line means a stronger correlation.” Sets P and P′.
- “r near 0 means the two variables are unrelated.” Set T.
- “With nine data points, one unusual point cannot change much.” Set U.
For each: decide true or false, then write the correction with the data set as evidence, naming the numbers you are relying on. A correction that says “that is not what r means” without a data set is an opinion. One of these claims is closer to true than it looks — decide which, and say exactly what would have to change in its wording to make it correct.