Why Test for Nonconstant Variance?
The ordinary least squares regression model describes a conditional mean, but its usual standard errors and tests also rely on assumptions about the errors. One important assumption is that the error variance is constant across observations. If the variance changes systematically with one or more predictors, residual plots may show a widening or narrowing spread. The Breusch-Pagan test provides a formal test for variance changes associated with specified predictors.
The test does not ask whether the regression mean is correctly specified in every respect, nor does it identify every possible pattern of nonconstant variance. Its conclusion is limited to the variance directions included in the test. The procedure below is aligned with the SOA Exam SRM (Statistics for Risk Modeling) syllabus.
The Auxiliary Regression and Test Statistic
First fit the specified mean model by ordinary least squares and obtain residuals \(\hat{\varepsilon}_i=Y_i-\hat{Y}_i\). Then regress the squared residuals on an intercept and the chosen variance predictors:
Let \(R^2_{\mathrm{aux}}\) denote the coefficient of determination from this auxiliary regression. The Breusch-Pagan Lagrange multiplier (LM) statistic is
Under the null hypothesis and the usual regularity conditions, this statistic has an approximate chi-square distribution. Its degrees of freedom are determined by the independent variance-predictor directions, not by the number of coefficients in the original mean model. In particular, if the \(q\) variance-predictor columns, centered to remove their intercept components, have full rank, use \(q\) degrees of freedom. More generally, use the rank \(r\) of those centered columns. When columns are redundant, the corresponding slopes are not separately identifiable, so individual slope tests cannot be interpreted as stated.
The traditional score-test derivation assumes independent normal errors under the null, a correctly specified mean model, and a regular design. The chi-square reference is an asymptotic approximation, not an exact finite-sample distribution. The predictors used to describe variance must be specified, and the design must allow the tested directions to be identified. If the mean model is misspecified or the observations are dependent, the usual calibration may not be appropriate.
Why the LM Statistic Uses the Auxiliary Regression
The squared error is informative about variance: a large squared error is evidence of a larger error variance for that observation. Under the null, the expected squared error is the same across observations. The auxiliary regression asks whether the observed squared residuals nevertheless vary systematically with the selected \(z\)-variables.
A short derivation explains the \(nR^2\) form. For the score-test argument, consider a local log-linear variance model \(\operatorname{Var}(\varepsilon_i\mid z_i)=\sigma^2\exp(z_i^\mathsf{T}\gamma)\), with the null value \(\gamma=0\). Under normal errors, the variance score at the null is proportional to \(z_i(\varepsilon_i^2/\sigma^2-1)\). Thus, evidence against the null comes from the association between \(z_i\) and squared errors centered around their common null expectation.
In the auxiliary regression, the centered squared-residual response is projected onto the centered variance-predictor columns. The explained sum of squares measures that association. Under the null, the variance of a normal squared error is \(2\sigma^4\). Therefore the score statistic is asymptotically the explained sum of squares divided by \(2\sigma^4\). The auxiliary regression’s total sum of squares is approximately \(2n\sigma^4\), so
This is why the auxiliary-regression statistic has the LM form \(nR^2_{\mathrm{aux}}\). Estimating the mean and variance changes the finite-sample details, which is one reason the chi-square calibration is described as approximate.
Worked Examples
Worked Example: Testing One Specified Variance Predictor
A hypothetical insurer models the mean claim cost for a portfolio using policy age and coverage amount. The analyst suspects that error variance may change with policy age and uses policy age as the sole variance predictor. For \(n=40\) policies, the auxiliary regression of squared OLS residuals on an intercept and policy age has explained sum of squares \(18\) and total sum of squares \(60\). Test at the 5% level.
Method. Calculate the auxiliary \(R^2\), multiply by \(n\), and compare with the chi-square critical value using the rank of the centered variance-predictor columns.
The auxiliary coefficient of determination is \(R^2_{\mathrm{aux}}=18/60=0.30\). There is one variance predictor, and its centered column has rank \(r=1\), so the test has one degree of freedom. The LM statistic is \(LM=40(0.30)=12.00\).
At the 5% level, the upper-tail critical value for one degree of freedom is approximately \(3.841\). Since \(12.00>3.841\), reject the null hypothesis of constant variance. The result is evidence that error variance is associated with policy age in the specified direction; it does not establish that age is the cause of the changing variance.
Check. The explained sum of squares is \(30\%\) of the total, and \(40\) times \(30\%\) is \(12\), consistent with the computed statistic. Common mistake avoided: using the number of mean-model slopes as the degrees of freedom. Here the test has one variance direction, regardless of how many predictors appear in the mean model.
Worked Example: Testing Two Independent Variance Predictors
A hypothetical maintenance study models average repair cost using equipment age and annual operating hours. The analyst tests whether error variance depends on either of these two quantities. With \(n=50\) observations, the auxiliary regression has explained sum of squares \(9\) and total sum of squares \(75\). The two centered variance-predictor columns have full rank. Use a 5% significance level.
Method. Find the auxiliary \(R^2\), form \(nR^2\), and use two degrees of freedom because both centered predictor directions are independent.
First, \(R^2_{\mathrm{aux}}=9/75=0.12\). Then, \(LM=50(0.12)=6.00\). The rank is \(r=2\), so the 5% upper-tail critical value is approximately \(5.991\).
Because \(6.00>5.991\), reject the null at the 5% level, although the statistic is only slightly above the cutoff. The data provide evidence that variance changes along at least one of the two specified predictor directions. This joint test does not say which predictor is responsible.
Check. The auxiliary regression explains \(12\%\) of the squared-residual variation, and \(50\) times \(0.12\) equals \(6.00\). Common mistake avoided: treating the auxiliary \(R^2\) itself as the test statistic. The statistic is \(nR^2\), not \(R^2\).
Worked Example: Correcting for Redundant Variance Predictors
A hypothetical benefits analyst fits a mean model with a predictor \(x\). To test for changing variance, the analyst enters \(x\) and a second column that is exactly \(2x\) into the auxiliary regression. There are \(25\) observations, and the auxiliary regression has \(R^2_{\mathrm{aux}}=0.16\). Test at the 5% level and determine the correct degrees of freedom.
Method. Compute the rank of the centered variance-predictor columns before selecting the chi-square reference distribution. Although two columns were entered, the second is an exact multiple of the first, so they provide only one independent direction after centering. Thus \(r=1\), not \(2\).
The LM statistic is \(LM=25(0.16)=4.00\). For one degree of freedom, the 5% critical value is approximately \(3.841\). Since \(4.00>3.841\), reject the null of constant variance at the 5% level. The test detects evidence along the single shared direction, but it cannot separately estimate or test the effects of \(x\) and \(2x\).
Check. The statistic is \(4.00\); using two degrees of freedom would compare it with \(5.991\) and produce a different decision. That comparison is invalid because the centered columns do not have rank two. Common mistake avoided: counting entered columns rather than identifiable variance-predictor directions.
Interpreting the Result and Avoiding Traps
A rejection means the squared residuals contain evidence of association with at least one of the specified variance-predictor directions, under the test assumptions and reference approximation. It does not prove a particular variance model is correct, identify a causal mechanism, or imply that every observation has a different variance. A nonrejection means the test did not find sufficient evidence against constant variance in those directions; it does not prove that variance is constant or rule out patterns omitted from the auxiliary regression.
A common error is to use the number of coefficients in the original mean regression as the test degrees of freedom. The correct count concerns the variance predictors, and even their raw count is insufficient when centered columns are linearly dependent. For example, duplicate or proportional columns do not add an identifiable direction. In such a case, use the rank for the joint test and do not interpret the redundant slope coefficients separately.
Another trap is to treat rejection as a reason to change the mean equation automatically. The Breusch-Pagan test targets the variance, not whether the conditional mean is linear. Review the model and diagnostics in context. If the variance assumption is doubtful, usual OLS standard errors and inference may be unreliable; the test itself does not repair them.
Check Your Understanding
For each question, use a 5% significance level and the usual asymptotic chi-square reference. The approximate upper-tail critical values are \(3.841\) for one degree of freedom, \(5.991\) for two, and \(7.815\) for three.
- An auxiliary regression has \(n=30\), \(R^2_{\mathrm{aux}}=0.08\), and one independent centered variance-predictor column. Calculate the statistic and state the decision. (Answer: \(LM=2.40\), 1 degree of freedom; do not reject.)
- For \(n=48\), an auxiliary regression has explained sum of squares \(15\) and total sum of squares \(100\). There are two independent centered variance-predictor columns. Calculate the statistic and state the decision. (Answer: \(R^2_{\mathrm{aux}}=0.15\), \(LM=7.20\), 2 degrees of freedom; reject.)
- An auxiliary regression has \(n=60\), \(R^2_{\mathrm{aux}}=0.04\), and three entered variance predictors whose centered columns have rank two. What degrees of freedom apply, and what is the decision? (Answer: \(LM=2.40\), 2 degrees of freedom; do not reject.)
- Two variance-predictor columns are exact duplicates. For \(n=40\), the auxiliary \(R^2\) is \(0.11\). What is the appropriate test rank and decision? (Answer: rank 1, \(LM=4.40\); reject at 5%, but the duplicate slopes cannot be tested separately.)
- For \(n=80\), an auxiliary regression has \(R^2_{\mathrm{aux}}=0.06\). Four predictors were entered, but the centered columns have rank three. State the statistic, degrees of freedom, and conclusion. (Answer: \(LM=4.80\), 3 degrees of freedom; do not reject at 5%.)