Tutorials › Regression Analysis (Undergraduate) › Extrapolation Risks in Polynomial Regression

Polynomial Regression · Tutorial 440 of 991

Extrapolation Risks in Polynomial Regression

Recognize when a polynomial prediction extends beyond the data and assess how its shape may become unsupported or implausible.

Intermediate 10 min read

What You'll Learn

  • Define extrapolation in polynomial regression using the observed predictor range.
  • Distinguish a model’s mathematical extension from evidence supported by observed data.
  • Calculate polynomial predictions within and beyond the observed range.
  • Explain why a high-degree term can dominate far from the data.
  • Compare candidate polynomial predictions to assess sensitivity outside the data range.
  • Identify responsible ways to report an extrapolated prediction.

Why Polynomial Extrapolation Needs Care

A polynomial regression curve can be evaluated at any numerical predictor value, including values not present in the data. That arithmetic is straightforward; the harder question is whether the prediction is credible. A curve that follows the observed data closely may turn sharply or produce extreme values just beyond the observations, especially when it contains higher-degree terms.

The key distinction is between being able to calculate a prediction and having evidence that the prediction is reliable. Extrapolation extends a fitted relationship beyond the range where it was observed. The data may support the curve within that range, but they do not by themselves show that the same shape continues outside it.

Definition: Let the observed predictor values range from \(x_{\min}\) to \(x_{\max}\). A prediction at \(x\) is an interpolation if \(x_{\min} \leq x \leq x_{\max}\), and an extrapolation if \(x < x_{\min}\) or \(x > x_{\max}\). Extrapolation may also occur when a prediction is made for a new setting that is not represented by the observed data, even if its numerical predictor value falls within that range.

What the Polynomial Model Says—and Does Not Say

A degree-\(d\) polynomial regression model represents the conditional mean response as a polynomial in the predictor:

$$ Y_i = \beta_0 + \beta_1 x_i + \beta_2 x_i^2 + \cdots + \beta_d x_i^d + \varepsilon_i $$

Here, \(Y_i\) is the response for observation \(i\), \(x_i\) is its predictor value, the \(\beta\) terms are population coefficients, and \(\varepsilon_i\) is the error. The fitted model replaces the unknown coefficients with estimates and gives a fitted mean response, \(\hat{y}(x)\), at each \(x\). The model describes a conditional mean, not a guarantee about an individual future response.

As in ordinary regression, a standard model assumes that the conditional mean has the specified polynomial form over the range where the model is being used, and that errors are independent, have mean zero, and have constant variance. Normal errors are an additional assumption used for the usual small-sample inference procedures. These assumptions do not make extrapolation safe: in particular, the observed data cannot check whether the conditional mean continues to follow the same polynomial beyond the observed predictor values.

A fitted polynomial is mathematically defined outside the data range, but that extension is not automatically an empirically supported relationship. When reporting an extrapolation, state which predictor value lies outside the observed range, how far outside it is, and why the continuation of the fitted shape may or may not be plausible.

Worked Example: A Quadratic Yield Curve Beyond Its Data

Suppose a hypothetical experiment observes fertilizer amounts from 0 to 10 kilograms per plot. A fitted quadratic model for crop yield, measured in kilograms per plot, is \(\hat{y}(x)=18+4x-0.30x^2\). Find fitted yields at 8 and 14 kilograms, and assess the second prediction.

At \(x=8\), the amount is inside the observed range, so this is interpolation:

$$ \hat{y}(8)=18+4(8)-0.30(8^2)=18+32-19.2=30.8 $$

The fitted yield is 30.8 kilograms per plot. At \(x=14\), the amount is outside the observed range, so this is extrapolation:

$$ \hat{y}(14)=18+4(14)-0.30(14^2)=18+56-58.8=15.2 $$

The model predicts a lower yield at 14 kilograms than at 8 kilograms. Its derivative is \(4-0.60x\), which equals zero at \(x=4/0.60 \approx 6.667\). Thus the fitted curve reaches a maximum near 6.667 kilograms and decreases thereafter. That shape is part of the model’s mathematical extension, not evidence that yields actually follow it beyond 10 kilograms. The prediction of 15.2 kilograms should be presented as an extrapolation, with its unsupported continuation made clear.

Why Higher-Degree Terms Can Take Over

A polynomial may appear smooth and modest over the observed range but change rapidly farther away. The reason is that powers of \(x\) grow at different rates. For a degree-\(d\) polynomial with nonzero highest-degree coefficient, the \(x^d\) term eventually dominates the lower-degree terms as the magnitude of \(x\) increases.

Justification: For \(p(x)=\beta_0+\beta_1x+\cdots+\beta_dx^d\), with \(\beta_d \neq 0\), divide by \(x^d\) when \(x \neq 0\):
$$ \frac{p(x)}{x^d} = \beta_d+\frac{\beta_{d-1}}{x}+\cdots+\frac{\beta_1}{x^{d-1}}+\frac{\beta_0}{x^d} $$

As \(|x|\) grows, every fraction on the right tends to zero, so \(p(x)/x^d\) tends to \(\beta_d\). This shows why the highest-degree term controls the polynomial’s distant end behavior. It does not say exactly how soon that dominance begins: a high-degree term may be small over the observed range and become important only much farther away. Scaling or centering a predictor can make polynomial calculations more stable, but it does not create data beyond the observed range.

Worked Example: A Fifth-Degree Term and an Impossible Extension

Suppose hypothetical data relate temperature \(T\), in degrees Celsius, to a nonnegative production amount measured in tons per hectare. Observations cover 15°C to 25°C. Let \(z=(T-20)/5\), so the observed values of \(z\) range from \(-1\) to 1. A fitted fifth-degree model is \(\hat{y}=100+6z+4z^2-2z^5\). Calculate its fitted values at 25°C, 30°C, and 35°C.

At 25°C, \(z=(25-20)/5=1\), at the upper edge of the observed range:

$$ \hat{y}=100+6(1)+4(1^2)-2(1^5)=100+6+4-2=108 $$

At 30°C, \(z=2\), outside the data range:

$$ \hat{y}=100+6(2)+4(2^2)-2(2^5)=100+12+16-64=64 $$

At 35°C, \(z=3\), farther outside the data range:

$$ \hat{y}=100+6(3)+4(3^2)-2(3^5)=100+18+36-486=-332 $$

The model moves from a fitted 108 tons per hectare at the observed boundary to a fitted 64 at 30°C and then to an impossible negative production amount at 35°C. The fifth-degree term contributes \(-486\) at \(z=3\), overwhelming the other terms. The calculation is correct for the fitted equation, but the negative prediction signals that this polynomial’s distant extension is not a credible description of production.

Check How Much the Prediction Depends on the Model

Extrapolated predictions can be especially sensitive to the chosen polynomial form. Two fitted curves may give nearly identical values throughout the observed range yet diverge outside it. Comparing their predictions is a useful diagnostic: it reveals that the data provide limited support for a unique continuation. It does not determine which curve is correct beyond the observations.

Worked Example: Two Curves That Agree in Range but Diverge Outside It

Suppose hypothetical predictor values run from \(x=5\) to \(x=15\), and define \(u=(x-10)/5\), giving observed values \(-1 \leq u \leq 1\). Consider two fitted models for a response measured in units per shift: \(\hat{y}_1=50+8u\) and \(\hat{y}_2=50+8u+0.05u^4\). Compare their fitted predictions at the observed boundary \(x=15\) and at \(x=30\).

At \(x=15\), \(u=1\). The predictions are:

$$ \hat{y}_1=50+8(1)=58 \qquad \hat{y}_2=50+8(1)+0.05(1^4)=58.05 $$

They differ by only 0.05 response units at this boundary. In fact, throughout the observed range, the added term is between 0 and 0.05 because \(0 \leq u^4 \leq 1\). At \(x=30\), however, \(u=(30-10)/5=4\), which is outside the observed range:

$$ \hat{y}_1=50+8(4)=82 \qquad \hat{y}_2=50+8(4)+0.05(4^4)=82+12.8=94.8 $$

The predictions now differ by 12.8 units. The data may show little difference between these fitted curves where observations exist, but their extrapolations are not interchangeable. Reporting just one prediction at \(x=30\) would hide this model dependence.

A Practical Assessment

Before presenting a polynomial prediction, first identify the observed range of the predictor and compare the proposed value with both endpoints. If the value is outside that range, make the extrapolation explicit. Then inspect the fitted curve near the boundary and at the proposed value: does it reverse direction, grow rapidly, or produce values that conflict with what the response can represent? A surprising prediction deserves particular caution; a plausible-looking one is not automatically supported.

When different reasonable polynomial fits produce substantially different predictions, report that sensitivity rather than presenting one curve as definitive. If the prediction matters for a real decision, new observations in the relevant predictor range can provide evidence about how the relationship continues. Without such data, avoid treating the polynomial’s extension as a confirmed trend. A fitted mean prediction also does not specify the value that an individual future observation will take.

Common Mistake

Wrong reasoning: “The polynomial fit follows the observed points well, so its prediction beyond the largest observed \(x\) should be reliable.” This confuses fit within the observed range with evidence outside it. Many different curves can be close to the same observations yet behave quite differently beyond the boundary.

Correction: Check the observed predictor range, calculate the proposed value from the fitted equation, and inspect how the polynomial behaves outside the data. State that the result is an extrapolation and identify any rapid reversal, extreme value, or sensitivity to model choice. Good fit within the range does not establish that the same polynomial relationship continues beyond it.

Key takeaway: Polynomial equations can be evaluated outside the data, but their high-degree terms may produce unsupported reversals or extreme predictions. Treat every such result as an extrapolation, and make the limits of the available evidence clear.

Check Your Understanding

Answer each question using the observed predictor range and the fitted polynomial’s behavior.

  1. Observed predictor values range from 2 to 9. Is a prediction at \(x=9\) interpolation or extrapolation? What about \(x=9.1\)?
  2. Why can a polynomial fit that looks reasonable within the data range become implausible farther outside it?
  3. A fitted degree-four model has a nonzero coefficient for \(x^4\). Explain why that term eventually dominates the lower-degree terms as \(|x|\) increases.
  4. Two polynomial models have very similar fitted values over the observed range but differ substantially at a proposed value beyond that range. What should this tell you about the prediction?
  5. Why does a good fit within the observed range not establish that the same relationship continues beyond that range?