Step by step
The question
Question: find the residuals for the line of best fit y = 2x + 1 and the points (1, 4), (2, 4) and (3, 8).
The points are the real data.
A residual tells how far a point is from the line.
Residual = actual minus predicted.
Actual is the real y.
Predicted is the y the line gives.
1 Predict
First we predict each y: x = 1 into the line gives 3.
Next: x = 2 into the line gives 5.
Next: x = 3 into the line gives 7.
2 Actual minus predicted
Careful!
Not predicted minus actual.
That flips the sign.
Actual comes first.
Actual minus predicted.
4 minus 3 is 1: 1 above the line.
4 minus 5 is −1: 1 below the line.
8 minus 7 is 1: 1 above the line.
So the residuals are 1, −1, 1.
Positive means above the line, negative means below.
3 Check
Let's check with a picture.
The line of best fit.
The points.
The residual is the distance up or down from the line to the point.
And predicted plus residual gives the actual y: 4, 4, 8.
So the answer is right!
Let's look back.
First: predict.
Then: actual minus predicted.
Last: check.