Tutorials › Introduction to Statistics › Recognizing Extrapolation

Least-Squares Regression Lines · Tutorial 268 of 996

Recognizing Extrapolation

Learn to decide whether a regression prediction uses an explanatory value within or beyond the range observed in the data.

Beginner 8 min read

What You'll Learn

  • Find the observed minimum and maximum explanatory-variable values.
  • Apply the interval test for recognizing extrapolation.
  • Distinguish a predictor’s observed range from its possible or permitted values.
  • Classify requests at endpoints, between observations, and outside the range.
  • Label predictions clearly and include the explanatory variable’s units and context.

What Does It Mean to Extrapolate?

A fitted regression line can be used to calculate a predicted response for a chosen value of the explanatory variable. But a calculation alone does not say whether that value is covered by the data used to fit the line. To recognize extrapolation, compare the requested explanatory value with the smallest and largest explanatory values actually observed.

The distinction is about the predictor, not the predicted response. A request can be extrapolation even if its predicted response seems plausible, and a prediction can be within the observed explanatory range even if the predicted response is unusual. The classification depends on where the requested explanatory value lies relative to the data.

Definition: A regression prediction is extrapolation when it uses an explanatory-variable value below the smallest observed value or above the largest observed value in the data used to fit the regression line. A prediction using an explanatory value between those endpoints, including either endpoint, is within the observed range.

The Range Test

Suppose the observed explanatory-variable values are \(x_1,x_2,\ldots,x_n\). Define the observed range by its smallest and largest values, \(x_{\min}\) and \(x_{\max}\). A requested value \(x^*\) is within the observed range exactly when it satisfies \(x_{\min}\leq x^*\leq x_{\max}\). If it does not satisfy that inequality, it lies beyond the observed range.

$$ \begin{aligned} x_{\min} \leq x^* \leq x_{\max} &\quad \Longrightarrow \quad \text{within the observed range},\\ x^* < x_{\min}\ \text{or}\ x^* > x_{\max} &\quad \Longrightarrow \quad \text{extrapolation}. \end{aligned} $$

This test uses the actual explanatory values in the fitting data, not every value that could theoretically occur. For example, a device might allow settings from 0 to 100, but if the regression line was fitted using settings from 20 to 60, a request at 75 is outside the observed range. The setting is allowed; it is still extrapolation relative to those data.

The endpoints count as within range. If the smallest observed value is 4, then a request at 4 is not beyond the data. Likewise, a value between the endpoints need not have appeared as an exact observation: if the observed values are 4, 7, and 10, a request at 8 lies within their range. The basic classification compares with the interval from the minimum to the maximum.

Worked Example: Training Hours and Assessment Score

A fitted line predicts assessment score \(y\) from hours of training \(x\). It was fitted to participants whose training times ranged from 10 to 30 hours. The line is \(\hat{y}=18+1.6x\). Classify and calculate the prediction for a participant with 22 hours of training.

The observed explanatory range is 10 to 30 hours. Since \(10\leq22\leq30\), the requested value lies within that range; this is not extrapolation.

Substitute \(x=22\) into the fitted equation:

$$ \hat{y}=18+1.6(22)=18+35.2=53.2 $$

The line predicts a score of 53.2 points for 22 hours of training. The classification comes from the 22-hour predictor value, not from the predicted score of 53.2 points.

Check the Explanatory Variable and Its Units

A common source of mistakes is comparing the request with the wrong variable. A regression setting may include several measured characteristics, but the range test concerns the explanatory variable used in the particular fitted line. It also requires consistent units: if the observed values are in centimetres, convert a request stated in metres before comparing the numbers.

The context helps identify the relevant predictor. If a line predicts daily energy use from outdoor temperature, the range to check is the range of temperatures in the fitting data, not the range of energy-use measurements. If it predicts energy use from building area, check the observed building areas instead.

Worked Example: Converting Units Before Comparing

A regression line predicts a plant’s height after six weeks from the amount of water supplied each day. The fitting data used daily amounts from 250 to 600 millilitres. A gardener asks for a prediction at 0.7 litres per day. Is the request extrapolation?

The requested amount and observed range must be expressed in the same units. Since 1 litre equals 1,000 millilitres,

$$ 0.7\ \text{litres}=0.7(1{,}000)=700\ \text{millilitres}. $$

The comparison is now \(700>600\). The request is above the largest observed daily water amount, so predicting at 0.7 litres per day would be extrapolation. Comparing the number 0.7 directly with 250 and 600 would give a meaningless result because the units differ.

The classification does not depend on whether 0.7 litres is a sensible amount to give a plant. It follows from the fact that the fitted data covered 250 to 600 millilitres per day.

A Short Justification of the Interval Rule

The rule follows directly from what “beyond the observed range” means. Every observed explanatory value is at least \(x_{\min}\) and at most \(x_{\max}\). Thus, a requested value between these endpoints is not below all the observations or above all the observations. In contrast, a value smaller than \(x_{\min}\) is below every observed value, and a value larger than \(x_{\max}\) is above every observed value. Those are exactly the two cases described as extrapolation.

$$ \begin{aligned} x^*<x_{\min} &\ \Longrightarrow\ x^*<x_i\ \text{for every observed }x_i,\\ x^*>x_{\max} &\ \Longrightarrow\ x^*>x_i\ \text{for every observed }x_i. \end{aligned} $$

The endpoints are included in the within-range case because \(x_{\min}\leq x_{\min}\leq x_{\max}\) and \(x_{\min}\leq x_{\max}\leq x_{\max}\). This is why the comparison uses “less than” or “greater than” for extrapolation, rather than “less than or equal to” or “greater than or equal to.”

Worked Example: Predicting for a Machine of a Given Age

A maintenance team fits a regression line predicting annual repair cost \(y\), in dollars, from machine age \(x\), in years. The observed machine ages in the data were 2, 3, 5, 6, and 9 years. The fitted line is \(\hat{y}=120+85x\). Classify requests for ages 2, 7, and 11 years, and calculate the predictions.

The observed minimum is \(x_{\min}=2\) years and the observed maximum is \(x_{\max}=9\) years. Therefore, the observed range is 2 to 9 years.

At 2 years: This is the observed minimum, so it is within the range. The predicted cost is

$$ \hat{y}=120+85(2)=120+170=\$290. $$

At 7 years: Since \(2\leq7\leq9\), this is within the range, even though 7 is not one of the listed ages. The predicted cost is

$$ \hat{y}=120+85(7)=120+595=\$715. $$

At 11 years: Since \(11>9\), this request is extrapolation. Substitution gives

$$ \hat{y}=120+85(11)=120+935=\$1{,}055. $$

The equation produces a numerical prediction for all three requests, but only the 11-year request is beyond the observed explanatory range. The predicted costs do not determine that classification; the machine ages do.

Observed Range, Possible Range, and Requested Values

Keep three ideas separate:

  • Observed range: the interval from the smallest to the largest explanatory values in the data used to fit the line.
  • Possible or permitted values: values allowed by the situation, such as a machine’s possible age or a device’s available settings.
  • Requested value: the particular explanatory value at which someone wants a prediction.

Only the first and third are needed to decide whether the requested prediction is extrapolation. A value can be possible but still lie outside the observed range. Conversely, a value can be within the observed range even if the exact value was not recorded, provided it falls between the observed endpoints.

The observed range belongs to a particular set of fitting data. If a regression line is refitted using a different data set, its minimum and maximum explanatory values may change. So the classification should be tied to the data used for that fitted line, not to a remembered range from some other analysis.

Worked Example: A Permitted Setting Outside the Data

A laboratory instrument can be set to any temperature from 5 to 50 degrees Celsius. A fitted regression line relating a measured response to instrument temperature was based on runs at 12, 18, 25, 33, and 40 degrees Celsius. A researcher requests a prediction at 45 degrees Celsius. Is this extrapolation?

The instrument’s permitted settings run from 5 to 50 degrees Celsius, so 45 degrees is allowed. But the observed explanatory range for the fitted line is 12 to 40 degrees. Because \(45>40\), the requested prediction is extrapolation relative to the fitting data.

The fact that 45 degrees is within the instrument’s permitted settings does not change the classification. The criterion is whether the value was within the range of temperatures represented in the data used to fit the line.

Why the Label Matters

Clearly identifying extrapolation tells a reader what kind of request the regression equation is being used to answer. A complete description names the predictor, the requested value and units, the observed range, and whether the request falls inside or beyond that range. This makes it possible to see how the classification was reached rather than relying on an unexplained label.

Recognizing extrapolation is a location check, not a conclusion about whether a prediction is accurate or useful. It does not by itself establish how well a line describes a relationship, and it does not change the arithmetic of substituting a value into the equation. It records whether that value is covered by the observed predictor range.

Common Mistake

Wrong reasoning: “The requested value is possible in real life, so it cannot be extrapolation.” This confuses the possible range with the observed range. A possible temperature, age, or setting may be outside the values used to fit the line.

Correction: Find the minimum and maximum explanatory values in the fitting data, put the requested value in the same units, and compare it with those endpoints. For instance, if the observed range is 12 to 40 degrees and the request is 45 degrees, then \(45>40\), so the request is extrapolation even if the instrument can reach 45 degrees.

Key takeaway: For a requested regression prediction, compare the explanatory value with the observed minimum and maximum in the data used to fit the line. Values below the minimum or above the maximum are extrapolation; the endpoints and all values between them are within the observed range.

Check Your Understanding

For each question, focus on the explanatory value and the observed range.

  1. A line was fitted using outdoor temperatures from 8 to 26 degrees Celsius. Is a prediction at 26 degrees within the observed range or extrapolation?
  2. A regression line predicts travel time from distance. The observed distances range from 3 to 18 kilometres. Classify a request at 20 kilometres and state the comparison that supports your answer.
  3. Data used to fit a line include explanatory values 5, 9, 12, and 17. Is a request at 10 an extrapolation even though 10 was not observed exactly? Explain.
  4. A fitted line used daily doses from 100 to 400 milligrams. Someone requests a prediction at 0.45 grams. Convert to milligrams and classify the request.
  5. A machine permits settings from 0 to 100, but the fitting data used settings from 15 to 55. Explain whether a prediction at setting 60 is extrapolation.