Lesson 4 of 7 · 16 min

Predictions, interpolation and extrapolation

Use the least-squares line to make predictions, tell interpolation from extrapolation, and explain why predictions outside the data can be unreliable.

What you will be able to do

  • Substitute into the least-squares line to predict the response variable.
  • Solve the equation to find the explanatory value that gives a required response.
  • Distinguish between interpolation and extrapolation.
  • Recognise and explain the potential dangers of extrapolation.

A household in Toowoomba with rooftop solar panels records the hours of sunshine and the energy the system generates on nine days. The least-squares line is

energy (kWh)=1.98×sunshine (hours)+2.40\text{energy (kWh)} = 1.98 \times \text{sunshine (hours)} + 2.40

Predicting is just substitution. On a day with 7 hours of sunshine: 1.98×7+2.40=16.261.98 \times 7 + 2.40 = 16.26 kWh. But should you trust a prediction for a day with 13 hours of sunshine just as much?

Interactive

Predict inside and outside the data

The data covers 4.5 to 10.2 hours of sunshine. A prediction at 13 hours is outside that range. Change the prediction to 7 hours and compare.

Definition

Interpolation and extrapolation

  • Interpolation is predicting for a value of the explanatory variable inside the range of the data used to fit the line.
  • Extrapolation is predicting for a value outside that range.

For the solar data the range is 4.5 to 10.2 hours. Predicting at 7 hours is interpolation; predicting at 13 hours (or at 3 hours) is extrapolation.

Using the solar line, a student predicts the energy generated on a day with 3 hours of sunshine. The data covers 4.5 to 10.2 hours. This prediction is

Choose one answer

Worked example

Predict solar output and judge the predictions

  • Simple familiar

A Toowoomba household's solar data, for days with 4.5 to 10.2 hours of sunshine, gives the least-squares line

energy=1.98×sunshine+2.40\text{energy} = 1.98 \times \text{sunshine} + 2.40

with energy in kWh and sunshine in hours, and r=0.976r = 0.976.

a) Predict the energy generated on a day with 7 hours of sunshine, and comment on the reliability of the prediction.

b) Predict the energy generated on a day with 13 hours of sunshine, and comment on the reliability.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Substitute into the least-squares line and show the working.

  2. Compare the explanatory value with the range of the data.

  3. Comment using strength (rr or R2R^2) and interpolation or extrapolation.

Watch out for

  • Calling a prediction reliable only because rr is close to 1, while ignoring extrapolation.

Why worry about extrapolation? The least-squares line describes the association only where you have data. Outside that range you are assuming the same straight-line trend continues, and you have no evidence that it does. Trends often level off, speed up or hit a physical limit.

Worked example

The danger of extrapolating a phone battery

  • Complex familiar

A student records the battery remaining on her phone after 1 to 8 hours of use. The least-squares line is

battery=−6.04×hours+102.54\text{battery} = -6.04 \times \text{hours} + 102.54

with battery in percent.

a) Use the line to predict the battery remaining after 20 hours of use.

b) Explain why this prediction is not sensible.

c) After how many hours does the model predict the battery will reach 0%? Comment on this prediction.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Make the prediction by substitution.

  2. Check whether the explanatory value is inside the data and whether the answer is possible.

  3. Explain that extrapolation assumes the trend continues, and give a reason in context why it might not.

Watch out for

  • Reporting an impossible prediction without comment.

  • Saying "it is extrapolation" without explaining why that matters.

Key idea

When is a prediction reliable?

A prediction from a least-squares line is reliable when

  1. the association is strong (rr close to ±1\pm 1, R2R^2 close to 1),
  2. the association is linear — the residual plot shows no pattern (next lesson), and
  3. the prediction is an interpolation.

Extrapolation can still be useful a little beyond the data, but the further you go, the less you should trust it.

Sometimes you know the response you want and need the explanatory value. Substitute the response and solve. The café line coffees=3.23×temperature−21.86\text{coffees} = 3.23 \times \text{temperature} - 21.86 reaches 80 coffees when

3.23T−21.86=80⇒T=80+21.863.23≈31.5 ∘C3.23T - 21.86 = 80 \quad\Rightarrow\quad T = \frac{80 + 21.86}{3.23} \approx 31.5\ ^\circ\text{C}

Note

Working backwards with the line

Solving the equation tells you where the line reaches a value, which is how QCAA questions use it. If you genuinely wanted to predict temperature from sales, you would refit the line with sales as the explanatory variable — the two lines are not the same unless r=±1r = \pm 1.

Use energy (kWh)=1.98×sunshine (hours)+2.40\text{energy (kWh)} = 1.98 \times \text{sunshine (hours)} + 2.40 to predict the energy generated on a day with 9.5 hours of sunshine.

in kWh

Exam tip

Commenting on a prediction

"Comment on the reliability" wants evidence, not a feeling. Quote rr or R2R^2, say whether the residual plot is random, and say whether the prediction is interpolation or extrapolation — for example, "reliable, because r=0.976r = 0.976 shows a strong linear association and 7 hours is within the data, so it is interpolation."

Summary

  • Predict by substituting the explanatory value into the least-squares line. Show the substitution.

  • Interpolation is inside the range of the data; extrapolation is outside it.

  • Extrapolation assumes the trend continues beyond the data, which may be false — it can even give impossible values.

  • Reliable predictions need a strong linear association, a random residual plot and interpolation.

  • To find the explanatory value for a target response, substitute and solve.

Finished the lesson?

Try the 2 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 4 of 70% read

Save your progress with a free account