Example 1 — Compare two models' gaps
Easy
Actual values are 10,20,30. Model A predicts 11,19,31; Model B predicts 5,25,18. Which fits better?
Show the steps and the answer
Find A's residuals, actual minus predicted: 10−11=−1, 20−19=+1, 30−31=−1.
Each residual is how far the model missed one actual value, and its sign says whether it guessed high or low.
Find B's residuals: 10−5=+5, 20−25=−5, 30−18=+12.
B misses every value by at least 5.
Total the sizes: A gives 1+1+1=3; B gives 5+5+12=22.
Adding absolute values stops positive and negative misses from cancelling each other.
Cross-check with squared residuals: A gives 1+1+1=3; B gives 25+25+144=194.
Squaring punishes big misses most, so B's 12-point miss dominates; A wins on either measure.
Answer: Model A fits better (smaller total residual)
Takeaway: Compare models by the size of their residuals on the same data. A misses by 1 each time; B misses by as much as 12.
Example 2 — Measuring relationship, not fit
Standard
The same data set, with the actual values 10,20,30 measured at x=1,2,3: are x and y positively correlated?
Show the steps and the answer
Read what is asked: whether the two variables rise together, not how well a model's predictions landed.
Correlation describes the raw data; no model's predictions are involved.
Write the data as pairs, taking the inputs as equally spaced: (1,10), (2,20), (3,30).
Correlation needs both variables, and the problem gives only the outputs, so this assumption is stated openly.
See the pattern: each step of 1 in x adds exactly 10 to y.
Points that rise by the same amount at every step lie exactly on an upward line.
Conclude: r=1, a perfect positive correlation.
r measures how close the points lie to a straight line, and these lie on one that slopes up.
Answer: Yes, they are positively correlated: report r. With the values 10,20,30 at equally spaced inputs, the points lie exactly on a rising line, so r=1.
Takeaway: Correlation describes the data's own relationship; model fit judges one model's predictions. Here r=1, even though Model B was a poor model of the same data.
Example 3 — Find the mistake: residuals that sum to zero
Application
A least-squares line is fit to five points. Its residuals at x=1,2,3,4,5 are +4,−2,−4,−2,+4. Ravi writes: "The residuals add up to 0, so the line fits the data well." Find the mistake and correct it.
Show the steps and the answer
Check Ravi's sum: 4−2−4−2+4=0.
The sum is 0, but a least-squares line always makes its residuals sum to 0, so this says nothing about fit.
Read the signs in order of x: +,−,−,−,+.
Positive at both ends and negative in the middle is a U shape, not random scatter.
Interpret the U: the actual points sit above the line at both ends and below it in the middle, so the data bends upward.
A model with the wrong shape misses in a predictable pattern, which is exactly what these residuals show.
Fix the model: try a curve such as a quadratic, and check that its residuals scatter without a pattern.
A good fit leaves residuals that look like noise, above and below zero in no particular order.
Answer: The line does not fit well: the residuals form a U (+,−,−,−,+), so the data curves and a quadratic model is needed. A zero sum is automatic for a least-squares line.
Takeaway: Look at the pattern of residuals, not just their total. A curved pattern means the model has the wrong shape.