Inside the data: interpolation
Three points have been measured, at x = 2, 4 and 6, and the line of best fit y = 0.8x + 1 is drawn through them. The data run from x = 2 to x = 6: that is the range of the data.
Reading the line at a value of x inside that range is called interpolation. At x = 4 the line gives y = 0.8 × 4 + 1 = 4.2. Measured points lie on both sides of x = 4, so the line is anchored there by real data, and an interpolated estimate is usually reasonable.
The data run from 2 to 6, so a reading at 4 sits inside them: that is interpolation.
Outside the data: extrapolation
Reading the line at a value of x outside the range of the data is called extrapolation. At x = 20 the line gives y = 0.8 × 20 + 1 = 17. But nothing was measured beyond x = 6, so nothing shows that the pattern carries on that far. Extrapolation assumes the pattern continues, and the data cannot check that assumption.
The line on the page continues as far as it is drawn, and the equation gives an answer for any x, so the arithmetic never warns that the answer is only a guess. The warning has to come from comparing x with the range of the data.
Stretched out to 20, the line gives 17, but all three measured points lie between 2 and 6. That is extrapolation, and nothing measured supports it.
An extrapolation that gives an impossible answer
A girl’s height is measured on her birthday at ages 6, 8, 10 and 12: 116 cm, 127 cm, 139 cm and 148 cm. The mean age is 9 and the mean height is 530 ÷ 4 = 132.5 cm, and the line of best fit through the mean point is h = 5.5a + 83, where a is her age in years and h is her height in centimeters. The gradient says she grew about 5.5 cm a year.
Interpolation works well. At age 11, inside the range from 6 to 12, the line gives 5.5 × 11 + 83 = 60.5 + 83 = 143.5 cm, between her heights at 10 and at 12.
Extrapolation fails. At age 40 the line gives 5.5 × 40 + 83 = 220 + 83 = 303 cm, a height of more than 3 meters, which no person has ever reached. People stop growing in their late teens, so the straight-line pattern of childhood does not continue. Reading backward fails too: at age 0 the line gives 83 cm, while a newborn baby is about 50 cm long.
Ages 6 to 12, with the line h = 5.5a + 83. At age 11, inside the data, the line gives 143.5 cm.
The same line stretched to age 40 gives 303 cm, more than 3 meters. The four measured heights are all between ages 6 and 12.
How reliable is an estimate?
An estimate from a line of best fit is more reliable when all of these hold: it is an interpolation, inside the range of the data; the correlation is strong, so the points lie close to the line; and there are plenty of points, spread across the range.
An extrapolation is less reliable the farther it goes beyond the data. Just past the last point the pattern may well hold; far beyond it, the pattern may have changed completely, as the girl’s growth does.
Say which kind of estimate it is and why: “The estimate of 143.5 cm at age 11 is reliable, because 11 lies inside the ages measured and the four points lie close to the line. The estimate of 303 cm at age 40 is not, because 40 is far outside the ages measured, and it gives an impossible height.”
An impossible answer, such as a negative count or a person 3 meters tall, is a sign that a model has been used outside the range where it holds. Report it as unreliable rather than rounding it into something that looks possible.
Worked example: Cold Drinks Against the Temperature, Read Once Inside the Readings and Once Far Outside Them
Question A beach kiosk recorded the temperature and the cold drinks it sold on eight days. The pairs of (temperature in Celsius, drinks) were (15, 55), (17, 70), (19, 110), (21, 125), (25, 185), (27, 230), (29, 250) and (31, 295). The line of best fit is y = 15x − 180, where x is the temperature in Celsius and y is the number of drinks. (a) Estimate the sales on a day at 24 Celsius. (b) A manager reads the same line at 5 Celsius. Find what it predicts there, and say why the line must not be used at that temperature.
1.Find the mean point, because the line of best fit must pass through it. The temperatures total 15 + 17 + 19 + 21 + 25 + 27 + 29 + 31 = 184, so the mean temperature is 184 ÷ 8 = 23 Celsius.
The eight days, with the temperature across and the drinks up. The faint line across the middle is zero drinks. 2.The sales total 55 + 70 + 110 + 125 + 185 + 230 + 250 + 295 = 1320, so the mean is 1320 ÷ 8 = 165 drinks. The mean point is (23, 165), and 15 × 23 − 180 = 165, so the given line does pass through it.
The mean point is (23, 165), and 15 × 23 − 180 = 165, so the given line passes through the cross. 3.(a) Substitute x = 24: y = 15 × 24 − 180 = 360 − 180 = 180, so the kiosk should expect about 180 drinks. The value 24 Celsius lies between the lowest reading, 15 Celsius, and the highest, 31 Celsius, so the line is being read inside the data and the estimate can be trusted.
(a) Reading up at 24 Celsius and across gives 180 drinks, and 24 lies among the readings. 4.Now substitute x = 5: y = 15 × 5 − 180 = 75 − 180 = −105.
The line is carried on as a dashed line past both ends of the readings. The bracket underneath shows where the evidence stops. 5.(b) The line predicts −105 drinks, and a kiosk cannot sell a negative number of drinks, so the prediction is worthless. A temperature of 5 Celsius is far below the coldest day recorded, 15 Celsius, and nothing in the data says what the kiosk does there. Check: the line reaches zero when 15x = 180, that is at x = 12 Celsius, and it is negative at every temperature below that.
(b) At 5 Celsius the line has already dropped below zero: it gives −105 drinks, which no kiosk can sell.
Answer: (a) the mean point is (23, 165) and the estimate at 24 Celsius is about 180 drinks; (b) the line gives −105 drinks, which is impossible, so it must not be used at 5 Celsius, because the readings run only from 15 Celsius to 31 Celsius
Common mistakes
- Treating the line as a law that holds at every temperature. It is a summary of eight particular days, and outside the range of those days it carries no evidence at all.
- Rounding −105 up to 0 and reporting that the kiosk sells no drinks at 5 Celsius. That hides the fault instead of reporting it: a model that returns an impossible value is showing that it is being used outside its range.
More scatter plots and correlation problems, worked step by step →