Why Center a Predictor in a Polynomial Model?
A polynomial regression curve can be written using powers of the original predictor, but those powers may be difficult to interpret when zero is far from the observed data. Centering replaces \(x\) with \(z=x-c\), where \(c\) is a chosen reference value. The curve is expressed around \(x=c\): its intercept is the fitted response there, and its linear coefficient describes the local slope there. The transformation changes the coefficient values, but, when the complete polynomial is retained, it does not change the fitted curve.
This is an algebraic re-expression of a model, not a change to the response or a nonlinear transformation of the fitted relationship. The choice of \(c\) can be a useful, in-range value, such as the sample mean of the predictor or a value with practical meaning. Centering may make coefficients easier to read; it does not by itself create new information or guarantee more precise estimates.
Model and Assumptions
For a quadratic regression, suppose the conditional mean is represented by a complete quadratic polynomial:
Here \(Y_i\) is the response for observation \(i\), and \(\varepsilon_i\) is the error. The conditional-mean condition gives \(E(Y_i\mid x_i)=\beta_0+\beta_1x_i+\beta_2x_i^2\). Standard least-squares inference typically also assumes independent errors with constant variance, along with any distributional condition needed for the particular inference. The algebraic equivalence developed below does not require normal errors or constant variance: it follows from substituting \(x=z+c\).
With \(z_i=x_i-c\), write the same quadratic curve as
The \(\beta\) coefficients refer to powers of \(x\); the \(\gamma\) coefficients refer to powers of \(z\). They are not generally equal. Their connection follows by expanding the powers of \(z+c\).
Deriving the Quadratic Coefficient Transformation
Since \(x=z+c\), we have \(x^2=(z+c)^2=z^2+2cz+c^2\). Substitute these expressions into the original conditional mean and collect the constant, \(z\), and \(z^2\) terms:
Matching the coefficients of like powers gives the centered coefficients. This matching is valid because the two expressions are polynomials that must agree at every \(x\), equivalently every \(z=x-c\).
The reverse formulas follow by substituting \(z=x-c\) into the centered polynomial and collecting powers of \(x\):
These equations make clear that the quadratic coefficient is unchanged by centering, while the intercept and linear coefficient depend on the reference point. The intercept changes because the origin has moved. The linear coefficient changes because the slope of a curved function depends on where it is evaluated.
Worked Example: Centering an Original-Scale Quadratic
A fitted quadratic model is \(\widehat{Y}=12-2x+0.5x^2\). Center the predictor at \(c=3\), then predict at \(x=5\) using both forms. Interpret the centered intercept and linear coefficient.
Method. Apply the quadratic coefficient formulas, then compare predictions. This avoids treating the coefficients as unchanged merely because the response curve is unchanged.
For \(\beta_0=12\), \(\beta_1=-2\), \(\beta_2=0.5\), and \(c=3\):
Thus, with \(z=x-3\), the centered prediction equation is \(\widehat{Y}=10.5+z+0.5z^2\). At \(x=5\), \(z=5-3=2\), so
Using the original form gives \(12-2(5)+0.5(5^2)=12-10+12.5=14.5\), which checks the calculation. The centered intercept \(10.5\) is the fitted response at \(x=3\). The centered linear coefficient \(1\) is the slope of the fitted curve at \(x=3\), not a constant slope at every \(x\).
What the Centered Coefficients Mean
For the centered quadratic conditional mean \(m(x)=\gamma_0+\gamma_1(x-c)+\gamma_2(x-c)^2\), set \(x=c\). Then \(z=0\), so \(m(c)=\gamma_0\). Differentiating with respect to \(x\) gives \(m'(x)=\gamma_1+2\gamma_2(x-c)\), and therefore \(m'(c)=\gamma_1\). The coefficient \(\gamma_2\) controls curvature; specifically, \(m''(x)=2\gamma_2\) at every \(x\).
These interpretations concern the fitted conditional-mean curve. They do not imply that an observed response at \(x=c\) must equal \(\gamma_0\): the observed response also includes its error term. Nor does centering make the curve linear. It simply makes the value and slope at the selected reference point appear directly as coefficients.
Worked Example: Expanding a Centered Quadratic
A fitted model is \(\widehat{Y}=8-1.5z+0.4z^2\), where \(z=x-2.5\). Express it in powers of \(x\), then predict at \(x=4\) from both forms.
Method. Substitute \(z=x-2.5\) and expand. This checks the reverse transformation and avoids using \(x\) in a formula whose coefficients are defined for \(z\).
At \(x=4\), \(z=4-2.5=1.5\). The centered form gives \(8-1.5(1.5)+0.4(1.5^2)=8-2.25+0.9=6.65\). The expanded form gives \(14.25-3.5(4)+0.4(4^2)=14.25-14+6.4=6.65\). The predictions agree. At \(x=2.5\), the centered intercept gives a fitted value of \(8\), and the slope there is \(-1.5\). The second derivative is \(2(0.4)=0.8\).
Centering a Cubic Model
The same substitution works at higher polynomial degrees. For the complete cubic model, let
Using \(x=z+c\), \(x^2=z^2+2cz+c^2\), and \(x^3=z^3+3cz^2+3c^2z+c^3\), collect like powers. The resulting formulas are
The centered intercept is again \(m(c)\), and the centered linear coefficient is \(m'(c)\). The centered quadratic coefficient is not generally the original quadratic coefficient: it includes the contribution \(3\beta_3c\) from the cubic term. In a cubic model, \(m''(c)=2\gamma_2\), so \(\gamma_2\) is half the second derivative at the reference point.
Worked Example: Centering a Cubic and Checking a Prediction
Consider \(\widehat{Y}=2-0.5x+0.2x^2-0.02x^3\), centered at \(c=2\). Find the centered coefficients and compare predictions at \(x=3\).
Method. Use the cubic transformation, then evaluate both equations. The main trap is to leave the quadratic coefficient unchanged; in a cubic model it changes when \(c\ne0\).
The centered equation is \(\widehat{Y}=1.64+0.06z+0.08z^2-0.02z^3\), where \(z=x-2\). At \(x=3\), \(z=1\), and the prediction is \(1.64+0.06+0.08-0.02=1.76\). Directly in the original form, it is \(2-0.5(3)+0.2(9)-0.02(27)=2-1.5+1.8-0.54=1.76\). The check confirms agreement. At \(x=2\), the fitted value is \(1.64\), and the slope is \(0.06\).
Why Fitted Values Stay the Same
For every observation, \(z_i=x_i-c\) and its powers are related to powers of \(x_i\) by the expansions above. Consequently, every complete polynomial in \(x_i\) has exactly the same value as its re-expressed polynomial in \(z_i\). The coefficient transformations are reversible: one can substitute \(x=z+c\) or \(z=x-c\) to recover the original coefficients. Thus, the two parameterizations describe the same set of possible fitted curves.
In least squares, each parameterization can therefore represent every fitted vector available in the other. Since the least-squares criterion is the sum of squared residuals for those fitted values, the minimizing fitted values and residuals are unchanged when the complete polynomial is used. This argument concerns the fitted curve and does not claim that individual coefficient estimates, their standard errors, or their interpretations are unchanged.
The equivalence has an important condition: retain all powers through the stated degree, including the intercept. If a term is omitted, the model may no longer represent the same set of curves after centering. For instance, a model containing \(1\) and \(x^2\) alone becomes a model involving both \(1\), \(z\), and \(z^2\), because \(x^2=(z+c)^2=z^2+2cz+c^2\). Dropping the \(z\) term generally changes the model.
Select \(c\), such as an observed value or a meaningful value in the predictor’s range.
Set \(z=x-c\), and remember that \(x=z+c\) when expanding back to the original scale.
Expand the powers, collect like terms, and retain the full polynomial degree.
Evaluate both forms at the same \(x\). A disagreement signals an algebra or substitution error.
Common Mistakes and Exam Traps
A frequent error is to assume that centering changes only the intercept. In a quadratic model, the linear coefficient changes by \(2\beta_2c\); in a cubic model, both the linear and quadratic coefficients can change. Another error is to interpret the centered linear coefficient as the slope everywhere. For a quadratic, the slope at a general \(x\) is \(\gamma_1+2\gamma_2(x-c)\); for a cubic it is \(\gamma_1+2\gamma_2(x-c)+3\gamma_3(x-c)^2\).
A final trap is to compare coefficient values without first checking which predictor scale they accompany. For example, \(\gamma_0\) is the fitted value at \(x=c\), not at \(x=0\), unless \(c=0\). When converting between forms, distribute each term carefully and verify at least one prediction in both forms. These checks are especially useful when the reference point is not an integer or when the polynomial includes a cubic term.
Check Your Understanding
Work each problem by transforming the coefficients and, where requested, checking the prediction.
- For \(\widehat{Y}=3+2x+0.5x^2\), center at \(c=2\). Give the centered equation and the prediction at \(x=4\). (Answer: \(\widehat{Y}=9+4z+0.5z^2\), \(z=x-2\); prediction \(19\).)
- A centered quadratic is \(\widehat{Y}=5-2z+0.25z^2\), where \(z=x-4\). Expand it in powers of \(x\), then predict at \(x=6\) in both forms. (Answer: \(\widehat{Y}=17-4x+0.25x^2\); both predict \(2\).)
- For \(\widehat{Y}=1+3x-x^2+0.1x^3\), center at \(c=2\). Give the centered coefficients and predict at \(x=3\). (Answer: \(\widehat{Y}=3.8+0.2z-0.4z^2+0.1z^3\), \(z=x-2\); prediction \(3.7\).)
- A fitted quadratic centered at \(c=10\) is \(\widehat{Y}=120-4z+0.3z^2\). Find the fitted value at \(x=12\) and the slope at \(x=12\). (Answer: fitted value \(113.2\); slope \(-2.8\).)
- A model includes only an intercept and \(x^2\), with \(c=1\). Explain why replacing \(x\) by \(z=x-1\) but retaining only an intercept and \(z^2\) does not generally preserve the original model. (Answer: \(x^2=(z+1)^2=z^2+2z+1\), so the equivalent model generally requires the omitted \(z\) term.)