Statistics & Probability · Grade 9
Residuals and the Correlation Coefficient
Quick answer
A residual is the gap between an actual data point and the value a model predicts for it. Plotting every residual shows whether a line was the right model: random scatter means yes, a curve means no. The correlation coefficient r summarizes a straight-line relationship in one number between −1 and 1, with its sign giving direction and its size giving strength.
What you'll learn
- Calculate and interpret a residual
- Use a residual plot to judge whether a linear model fits
- Interpret the correlation coefficient r
A residual is the model’s miss
A line of best fit predicts a value for every . The actual data rarely lands exactly on it, and the gap has a name.
A line predicts test scores from hours studied: . A student who studied hours scored .
| Residual | Where the point sits | Reads as |
|---|---|---|
| positive | above the line | did better than predicted |
| zero | on the line | exactly as predicted |
| negative | below the line | did worse than predicted |
The order matters. Actual minus predicted, always. Reversing it flips every sign and turns “above the line” into “below”.
The hat on marks a predicted value, keeping it separate from the that was actually measured.
The residual plot
Calculate the residual for every point, then plot each one against its . That is a residual plot, and it answers a question the scatter plot cannot answer by eye: was a straight line the right model at all?
| Residual plot | Conclusion |
|---|---|
| random scatter around zero | a linear model fits |
| a curved pattern | the data is curved; a line is the wrong model |
| a fan that widens | the line’s errors grow with |
Random is good. If the line captured the trend, what is left over is noise, and noise has no shape. A pattern in the residuals is trend the line failed to capture.
That U shape means the data bends. A straight line cuts under it at both ends and over it in the middle, so the residuals come out positive, then negative, then positive again. The fix is a different model, often a quadratic or an exponential, not a better line.
Why a curve can hide in a scatter plot
A gently curved cloud of points can look close enough to straight on a scatter plot. The line runs through the middle and seems to fit.
The residual plot takes the trend away and magnifies what remains. Small, systematic misses that were invisible beside a large rising trend become the only thing on the graph.
That is why the residual plot is checked after fitting a line, even one that looked good. The scatter plot shows whether there is a trend; the residual plot shows whether you described it correctly.
The correlation coefficient
The correlation coefficient, , summarizes how tightly data follows a straight line in a single number.
| Meaning | |
|---|---|
| perfect positive line — every point on a rising line | |
| close to | strong positive linear relationship |
| close to | weak or no linear relationship |
| close to | strong negative linear relationship |
| perfect negative line |
The sign is direction. The distance from zero is strength. An of is a stronger relationship than , because is farther from zero. The minus sign only says the line runs downhill.
has no units and does not change if you switch units, say from inches to centimeters. It measures the shape of the cloud, not the size of the numbers.
Computing by hand is long, and in practice a graphing calculator or a
spreadsheet’s CORREL function produces it. The skill that matters is reading it.
What r cannot tell you
| Claim | Why does not support it |
|---|---|
| the relationship is linear | a curve can produce a large over a short range |
| there is no relationship | a perfect U shape can give close to |
| one causes the other | says nothing about why the points line up |
A large with a curved residual plot means the relationship is strong and not linear. Always pair with a look at the residuals.
And a strong correlation is still only a correlation. Correlation is not causation: a third, lurking variable can move both quantities together.
Worked examples
Common mistakes
Practice problems
-
The actual value is and the predicted value is . Find the residual.
Answer
Full solution
.
-
The actual value is and the predicted value is . Find the residual.
Answer
Full solution
, so the point is below the line.
-
A point has a residual of . Where does it sit?
Answer
On the line
Full solution
Actual equals predicted.
-
Using , find the residual for the point .
Answer
Full solution
, and .
-
What range of values can take?
Answer
From to
Full solution
The ends are perfect straight lines.
-
Describe .
Answer
A strong positive linear relationship
Full solution
Close to and positive.
-
Which is stronger, or ?
Answer
Full solution
is farther from zero than .
-
A residual plot shows a clear U shape. Is a linear model appropriate?
Hint
What does a pattern in the residuals mean?
Answer
No
Full solution
A pattern in the residuals is trend the line missed.
A U shape means the line runs under the data at both ends and over it in the middle, so the data curves.
A quadratic model would suit it better than any straight line.
-
Ice cream sales and sunburns give across a year. Does eating ice cream cause sunburn?
Answer
No
Full solution
The correlation is strong, but only measures how well the points line up.
Hot, sunny weather increases both ice cream sales and sunburns. It is a lurking variable, and it explains the correlation without either one causing the other.
-
Using , Kara finds the residual for as and says the point is above the line. Find her error.
Hint
Which comes first in a residual, actual or predicted?
Answer
She subtracted in the wrong order. The residual is ; the point is below the line.
Full solution
Kara’s prediction is right: .
A residual is actual minus predicted. The actual value is , so the residual is .
A negative residual means the point is below the line — the student did worse than the model predicted.
Reversing the subtraction changes more than the sign on paper. It reverses the conclusion, putting the point on the wrong side of the line.
Frequently asked questions
What is a residual?
Actual value minus predicted value. A positive residual means the point sits above the line; a negative one means it sits below.
What does a residual plot show?
Whether the model's errors are random. Scattered residuals with no pattern mean the line fits; a curved pattern means the data needs a different model.
What does the correlation coefficient r measure?
How closely data follows a straight line. It runs from −1 to 1: the sign gives the direction and the distance from zero gives the strength.
Does r = 0 mean no relationship?
It means no straight-line relationship. Data can follow a perfect curve and still have r close to zero.
Does a strong correlation prove cause?
No. r measures how well points line up, not why. A lurking variable can drive both quantities.
Standards alignment
This lesson covers the following Common Core State Standards for Mathematics.
- CCSS.MATH.CONTENT.HSS.ID.B.6aInterpreting Categorical and Quantitative DataFit a function to the data; use functions fitted to data to solve problems in the context of the data.
- CCSS.MATH.CONTENT.HSS.ID.B.6bInterpreting Categorical and Quantitative DataInformally assess the fit of a function by plotting and analyzing residuals.
- CCSS.MATH.CONTENT.HSS.ID.C.8Interpreting Categorical and Quantitative DataCompute (using technology) and interpret the correlation coefficient of a linear fit.