Breusch-Pagan Test Calculator
Inputs
- Inputs: n = 100, auxiliary R-squared = 8.20% and 3 predictor degrees of freedom.
- LM statistic: 100 x 0.0820 = 8.20.
- Chi-square tail on 3 degrees of freedom: p = 0.0421.
- Breusch-Pagan result: LM = 8.20 - reject constant variance at 5%.
A regression can have unbiased coefficients and still be lying to you - through its standard errors. If the error variance grows or shrinks with the predictors, a pattern called heteroskedasticity, the usual standard errors are wrong in a direction nobody can sign in advance. Breusch and Pagan's 1979 test is the classic tripwire: square the residuals, regress those squares on the same predictors, and ask whether that auxiliary regression explains anything. If the error variance were truly constant, it should explain nothing at all.
Enter the sample size, the auxiliary regression's R-squared, and the number of predictors, and this calculator returns the LM statistic, its chi-square p-value, and the verdict at the 5% level. The worked examples show a borderline rejection, a comfortable non-rejection, and a two-predictor case whose p-value has a closed form.
Worked examples
Rejects at the 5% line
(100 · 8.2 % · 3)
| Breusch-Pagan LM statistic | 8.20 |
| Degrees of freedom | 3 |
| P-value | 0.0421 |
| Verdict | Reject constant variance at 5% |
No evidence of heteroskedasticity
(250 · 3.1 % · 5)
| Breusch-Pagan LM statistic | 7.75 |
| Degrees of freedom | 5 |
| P-value | 0.1706 |
| Verdict | No evidence against constant variance at 5% |
Two predictors, clear rejection
(80 · 12.5 % · 2)
| Breusch-Pagan LM statistic | 10.00 |
| Degrees of freedom | 2 |
| P-value | 0.0067 |
| Verdict | Reject constant variance at 5% |
Why residual variance matters
Heteroskedasticity is the quiet assumption failure. The coefficient estimates remain unbiased - the line is still aimed at the right place - but the reported precision is fiction: confidence intervals too narrow where the variance is large, too wide where it is small, and t-statistics graded against the wrong yardstick. In cross-sections it is the rule rather than the exception, because scale differences between observations almost guarantee that the big ones vary more.
The test's logic follows the failure exactly. If variance is a function of the predictors, then squared residuals - the raw material of variance - should be predictable from those same predictors. The auxiliary regression is that prediction attempt. An R-squared near zero says the squares are patternless, as constant variance requires; a substantial one says the variance has a structure, and names the suspects.
The statistic itself could hardly be simpler: LM = n x R-squared of the auxiliary regression. The first worked example multiplies a sample of 100 by an auxiliary R-squared of 8.20% to get LM = 8.20, compared against a chi-square distribution on 3 degrees of freedom - one per predictor in the auxiliary regression.
- LM = n x R-squared of the regression of squared residuals on the predictors.
- Under constant variance, LM follows a chi-square with one degree of freedom per predictor.
- A rejection indicts the standard errors, not the coefficient estimates, which stay unbiased.
- Cook and Weisberg's 1983 variant studentises the statistic for non-normal errors.
The auxiliary regression and the LM statistic
The second example shows a test with nothing to find. A sample of 250 with an auxiliary R-squared of 3.10% gives LM = 7.75, and spread across 5 degrees of freedom that is a p-value of 0.1706 - comfortably no evidence against constant variance. Note what the larger sample did: it made a small R-squared produce a middling statistic, because LM scales with n. Power grows with data; so does the test's sensitivity to trivially small variance patterns, which is why the verdict is read alongside the size of the auxiliary R-squared, not instead of it.
The third example is the arithmetically elegant case. With 2 degrees of freedom the chi-square survival function collapses to e raised to minus half the statistic, so an LM of 10.00 - from 80 observations and an auxiliary R-squared of 12.50% - lands at a p-value of 0.0067 exactly. It is the one configuration where the tail probability can be checked on the back of an envelope, and a useful audit of any implementation, this page included.
Degrees of freedom are the count of predictors in the auxiliary regression, which normally mirrors the main model. Miscounting them is the commonest input error: the constant is not a predictor, and each dummy and interaction is.
| Example | n x auxiliary R-squared | LM | df | P-value | Verdict at 5% |
|---|---|---|---|---|---|
| Borderline case | 100 x 8.20% | 8.20 | 3 | 0.0421 | Reject |
| Quiet residuals | 250 x 3.10% | 7.75 | 5 | 0.1706 | No evidence |
| Two predictors | 80 x 12.50% | 10.00 | 2 | 0.0067 | Reject |
Worked examples
Example 1: Sample size n 100; Auxiliary regression R-squared 8.2; Predictors (degrees of freedom) 3. Breusch-Pagan LM statistic = 8.20. Supporting values: Degrees of freedom 3; P-value 0.0421; Verdict Reject constant variance at 5%. Inputs: n = 100, auxiliary R-squared = 8.20% and 3 predictor degrees of freedom. LM statistic: 100 x 0.0820 = 8.20. Chi-square tail on 3 degrees of freedom: p = 0.0421. Breusch-Pagan result: LM = 8.20 - reject constant variance at 5%.
Example 2: Sample size n 250; Auxiliary regression R-squared 3.1; Predictors (degrees of freedom) 5. Breusch-Pagan LM statistic = 7.75. Supporting values: Degrees of freedom 5; P-value 0.1706; Verdict No evidence against constant variance at 5%. Inputs: n = 250, auxiliary R-squared = 3.10% and 5 predictor degrees of freedom. LM statistic: 250 x 0.0310 = 7.75. Chi-square tail on 5 degrees of freedom: p = 0.1706. Breusch-Pagan result: LM = 7.75 - no evidence against constant variance at 5%.
Example 3: Sample size n 80; Auxiliary regression R-squared 12.5; Predictors (degrees of freedom) 2. Breusch-Pagan LM statistic = 10.00. Supporting values: Degrees of freedom 2; P-value 0.0067; Verdict Reject constant variance at 5%. Inputs: n = 80, auxiliary R-squared = 12.50% and 2 predictor degrees of freedom. LM statistic: 80 x 0.1250 = 10.00. Chi-square tail on 2 degrees of freedom: p = 0.0067. Breusch-Pagan result: LM = 10.00 - reject constant variance at 5%.
Breusch-Pagan against White and Goldfeld-Quandt
The Breusch-Pagan test aims at variance that moves with the predictors in a specified, roughly linear way, and its power concentrates there. White's test casts a wider net - squares and cross-products of the predictors in the auxiliary regression - buying generality with degrees of freedom and a vaguer diagnosis when it rejects. Goldfeld-Quandt takes the older road of splitting the sample and comparing residual variances between the halves, powerful when a single ordering variable is the suspect.
The 1983 Cook-Weisberg refinement matters when errors are far from normal: the original statistic's chi-square calibration leans on normality more than its reputation suggests, and the studentised version repairs the calibration. In practice the three are run as a panel - agreement is reassurance, and the pattern of disagreement is itself diagnostic about the variance's shape.
What to do when the test rejects
A rejection is a beginning, not a verdict on the model. The first remedy is presentational: heteroskedasticity-robust standard errors leave the coefficients untouched and repair the inference, which is why they have become the default in much empirical work. The second is structural: weighted least squares, where the variance pattern the test detected becomes the weighting scheme, recovering efficiency rather than merely honesty. The third is transformational: a logarithmic or similar rescaling of the response often stabilises the variance at its source.
What a rejection does not license is ignoring it. The first example's p of 0.0421 is not a catastrophe - it is a borderline finding on a modest sample - but reporting the unadjusted standard errors beside it, unremarked, would be grading the model by a yardstick the data have already voted against.
Feeding the test honestly
The inputs this page needs are the three numbers a regression printout already contains once the auxiliary regression has been run: the sample size, that regression's R-squared, and the predictor count. Packages that report the test directly will hand you the LM statistic instead - in which case this page's value is the audit: multiply n by the auxiliary R-squared yourself and see whether their figure, and its p-value, survive independent arithmetic.
One discipline: run the auxiliary regression on the same observations and the same predictor set as the main model. Dropping outliers or adding a variable between the two fits silently changes the question, and the resulting LM - however precisely computed - answers a question nobody asked.
Read across this page's three examples and the audit pattern is complete. A statistic of 8.20 on 3 degrees of freedom rejects at 0.0421; a statistic of 7.75 on 5 degrees of freedom does not reject at 0.1706; a statistic of 10.00 on 2 degrees of freedom rejects emphatically at 0.0067. The middle case is the one to internalise: the second-largest statistic of the three is the only non-rejection, because the degrees of freedom, not the statistic's size, carry the verdict.
FAQs
What LM statistic does n = 100 with an auxiliary R-squared of 8.20% give?
8.20 - the statistic is simply the product. On 3 degrees of freedom that is a p-value of 0.0421, a rejection of constant variance at the 5% level, though a borderline one.
What does a rejection actually indict?
The standard errors, not the coefficients. Heteroskedasticity leaves estimates unbiased but makes the reported precision fiction. The remedies are robust standard errors, weighted least squares, or a variance-stabilising transformation.
Why did the larger sample not reject with LM = 7.75?
Because the statistic is judged against its degrees of freedom - 5 there, not 3. Spread wider, the same evidence is weaker: p = 0.1706. LM scales with n, so both the statistic and its df must be read together.
Is the third example's p-value exact?
Yes - with 2 degrees of freedom the chi-square tail is e^(-LM/2), and e^(-5) is 0.0067. It is the one case checkable by hand, which makes the 80-observation, 12.50% example a good audit of any implementation.
How does Breusch-Pagan differ from White's test?
Aim. Breusch-Pagan looks for variance moving with the predictors themselves; White adds squares and cross-products, casting a wider net at the cost of degrees of freedom and a vaguer diagnosis. Cook and Weisberg's variant of Breusch-Pagan additionally repairs the calibration when errors are non-normal.
What auxiliary R-squared would worry you?
Context decides, but the product is the test: on 100 observations an auxiliary R-squared of 8.20% already rejects. Read the R-squared for the size of the variance pattern and the p-value for the evidence - a huge sample can make a trivial pattern 'significant'.