Polynomial Regression
Modelling Curvature with Polynomial Regression
Polynomial regression represents a curved mean response by including powers of a predictor. A quadratic model is
Although the curve is nonlinear in x, the model is linear in the unknown coefficients β0,β1,β2, so ordinary least squares can estimate them. A cubic model adds β3x3, and higher degrees add further bends.
The coefficient β1 is not a constant slope once a squared term is present. For a quadratic fitted curve, the instantaneous slope is
When β^2=0, setting this derivative to zero locates the turning point at x=−β^1/(2β^2).
A negative quadratic coefficient makes the parabola open downward, so the turning point is a maximum; a positive coefficient makes it a minimum.
A quadratic fitted curve drawn through a curved scatter, with points falling on both sides of the curve. The dashed line touches the curve at the single marked point and has the curve's slope there; at every other position the slope is different, which is why no single number can be quoted as “the” slope of a quadratic fit.
Predictions from a downward-curving quadratic fit
A worked example
Suppose a fitted relationship is y^=11+7x−0.7x2. At x=5, the fitted value is 11+35−17.5=28.5. The slope there is 7−1.4(5)=0, so this point is the curve's maximum because the squared-term coefficient is negative. Notice that the coefficients of x and x2 must be interpreted together; saying that a one-unit increase in x always adds 7 units to the response would be wrong.
Order of operations matters when evaluating a fitted curve. In β^2x2 the predictor is squared first and then multiplied by the coefficient: at x=5 the quadratic term above is −0.7(25)=−17.5, not (−0.7×5)2=12.25 and not −0.7(5)=−3.5. Evaluate each term separately and add at the end.
Polynomial terms are usually entered hierarchically: if x2 is retained, keep x even when its individual test is weak. Removing the lower-order term changes the model's meaning and can make its shape depend artificially on where the predictor's zero is placed. Centring x can reduce numerical correlation among powers without changing fitted values.
A common mistake is aggressive extrapolation. Outside the observed predictor range, the highest power dominates and the fitted curve may turn sharply toward implausible values. Use the curve primarily within the data range, inspect residual behaviour, and choose degree based on defensible structure rather than training fit alone.
A fitted model is y^=1+2x+0.5x2, where y is measured in metres and x in seconds. What is the predicted response at x=4 s?
From the graph, what is the change in predicted response, y^(6)−y^(2)?
A quadratic fitted curve drawn through a curved scatter, with points falling on both sides of the curve. The dashed line touches the curve at the single marked point and has the curve's slope there; at every other position the slope is different, which is why no single number can be quoted as “the” slope of a quadratic fit.
Predictions from a downward-curving quadratic fit