11.5 Prediction
SLO 2
Identify appropriate graphs and summary statistics for variables and relationships between them and correctly interpret information from graphs and summary statistics.
SLO 4
Demonstrate an understanding of, and ability to use, basic ideas of statistical processes, including hypothesis tests and confidence interval estimation.
Learning Objectives
By the end of this section, you will be able to:
- use a least-squares regression line to predict a value of \(y\) from a value of \(x\);
- distinguish interpolation from extrapolation and say which one the data support;
- recognise when a predicted value is unreliable, and when it is outright impossible;
- state the checks that must pass before any prediction is made;
- word a prediction correctly, including the phrase that makes it honest.
The previous three sections built a line, judged whether it was worth trusting, and warned repeatedly about the range of the data. This section is where that work gets used — and where the warning gets its teeth. Predicting is arithmetic: substitute a number and evaluate. Deciding whether you are allowed to is the actual skill, and it is the one this section drills.
11.5.1 Using the Line to Predict
Recall the third exam/final exam example. We examined the scatterplot and showed that the correlation coefficient is significant. We found the equation of the best-fit line for the final exam grade as a function of the grade on the third exam. We can now use the least-squares regression line for prediction.
Notice the order of those three steps, because it is the whole method:
- Examine the scatterplot — is the pattern linear?
- Test the significance of \(r\) — is the relationship more than sampling accident?
- Only then, predict.
Suppose you want to estimate, or predict, the mean final exam score of statistics students who received 73 on the third exam. The exam scores (x-values) range from 65 to 75. Since 73 is between the x-values 65 and 75, substitute \(x = 73\) into the equation:
$$ \hat{y} = -173.51 + 4.83(73) = 179.08 $$We predict that statistics students who earn a grade of 73 on the third exam will earn a grade of 179.08 on the final exam, on average.
Data are collected on the relationship between the number of hours per week practicing a musical instrument and scores on a math test. The line of best fit is
$$ \hat{y} = 72.5 + 2.8x $$What would you predict the score on a math test would be for a student who practices a musical instrument for five hours a week?
Solution — substituting into the regression line
Step 1 — Identify the variables. \(x\) is hours per week practicing a musical instrument, and \(y\) is the score on the math test.
Step 2 — Substitute \(x = 5\).
$$ \hat{y} = 72.5 + 2.8(5) = 72.5 + 14 = 86.5 $$Step 3 — Word the prediction. A student who practices a musical instrument for five hours a week is predicted to score 86.5 on the math test, on average.
Step 4 — Note what is missing from the question. We are not told the range of the x-values in the original data, so we cannot actually confirm that five hours is inside the observed range. In practice that check comes first; here we can only assume it holds.
Answer: \(\hat{y} = 86.5\), on average — assuming five hours per week lies within the range of practice times in the original data.
11.5.2 Interpolation and Extrapolation
The process of predicting inside the observed \(x\) values in the data is called interpolation.
Definition 11.5.1 — Interpolation: Predicting at x = 70, between the smallest and largest observed scores, is interpolation.
The process of predicting outside the observed \(x\) values in the data is called extrapolation.
A regression line is an equation, and an equation is defined for every real number you feed it. Nothing in \(\hat{y} = -173.51 + 4.83x\) records that no student in the sample scored below 65 or above 75. That information lives in the data, not in the line, which is why the range has to be carried alongside the equation and checked by hand every single time.
Definition 11.5.2 — Extrapolation: Average outdoor temperature (°F).
Interpolation is what a regression line is for. Extrapolation is what the equation will happily let you do anyway, and the arithmetic gives no sign that anything is wrong — you substitute a number, you get a number back. Only comparing \(x\) against the data's range tells the two apart.
A regression of monthly electricity cost on average outdoor temperature is built from data where temperatures ranged from 30°F to 85°F. For each prediction, state whether it is interpolation or extrapolation, and whether it is justified: (a) 45°F, (b) 85°F, (c) 15°F.
Solution — comparing each x against the observed range
Step 1 — State the observed range. The data cover \(x\) from 30 to 85.
Step 2 — Classify (a). 45 lies between 30 and 85, so predicting there is interpolation, and it is justified.
Step 3 — Classify (b). 85 is the largest observed value. It is inside the range at its boundary, so this is still interpolation and is justified.
Step 4 — Classify (c). 15 lies below 30, outside the observed range, so this is extrapolation and it is not justified by these data.
Step 5 — Note what makes (c) risky rather than merely uncertain. At 15°F heating demand may behave quite differently than it did anywhere in the sample. The line was never given a chance to observe that, so it cannot report it.
Answer: (a) interpolation, justified; (b) interpolation at the boundary, justified; (c) extrapolation, not justified.
Recall the third exam/final exam example, with \(\hat{y} = -173.51 + 4.83x\).
a. What would you predict the final exam score to be for a student who scored a 66 on the third exam?
b. What would you predict the final exam score to be for a student who scored a 90 on the third exam?
Solution — one legitimate prediction and one that is not
Step 1 — Handle part a by checking the range first. The \(x\) values in the data are between 65 and 75, and 66 lies inside that range. This is interpolation, so the prediction is justified.
Step 2 — Compute part a.
$$ \hat{y} = -173.51 + 4.83(66) = 145.27 $$Step 3 — Check the range for part b. Ninety is outside of the domain of the observed \(x\) values in the data, so you cannot reliably predict the final exam score for this student.
Step 4 — Say why the arithmetic does not save it. Even though it is possible to enter 90 into the equation for \(x\) and calculate a corresponding \(y\) value, the \(y\) value that you get will not be reliable.
Answer: (a) 145.27. (b) No reliable prediction is possible, because 90 lies outside the observed range of 65 to 75.
11.5.3 What Extrapolation Actually Produces
To understand really how unreliable the prediction can be outside the observed \(x\) values, make the substitution \(x = 90\) into the equation:
$$ \hat{y} = -173.51 + 4.83(90) = 261.19 $$The final-exam score is predicted to be 261.19. The largest the final exam score can be is 200.
That is the whole argument in one line. The equation returned a score that cannot exist, and it did so without complaint, without a warning, and without any visible difference from the perfectly good prediction of 145.27 a moment earlier.
At \(x = 90\) the absurdity is obvious — 261.19 out of 200 announces itself. Now consider \(x = 78\), which gives about 203.2. Also impossible, but only barely, and easy to miss. And \(x = 76\) gives about 193.6, which is entirely plausible and still unjustified, because 76 is outside the observed range just as surely as 90 is. Extrapolation does not become safe when the answer stops looking silly. Checking the range is the only reliable test, because plausibility is not one.
Using \(\hat{y} = -173.51 + 4.83x\) with data ranging from 65 to 75, compute the prediction at \(x = 76\) and at \(x = 40\). State whether each is justified and what each result illustrates.
Solution — a plausible extrapolation and an absurd one
Step 1 — Compute at \(x = 76\).
$$ \hat{y} = -173.51 + 4.83(76) = -173.51 + 367.08 = 193.57 $$Step 2 — Judge it. A final exam score of about 193.6 out of 200 is entirely plausible. Nothing about the number looks wrong.
Step 3 — Check the range anyway. 76 is greater than 75, so it lies outside the observed \(x\) values. The prediction is extrapolation and is not justified, despite looking reasonable.
Step 4 — Compute at \(x = 40\).
$$ \hat{y} = -173.51 + 4.83(40) = -173.51 + 193.20 = 19.69 $$Step 5 — Judge it. About 19.7 out of 200 is possible in principle, but it comes from a third exam score far below anything observed, so it is equally unjustified.
Step 6 — State what the pair shows. Both are extrapolations and both are unjustified, but only by checking the range — not by inspecting the answers — can you tell.
Answer: 193.57 at \(x = 76\) and 19.69 at \(x = 40\); neither is justified. A plausible-looking extrapolation is still an extrapolation.
A regression of maximum dive time on depth, built from depths of 50 to 100 feet, is \(\hat{y} = 127.24 - 1.11x\). Predict the maximum dive time at 150 feet and explain what the result demonstrates.
Solution — extrapolation past the point of impossibility
Step 1 — Substitute \(x = 150\).
$$ \hat{y} = 127.24 - 1.11(150) = 127.24 - 166.50 = -39.26 $$Step 2 — Judge the answer against reality. A maximum dive time of \(-39.26\) minutes is impossible; a duration cannot be negative.
Step 3 — Explain why the line produced it. The line was fitted between 50 and 100 feet, where dive time falls roughly linearly. A straight line with a negative slope, extended far enough, must eventually cross zero and keep going. Nothing in the data says the real relationship does that.
Step 4 — Identify the general lesson. Extrapolation does not fail gradually. It can produce values outside the range of possibility entirely, and the equation gives no signal that it has done so.
Answer: \(-39.26\) minutes, which is impossible. Extending a linear model beyond its data can take it outside the set of possible values altogether.
11.5.4 The Checks Before Any Prediction
Three things must hold before a predicted value means anything, and every one of them was established in an earlier section:
| Check | Established in | If it fails |
|---|---|---|
| The scatter plot shows a linear pattern | Section 11.2 | a straight line is the wrong model |
| \(r\) is significant | Section 11.4 | the relationship may be sampling accident |
| \(x\) is inside the observed range | Sections 11.3 and 11.5 | the prediction is extrapolation |
For each situation, decide whether a prediction should be made, and name the check that fails if one does.
a. \(r\) is significant, the scatter plot is linear, and \(x = 22\) with data covering 10 to 35.
b. \(r\) is not significant, the scatter plot looks roughly linear, and \(x = 22\) is inside the range.
c. \(r\) is significant and \(x\) is inside the range, but the scatter plot is clearly curved.
Solution — running the checklist three times
Step 1 — Check (a). Linear pattern: yes. Significant \(r\): yes. \(x\) inside 10 to 35: yes, 22 qualifies. All three pass, so the prediction should be made.
Step 2 — Check (b). \(r\) is not significant, so the first hurdle fails. There is insufficient evidence of a linear relationship in the population, and the line CANNOT be used to model one. No prediction.
Step 3 — Check (c). \(r\) being significant is not enough when the pattern is curved — a significant \(r\) measures linear association, and a curve can still fail to be described by a line. The scatter-plot check fails, so no prediction from this line.
Step 4 — Note the structure. All three checks must pass. Any single failure stops the prediction, and passing two of three is not a partial licence.
Answer: (a) predict; (b) do not — \(r\) is not significant; (c) do not — the scatter plot is not linear.
11.5.5 Wording a Prediction Honestly
Look again at how the section's first prediction was stated:
We predict that statistics students who earn a grade of 73 on the third exam will earn a grade of 179.08 on the final exam, on average.
Three features of that sentence are deliberate. It names the value of \(x\) that was used. It names the units of \(y\). And it ends with "on average", which is what keeps it true.
The regression line estimates the mean final exam score of students who scored 73. It does not promise that any individual student who scores 73 will score 179.08. Section 11.3's data make this concrete: two students both scored 69 on the third exam and went on to score 151 and 159. A single \(x\) carries a spread of real \(y\) values, and the line reports the centre of that spread.
A regression of weekly grocery spending on household size, built from households of 1 to 6 people, gives \(\hat{y} = 38 + 27x\) in dollars. Predict spending for a household of 4, write the prediction as a complete sentence, and say what it does not claim.
Solution — a prediction stated correctly
Step 1 — Check the range. Households of 1 to 6 people were observed, and 4 lies inside that range, so this is interpolation.
Step 2 — Substitute \(x = 4\).
$$ \hat{y} = 38 + 27(4) = 38 + 108 = 146 $$Step 3 — Write the sentence. We predict that households of four people spend $146 per week on groceries, on average.
Step 4 — State what it does not claim. It does not claim that any particular four-person household spends $146. Real households of the same size vary considerably, and 146 is an estimate of the mean for that group.
Step 5 — Note the intercept, in passing. At \(x = 0\), \(\hat{y} = 38\) — a household of zero people spending $38 a week. That is meaningless, and it is fine: \(x = 0\) is outside the observed range, so the intercept here is a fitting constant rather than an interpretable quantity.
Answer: $146 per week on average for a four-person household; the prediction describes the group mean, not any individual household.
A student writes: "The line says a person who studies 10 hours will score 82." The regression was \(\hat{y} = 52 + 3x\) built from study times of 2 to 15 hours. Identify what is wrong and rewrite it.
Solution — what the sentence over-claims
Step 1 — Check the arithmetic. \(\hat{y} = 52 + 3(10) = 82\), so the number is right.
Step 2 — Check the range. 10 lies between 2 and 15, so the prediction is legitimate interpolation. Nothing wrong there either.
Step 3 — Identify the problem. The wording. "The line says a person ... will score 82" promises a specific outcome for an individual, with no acknowledgement of variation.
Step 4 — Rewrite it. We predict that students who study 10 hours will score 82 on the test, on average.
Step 5 — Name the general rule. A regression prediction is always an estimate of the mean \(y\) for the given \(x\). Dropping "on average" converts a defensible statistical statement into a claim the data cannot support.
Answer: The arithmetic and the range are both fine; the wording over-claims. Adding "on average" and framing it as a group estimate fixes it.
Problem Set 11.5
Problem 1. Define interpolation and extrapolation.
Solution
Step 1 — Define interpolation: Interpolation is the process of predicting inside the observed \(x\) values in the data. This is what a regression line is for, and predictions made this way are justified by the data.
Step 2 — Define extrapolation: Extrapolation is the process of predicting outside the observed \(x\) values in the data. The arithmetic still works — you substitute a number and get a number back — but the result is not justified by the data, because the line was never given a chance to observe that region.
Answer: Interpolation predicts inside the observed range of \(x\); extrapolation predicts outside it, and only interpolation is supported by the data.
Problem 2. A regression line is \(\hat{y} = 15 + 4x\), built from x-values between 3 and 20. Predict \(y\) at \(x = 12\).
Solution
Step 1 — Check the observed range first. The line was built from \(x\)-values between 3 and 20, and \(x = 12\) lies inside that range, so this prediction is interpolation and is justified.
Step 2 — Substitute \(x = 12\) into the equation.
$$ \hat{y} = 15 + 4(12) = 15 + 48 = 63 $$Step 3 — Word the prediction honestly. We predict that when \(x = 12\), the mean value of \(y\) is 63, on average.
Answer: \(\hat{y} = 63\), on average (a justified interpolation).
Problem 3. For the same line, explain whether a prediction at \(x = 25\) is justified.
Solution
Step 1 — Compare \(x = 25\) against the observed range. The data cover \(x\)-values from 3 to 20, and 25 is greater than 20, so the prediction falls outside the observed range.
Step 2 — Classify and judge. Predicting at \(x = 25\) is extrapolation. Even though the equation will happily return a number — \(\hat{y} = 15 + 4(25) = 115\) — that number is not reliable, because no data were collected anywhere near \(x = 25\). The real relationship may bend, flatten, or change slope there, and the line has no way of knowing.
Answer: No, the prediction at \(x = 25\) is not justified: 25 lies outside the observed range of 3 to 20, so it is an unjustified extrapolation.
Problem 4. State the three checks that must pass before making a prediction, and name the section each comes from.
Solution
Step 1 — Check 1: the scatter plot shows a linear pattern. If the pattern is not linear, a straight line is simply the wrong model. This check comes from Section 11.2.
Step 2 — Check 2: \(r\) is significant. If \(r\) is not significant, there is insufficient evidence of any linear relationship in the population, and the relationship may be nothing more than sampling accident. This check comes from Section 11.4.
Step 3 — Check 3: \(x\) is inside the observed range of the data. If \(x\) lies outside the smallest-to-largest observed values, the prediction is extrapolation and is not justified. This check comes from Sections 11.3 and 11.5.
Step 4 — Note that all three must pass. Any single failure stops the prediction; passing two of three is not enough.
Answer: (1) linear scatter plot (Section 11.2), (2) significant \(r\) (Section 11.4), (3) \(x\) within the observed range (Sections 11.3 and 11.5) — all three must hold before predicting.
Problem 5. A line built from data covering \(x\) between 40 and 90 predicts a plausible-looking value at \(x = 95\). Explain why the prediction is still not justified.
Solution
Step 1 — Identify what kind of prediction this is. The data cover \(x\) from 40 to 90, and \(x = 95\) is greater than 90, so the prediction is extrapolation regardless of how the answer looks.
Step 2 — Explain why plausibility does not rescue it. A plausible-looking answer is exactly why extrapolation is dangerous: the equation returns numbers with no warning label, and nothing about the arithmetic signals that the model has left its data behind. Plausibility is not a test of validity — checking the range is.
Step 3 — State the underlying reason. The line was fitted using only points between 40 and 90. Outside that interval, the true relationship may curve or change behaviour entirely, and the fitted line carries no information about it.
Answer: The prediction is not justified because \(x = 95\) lies outside the observed range of 40 to 90; a plausible-looking extrapolation is still an extrapolation.
Problem 6. A regression of height on age, built from children aged 2 to 10, predicts a height of 11 feet at age 40. Explain what has gone wrong.
Solution
Step 1 — Identify the error as extrapolation carried too far. The regression was built from children aged 2 to 10. Age 40 is far outside that range, so the prediction is a massive extrapolation, not a legitimate use of the line.
Step 2 — Explain why the result is impossible. Children grow roughly linearly over ages 2 to 10, so the fitted line has a positive slope. Extending that straight line to age 40 forces it to keep climbing at the same rate, producing a "height" of 11 feet — a value no human can have.
Step 3 — Draw the general lesson. Human growth stops in the late teens, but the line knows nothing about that; it only saw children aged 2 to 10. Extrapolating a linear trend beyond its data can produce answers outside the set of possible values altogether, and the equation gives no signal that anything has gone wrong.
Answer: The prediction fails because age 40 is far outside the observed range of 2 to 10; extending a linear growth trend indefinitely produces the impossible height of 11 feet.
Problem 7. Using \(\hat{y} = -173.51 + 4.83x\), predict the final exam score for a third exam score of 70.
Solution
Step 1 — Check the range. In the third exam/final exam example, the observed \(x\)-values run from 65 to 75. Since 70 lies inside that range, this is interpolation and the prediction is justified.
Step 2 — Substitute \(x = 70\) into the equation.
$$ \hat{y} = -173.51 + 4.83(70) = -173.51 + 338.10 = 164.59 $$Step 3 — Word the prediction honestly. We predict that statistics students who earn a grade of 70 on the third exam will earn a grade of 164.59 on the final exam, on average.
Answer: \(\hat{y} = 164.59\), on average.
Problem 8. Rewrite this sentence correctly: "The line proves that a student scoring 72 on the third exam gets 174.2 on the final."
Solution
Step 1 — Identify what is wrong with the sentence. Two problems: the word "proves" overstates what a regression line can do, and the sentence promises a specific outcome for an individual student, ignoring the natural variation among students who score the same on the third exam.
Step 2 — Recall what the line actually estimates. The regression line estimates the mean final exam score for all students scoring 72, not the score of any particular student. For example, two students with identical third-exam scores may earn different final scores.
Step 3 — Rewrite the sentence. We predict that students who score 72 on the third exam will score 174.2 on the final exam, on average.
Answer: "We predict that students who score 72 on the third exam will score 174.2 on the final exam, on average." — naming the group estimate and adding "on average" makes the claim honest.
Problem 9. Explain why the y-intercept of a regression line is often not interpretable.
Solution
Step 1 — Recall what the intercept represents. The y-intercept is the predicted value of \(y\) at \(x = 0\).
Step 2 — Note that \(x = 0\) is usually outside the observed range. Regression lines are built from data covering some range of \(x\)-values, and \(x = 0\) typically lies outside that range. So interpreting the intercept is itself an act of extrapolation, which the data do not support.
Step 3 — Give a concrete example. In the grocery-spending example, the intercept was $38 per week for a household of zero people — meaningless as a real quantity. It functions merely as a fitting constant that positions the line correctly over the observed data.
Answer: The y-intercept predicts \(y\) at \(x = 0\), which usually lies outside the observed range of the data; the intercept is then just a fitting constant, not an interpretable quantity.
Problem 10. A regression is built and \(r\) turns out not to be significant. Explain whether interpolation is allowed.
Solution
Step 1 — Recall the role of significance. A non-significant \(r\) means we do not have sufficient evidence of a linear relationship in the population; the apparent pattern could be sampling accident.
Step 2 — Apply the checks. One of the three required checks — that \(r\) be significant — has failed. When \(r\) is not significant, the line CANNOT be used to model the relationship, and therefore no prediction should be made from it.
Step 3 — Conclude. Interpolation being "safe" in terms of range is irrelevant here: without a demonstrated linear relationship, there is no trustworthy line to interpolate along.
Answer: No, interpolation is not allowed. Since \(r\) is not significant, there is insufficient evidence of a linear relationship, and the regression line cannot be used for prediction at all.
Problem 11. Explain in one or two sentences why a regression prediction describes a group rather than an individual.
Solution
Step 1 — Recall what the line estimates. A regression line estimates the mean value of \(y\) for each given \(x\), not the exact \(y\) of any single observation.
Step 2 — Explain the variation around the line. Many individuals share the same \(x\)-value but have different actual \(y\)-values — for instance, two students both scoring 69 on the third exam scored 151 and 159 on the final. A single \(x\) corresponds to a whole spread of real \(y\) values, and the line reports only the centre of that spread.
Answer: Because individuals with the same \(x\)-value have varying \(y\)-values, the regression line estimates only the mean \(y\) for that group — hence every honest prediction ends with "on average."
Key Terms
prediction — using the least-squares regression line to estimate \(y\) for a given \(x\), by substituting that \(x\) into the equation.
interpolation — predicting inside the observed \(x\) values in the data; this is what a regression line is for.
extrapolation — predicting outside the observed \(x\) values; the arithmetic still works and the result is not justified by the data.
observed range (domain) of x — the smallest to largest \(x\) in the sample; the boundary between interpolation and extrapolation, and information that lives in the data rather than in the equation.
"on average" — the phrase that makes a prediction honest; the line estimates the mean \(y\) for the given \(x\), not the value for any individual.