- Introduced by
- Montgomery, Peck & Vining (textbook treatment); classical least squares
- Year
- 2012
- Type
- Linear regression in transformed predictors
What does it do?
Polynomial regression models a continuous outcome as a polynomial function of a predictor, so the fitted curve can bend while the model stays linear in its coefficients.
It is a core tool of response surface analysis. The method itself is classical least squares; Montgomery, Peck and Vining's Introduction to Linear Regression Analysis (2012) is cited here as a standard reference.
The intuition behind the method
Instead of forcing a straight line through data that clearly curves, polynomial regression lets the fit bend by adding the predictor's square, cube, and higher powers as extra columns. The model still combines these terms linearly, so it can be estimated like ordinary least squares while tracing a smooth curve through the cloud of points.
History
Polynomial regression is an extension of linear regression obtained by adding powers of a predictor, and it is a building block of response surface methodology. Polynomial terms within a linear model are a standard topic in regression textbooks.
When to use it
Choose polynomial regression when the outcome is continuous and its relationship with a single predictor is clearly curved, with a smooth shape that a low-degree polynomial can describe, such as a response that rises and then flattens or falls. The standard OLS assumptions still apply, other than linearity in the predictor. Do not use it when the curve has local features that a low-degree polynomial cannot capture, where piecewise methods such as spline regression are usually more suitable, or when the data are too few to estimate the chosen number of coefficients reliably. Keep the degree low and select it by cross-validation, and centre the predictor before forming the powers.
Limitations and considerations
- High-degree polynomials overfit, fitting noise rather than the underlying trend, and their fitted curve can change sharply between neighbouring observations.
- Higher powers of x are strongly correlated with lower powers, which inflates coefficient standard errors unless the predictor is centred.
- Individual coefficients describe terms of a polynomial rather than the effect of x at a single value, so they are hard to interpret on their own.
- Apart from linearity in x, inference still relies on the usual OLS assumptions, including independent errors with constant variance and, for exact small-sample tests, normally distributed errors.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Captures smooth curved relationships while remaining linear in the coefficients, so it is estimated with ordinary least squares.
- The closed-form estimator β̂ = (ZᵀZ)⁻¹Zᵀy makes fitting direct, and the model is interpreted as an extension of linear regression.
- Provides the foundational model for response surface analysis, where the fitted curve or surface is used to locate settings of the input variables.
Applications
- Modelling a continuous outcome that rises and then falls (or otherwise curves) with a predictor.
- Response surface analysis to find optimal settings of input variables.
- Approximating an unknown but smooth non-linear relationship for prediction.
How it works
How it works
The outcome y is written as a sum of the predictor x raised to increasing powers (x, x², …, x^d), each with its own coefficient, plus an error term ε. The fitted curve is ŷ = Zβ̂, so the curve can bend, but the model stays linear in the coefficients β.
Formula
\hat{y} = \beta_0 + \beta_1 x + \beta_2 x^2 + \dots + \beta_d x^d + \varepsilonThe powers of x are stacked into an expanded design matrix Z, and the coefficients are found by the same closed-form least-squares solution used for linear regression, β̂ = (ZᵀZ)⁻¹Zᵀy, minimising the sum of squared residuals.
Formula
\hat{\beta} = (Z^{\top}Z)^{-1}Z^{\top}y,\quad Z = [1,\,x,\,x^2,\dots,\,x^d]Common pitfalls
- Choosing too high a degree and overfitting; select the degree by cross-validation rather than by in-sample R², which never decreases as the degree rises.
- Failing to centre the predictor before raising it to powers, which creates severe multicollinearity among the terms.
- Extrapolating beyond the observed range of x, where polynomial fits can behave erratically.
- Using a degree so high that the number of coefficients (d + 1) exceeds the number of distinct x values, which makes ZᵀZ singular so the estimator cannot be computed. When d + 1 equals the number of distinct x values, the fit interpolates the data exactly with zero residuals and severe overfitting.
Frequently asked questions
How do I choose the polynomial degree?
Start low and increase the degree only as long as it meaningfully improves out-of-sample fit. Use cross-validation rather than in-sample R², because higher degrees always raise in-sample fit while overfitting noise.
Why should I centre the predictor?
Raising x to successive powers makes the terms (x, x², x³, …) strongly correlated, inflating the standard errors. Centring the predictor before forming the powers reduces this multicollinearity and stabilises the coefficients.
Is polynomial regression still a linear model?
Yes. Although the fitted curve bends, the model is linear in its coefficients, so it is estimated with the same ordinary least-squares machinery as linear regression on an expanded set of predictor columns.
When should I use splines instead?
When the curve has local features, spline regression is often preferred. It fits separate low-degree polynomial pieces joined at knots, which can capture such features without the instability of a single high-degree polynomial. Compare the two approaches using cross-validated fit.
Related methods
Sources
Montgomery, D. C., Peck, E. A. & Vining, G. G. (2012). Introduction to Linear Regression Analysis. Wiley.
ISBN: 978-0470542811