Resources For Teachers For Tutors For Students & Parents AI New Books Pricing
Year 12 Maths - General (Unit 3 & Unit 4) Investigating and modelling linear associations

Predictions, interpolation and extrapolation

20 practice questions 0 video lessons Theory + worked examples

Use the least squares line to make predictions in Year 12 VCE General Mathematics. If a Frankston car wash knows how sales rise with the temperature, it can plan staff for tomorrow's forecast. Substituting a value of the explanatory variable into the line gives the predicted response, but some predictions deserve far more trust than others.

You will practise substituting into \(y = a + bx\) and giving answers in context, then decide whether each prediction is interpolation (inside the data) or extrapolation (outside it). You will spot impossible results, explain why a strong \(r\) cannot rescue an extrapolation, and get ready to measure how much variation the line explains.

Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

A least squares line turns data into predictions. This Year 12 General Mathematics guide for students in Victoria shows how to substitute into \(y = a + bx\), how to tell interpolation from extrapolation, and how to judge whether a prediction can be trusted.

A least squares line \(y = a + bx\) can be used to make a prediction: substitute a value of the explanatory variable \(x\) and calculate the predicted value of the response variable \(y\). In context, \(\text{response} = a + b \times \text{explanatory}\).

Interpolation is predicting for a value of \(x\) inside the range of the data, from the smallest \(x\)-value to the largest. Extrapolation is predicting for a value of \(x\) outside that range.

Extrapolation is risky: there is no data to show that the linear trend continues, and the line can give values that are impossible or unrealistic. A prediction is most reliable when it is an interpolation and the association is strong. The line only predicts the response; it is never rearranged to predict the explanatory variable.

Key idea. Before trusting a prediction, compare \(x\) with the smallest and largest \(x\)-values in the data. Inside the range is interpolation; outside is extrapolation, and the further outside, the less you can trust it.
Interpolation and extrapolation regionsFive points with x from 3 to 11 and the least squares line y = 3 + 2x. The shaded band from x = 3 to x = 11 is the interpolation region; outside it on both sides is extrapolation. x y 2 4 6 8 10 12 10 20 30 interpolation extrapolation extrapolation
The data run from \(x = 3\) to \(x = 11\). Predictions inside the shaded band are interpolation; predictions outside it are extrapolation.
Extrapolation can give impossible valuesMass of a melting ice block against hours, data from 1 to 8 hours, with the least squares line y = 20.4 - 1.8x. Extended (dashed) to 15 hours, it predicts -6.6 kg, which is impossible. x y 4 8 12 16 -8 8 16 24 (15, -6.6) impossible
An ice block loses about \(1.8\) kg per hour over \(1\) to \(8\) hours. Extending the line to \(15\) hours predicts \(-6.6\) kg, an impossible mass.

A prediction from the least squares line, for a chosen value \(x_0\) of the explanatory variable:

\[\text{predicted } y = a + b x_0\]
predicted y=a+bx0

Interpolation or extrapolation, where \(x_{\min}\) and \(x_{\max}\) are the smallest and largest \(x\)-values in the data:

\[x_{\min} \le x_0 \le x_{\max} \;\Rightarrow\; \text{interpolation}, \qquad \text{otherwise extrapolation}\]
xmin≤x0≤xmax
Reliability check. A prediction is reliable when it is an interpolation, the association is strong (\(|r| \ge 0.75\)) and the residual plot shows no pattern. Use the unrounded line from your calculator, or the line rounded as the question states.

Making and judging a prediction

  1. Write the line. Use \(y = a + bx\) with the variables in context, and check that the value you are given is a value of the explanatory variable.
  2. Substitute. Replace \(x\) with the given value and calculate \(y\), one step per line.
  3. Answer in context. Give the prediction with its units, rounded sensibly (for example a whole number of people or cars).
  4. Interpolation or extrapolation? Compare the \(x\)-value with the range of the data. Inside is interpolation; outside is extrapolation.
  5. Comment on reliability. An interpolation with a strong association is reliable. An extrapolation is not, especially if it gives an unrealistic value.
Example 1 — An interpolation
At a Frankston car wash, the least squares line relating the daily maximum temperature (°C) to the number of cars washed is \(\text{cars} = -24 + 4.8 \times \text{temperature}\). The data cover temperatures from \(16\)°C to \(34\)°C. Predict the number of cars washed on a \(25\)°C day, and say whether this is interpolation or extrapolation.
Solution

Substitute \(25\) for the temperature.

\(\text{cars}\)\(=\)\(-24 + 4.8 \times 25\)
\(\text{cars}\)\(=\)\(-24 + 120\)
\(\text{cars}\)\(=\)\(96\)
cars=96

About \(96\) cars are predicted. Since \(25\) is between \(16\) and \(34\), this is interpolation.

Example 2 — One reliable, one not
For new cars on sale in Shepparton with engine sizes from \(1.4\) L to \(3.8\) L, the least squares line relating engine size (L) to fuel use (L/100 km) is \(\text{fuel use} = 3.6 + 2.4 \times \text{engine size}\), with \(r = 0.91\). Predict the fuel use for engine sizes of \(2.5\) L and \(5\) L, and comment on the reliability of each prediction.
Solution

Substitute each engine size, then compare it with the range \(1.4\) L to \(3.8\) L.

\(\text{fuel use}\)\(=\)\(3.6 + 2.4 \times 2.5\)
\(\text{fuel use}\)\(=\)\(3.6 + 6\)
\(\text{fuel use}\)\(=\)\(9.6\)
\(\text{fuel use}\)\(=\)\(3.6 + 2.4 \times 5\)
\(\text{fuel use}\)\(=\)\(3.6 + 12\)
\(\text{fuel use}\)\(=\)\(15.6\)
9.6,15.6

For \(2.5\) L: \(9.6\) L/100 km. This is interpolation with a strong association (\(r = 0.91\)), so it is reliable.

For \(5.0\) L: \(15.6\) L/100 km. This is extrapolation (\(5.0\) is above \(3.8\)), so it is not reliable: the trend may not continue for much larger engines.

Example 3 — Fit, then predict
An outdoor pool in Melbourne recorded the daily maximum temperature and the number of visitors on seven summer days.
Maximum temperature, \(x\) (°C)22252729313436
Visitors, \(y\) (hundreds)9121516202324
(a) Use technology to find the least squares line, with \(a\) and \(b\) correct to \(2\) decimal places.
(b) Predict the number of visitors on a \(30\)°C day and on a \(42\)°C day, to the nearest hundred, and say which prediction is more reliable.
Solution

(a) Enter temperature as \(x\) and visitors as \(y\):

\(S_{xx}\)\(\approx\)\(146.86\)
\(S_{xy}\)\(=\)\(165\)
\(b\)\(=\)\(\dfrac{S_{xy}}{S_{xx}}\)
\(b\)\(=\)\(\dfrac{165}{146.86}\)
\(b\)\(\approx\)\(1.123541\)
\(\bar{x}\)\(\approx\)\(29.14\)
\(\bar{y}\)\(=\)\(17\)
\(a\)\(=\)\(\bar{y} - b\bar{x}\)
\(a\)\(\approx\)\(17 - 1.123541 \times 29.142857\)
\(a\)\(\approx\)\(17 - 32.7432\)
\(a\)\(\approx\)\(-15.74\)
\(\text{visitors}\)\(=\)\(-15.74 + 1.12 \times 30\)
\(\text{visitors}\)\(=\)\(-15.74 + 33.6\)
\(\text{visitors}\)\(=\)\(17.86\)
\(\text{visitors}\)\(=\)\(-15.74 + 1.12 \times 42\)
\(\text{visitors}\)\(=\)\(-15.74 + 47.04\)
\(\text{visitors}\)\(=\)\(31.3\)
visitors=-15.74+1.12×temperature
Example 3 scatterplotPool visitors against temperature, data from 22 to 36 degrees shaded, with the least squares line y = -15.74 + 1.12x and gold rings at the predictions for 30 and 42 degrees. temp visitors 20 25 30 35 40 45 10 20 30

(a) \(\text{visitors} = -15.74 + 1.12 \times \text{temperature}\).

(b) At \(30\)°C: about \(18\) hundred visitors (interpolation). At \(42\)°C: about \(31\) hundred visitors, but \(42\) is above the largest temperature in the data (\(36\)), so this is extrapolation. The \(30\)°C prediction is more reliable; on an extremely hot day people may stay away.

Example 4 — An unrealistic extrapolation
For junior swimmers aged \(10\) to \(16\) at a Melbourne club, the least squares line relating age (years) to the time for \(100\) m freestyle (seconds) is \(\text{time} = 94 - 2.2 \times \text{age}\). Predict the time for a \(13\)-year-old and for a \(40\)-year-old, and comment on each.
Solution

Substitute each age; then think about whether the answer is realistic.

\(\text{time}\)\(=\)\(94 - 2.2 \times 13\)
\(\text{time}\)\(=\)\(94 - 28.6\)
\(\text{time}\)\(=\)\(65.4\)
\(\text{time}\)\(=\)\(94 - 2.2 \times 40\)
\(\text{time}\)\(=\)\(94 - 88\)
\(\text{time}\)\(=\)\(6\)
65.4,6

At age \(13\): \(65.4\) seconds, an interpolation that looks sensible.

At age \(40\): \(6\) seconds. No one swims \(100\) m in \(6\) seconds, so this extrapolation is unrealistic: swimmers do not keep getting faster at the same rate as they age.

Common pitfalls

Use the range of \(x\), not \(y\). Interpolation and extrapolation depend on whether the value of the explanatory variable lies inside the data. The predicted \(y\) does not decide it.
Do not predict the explanatory variable. The least squares line is built to predict \(y\) from \(x\). Rearranging it to find \(x\) for a given \(y\) uses it the wrong way round.
A strong \(r\) does not rescue an extrapolation. Even with \(r\) close to \(1\), there is no evidence that the trend continues beyond the data.

Frequently asked questions

How do you make a prediction from a least squares line?

Substitute the value of the explanatory variable into y = a + bx and calculate y. Give the answer in context with units.

What is the difference between interpolation and extrapolation?

Interpolation predicts for an x-value inside the range of the data. Extrapolation predicts for an x-value outside that range.

Why is extrapolation unreliable?

There is no data outside the range to show that the linear trend continues. The relationship may change, and the line can give impossible values such as a negative mass.

When is a prediction reliable?

When it is an interpolation, the association is strong and the residual plot shows no pattern.

Can I use the least squares line to predict x from y?

No. The line is fitted to predict the response from the explanatory variable. It should not be rearranged to predict the explanatory variable.