Leave lesson

Statistics · Scatter graphs & correlation

1 / 16

Predicting from a line of best fit

How to read an estimate off a line of best fit in both directions, why a prediction inside the data is trustworthy and one outside it is not, and what the gradient of the line means in the context of the question.

Statistics · Scatter graphs & correlation

Predicting from a line of best fit

How to read an estimate off a line of best fit in both directions, why a prediction inside the data is trustworthy and one outside it is not, and what the gradient of the line means in the context of the question.

Why it works

Once a scatter graph has a line of best fit, the line stops being decoration and becomes a machine for making predictions. Feed it a value on one axis and it hands one back on the other. That is exactly what "use your line of best fit to estimate…" is asking for, and it runs in both directions: to get yy from xx, go up from xx until you meet the line, then across to the yy-axis; to get xx from yy, go across from yy until you meet the line, then down. The second direction catches people out, because the instinct is always to start on the horizontal axis.

Here are thirteen second-hand cars of one model. Age aa in years across, value vv in thousands of pounds up.1234567824681012age (years)value (£1000s)The line drawn through them is v=121.2av = 12 - 1.2a.

Every reading is an estimate, not a fact. Look at the crosses: almost none of them sit on the line. Two of the cars are 5 years old and they are worth £6400\pounds 6400 and £5500\pounds 5500; the line says £6000\pounds 6000, so it is wrong about both of them. The line describes the average behaviour of the group, so a value read off it is a sensible middle guess for a car you have not measured — not a promise about any particular car. Quote it as "about £6000\pounds 6000", and if you are asked to comment, say that it is an estimate.

Inside the data: interpolation. Take a 4-year-old car: v=121.2×4=7.2,about £7200.v = 12 - 1.2 \times 4 = 7.2, \quad \text{about } \pounds 7200. Why trust that? Because you have evidence on both sides of it. You measured 3-year-old cars and 5-year-old cars and they were worth roughly what the line says. The 4-year-old car sits in a gap fenced in by real observations, and the pattern you are leaning on is one you can watch holding right there. Estimating inside the range of the data is called interpolation.

Outside the data: extrapolation. Now try a 12-year-old car. Nothing stops you putting a=12a = 12 into the same line:

v=121.2×12=2.4.v = 12 - 1.2 \times 12 = -2.4.2468101214-5510(12, −2.4)age (years)value (£1000s)The line says the car is worth minus £2400\pounds 2400. That is not a small error, it is nonsense — nobody owns a car with a negative price. And notice that the arithmetic did nothing wrong; the assumption did. Running the line past 7 years assumes cars keep shedding £1200\pounds 1200 of value every year for ever, and you have not one single observation that says so. Real second-hand values drop fast at first and then flatten out at a few hundred pounds. The straight line was only ever a good description of the stretch of ages you actually looked at.

That is the whole difference. Interpolation rests on evidence; extrapolation rests on an assumption that the pattern continues, and the data you have cannot tell you whether it does. Push a straight line far enough and it nearly always turns absurd — a line fitted to children's heights between ages 3 and 11 would make a 40-year-old about 3 metres tall.

Commenting on reliability. "Comment on the reliability of your estimate" is an exam favourite, and a full answer needs two things, not one:
  1. Is the value inside the range of the data? Inside is interpolation, which
is supported; outside is extrapolation, which is a warning.
  1. How strong is the correlation? Strong correlation means the points hug
the line, so the line's answer is close to what really happens. Weak correlation means the points are spread widely about the line, so its answer can be a long way out.

Either one on its own is half an answer, because each can fail while the other passes. A prediction can be safely inside the range and still unreliable, because the correlation is weak. It can come from beautifully strong correlation and still be unreliable, because it is far outside the range.

What the gradient means. The gradient of the line is a rate: how much yy changes for every 11 that xx goes up. Take two points that lie *on the line* — never two crosses — and divide the rise by the run. For the cars, (1,10.8)(1,\,10.8) and (6,4.8)(6,\,4.8) are both on v=121.2av = 12 - 1.2a, so

gradient=4.810.861=65=1.2.\text{gradient} = \frac{4.8 - 10.8}{6 - 1} = \frac{-6}{5} = -1.2.

Then say it in the units of the question: the value falls by about £1200\pounds 1200 for each extra year of age. A bare number is not an interpretation — the interpretation is the sentence with the units in it.