AI Glossary / Statistics and probability / Advanced

Breusch - Pagan test

Definition

The Breusch - Pagan test is a regression diagnostic for heteroskedasticity: error variance that changes with specified explanatory variables. It examines whether squared regression residuals are systematically related to those variables. The original test and the commonly used Koenker studentized version use different scaling and assumptions, so the reported variant matters.

What it means

A regression might predict the average response reasonably well while being much less precise for some cases than others. For example, errors may become more variable as workload increases. Assuming one common error variance can then misrepresent uncertainty.
The test addresses conditional error spread, not whether the mean response changes. Positive and negative residuals can balance within every group while their magnitudes differ substantially. It also differs from a serial-correlation test: changing variance and dependence across time are separate properties that can occur together or independently.

How it works

Fit the original regression and calculate its residuals. Specify the variables thought to explain error variance, including a constant in the auxiliary model. Regress squared residuals on these variables and assess whether the nonconstant coefficients are jointly zero.
In the original normal-error formulation, divide the squared residuals by their overall mean and use half the auxiliary regression's explained sum of squares as the LM statistic. A common studentized version associated with Koenker instead uses n times the auxiliary R-squared. Both commonly use an asymptotic chi-square reference distribution, with degrees of freedom equal to the number of independent nonconstant variance predictors.
The studentized version relaxes the original normality requirement under suitable conditions; it is not universally robust to dependence, misspecification, or every sampling problem. Software defaults differ, so identify the version instead of reporting an unnamed p-value.

Three practical examples

  • A service analyst checks whether residual variability increases with workload after fitting a model for mean response time. The workload variable can be relevant to both the mean and variance models.
  • An AI-assisted demand study investigates whether forecast-regression errors have different spread across operating groups. Group indicators in the variance model represent a specific diagnostic question.
  • A research team compares residual spread across values of a continuous input before interpreting ordinary regression standard errors. It combines the diagnostic with residual plots and checks of the mean specification.

Think of it this way

Imagine throwing darts at several targets. The average landing point can be centered on every target, yet the darts may form a tight cluster on one and a wide cloud on another. The test asks whether specified target characteristics help explain those differences in spread.

Worked example

Consider eight invented observations with a binary group indicator z. The first four have z = 0 and outcomes 9, 11, 8, and 12. The last four have z = 1 and outcomes 7, 13, 6, and 14. Regressing the outcomes on an intercept and z gives an intercept of 10 and a group coefficient of zero, because both group means equal 10.
The residuals are -1, 1, -2, 2, -3, 3, -4, and 4. Their squares are 1, 1, 4, 4, 9, 9, 16, and 16. The squared-residual mean is 2.5 in the first group and 12.5 in the second, with an overall mean of 7.5.
Regressing squared residuals on an intercept and z gives fitted values 2.5 for the first four cases and 12.5 for the last four. The centered total sum of squares is 258, the residual sum of squares is 58, and the explained sum of squares is 200.
The Koenker-style statistic is nR-squared = 8 times (200/258) = 800/129, approximately 6.20155. Using a chi-square-one reference distribution gives an approximate p-value of 0.01276.
For the original normal-error calculation, first normalize squared residuals by their mean, 7.5. The explained sum of squares becomes 200/(7.5 squared). Half of that is 16/9, approximately 1.77778, giving an approximate chi-square-one p-value of 0.18242.
The two calculations therefore give different decisions at a five-percent threshold. This intentionally tiny dataset demonstrates that the variants are not interchangeable formulas. It does not establish that either asymptotic p-value has reliable finite-sample calibration with only eight observations, nor does it justify choosing whichever result is preferred.
The observed group means remain identical throughout. The diagnostic information comes from the different residual magnitudes, not a difference in average outcome. Neither p-value estimates the probability that the model is correct or identifies why the spread differs.

Illustrative case study

Fictional company Birch Operations models service duration using workload and job characteristics. Residual plots show a wider range of errors for demanding jobs. The analyst defines a variance model and explicitly records which Breusch - Pagan variant is used.
The team also investigates whether missing nonlinear terms in the mean model could explain the pattern. It distinguishes correcting an inadequate mean specification from changing uncertainty estimates or modeling the variance directly. Later evaluation checks whether any revisions improve the intended operational decisions. This is a fictional teaching scenario, not a claim that one diagnostic automatically determines the right remedy.

Common misconceptions and mistakes

A significant result is not proof of biased regression coefficients. Under an appropriate conditional-mean specification and exogeneity, heteroskedasticity can affect efficiency and conventional uncertainty estimates without necessarily biasing ordinary least-squares coefficients.
Failure to reject does not prove constant variance. The chosen variance predictors may miss the pattern or the sample may provide little power.
The test is not the Breusch - Godfrey test, which concerns residual serial correlation.
A studentized or robust label does not eliminate all assumptions. Independence and the validity of the underlying regression setup still require attention.
Selecting variance predictors repeatedly after viewing results changes the analysis and can increase false-positive risk.

Business use

Use the test when unequal error spread could affect uncertainty reporting or decisions across operating conditions. State the mean model, variance predictors, test variant, and sample size. Inspect residual patterns and practical differences before choosing between model revision, suitable robust standard errors, or an explicitly modeled variance structure.

People also ask

Must variance predictors equal the original regression predictors?

No. They should reflect the variance question and be appropriately specified.

Does the auxiliary model need a constant?

The usual calculation described here includes one.

Does the test repair heteroskedasticity?

No. It is a diagnostic, not an automatic correction.

Check your understanding

Are the two group means different in the example?

Answer: No; both equal 10.

What differs?

Answer: Their squared-residual averages, 2.5 and 12.5.

Why name the test variant?

Answer: The original and studentized versions can produce different statistics and p-values.

Related terms

  • Weighted least squares
  • Heteroskedasticity
  • homoskedasticity
  • squared residual
  • auxiliary regression
  • Koenker test
  • robust standard error

Learn next

Compare residual-versus-fitted plots, the White test, and variance modeling. Study how robust uncertainty estimates differ from changes to the regression's predictions.

  • White test

More in Statistics and probability

  • Box's M test - Box's M test is a statistical test of whether several populations have the same covariance matrix.
  • Bradley-Terry Model - The Bradley-Terry model is a probabilistic model for pairwise comparisons.
  • Breusch - Godfrey test - The Breusch - Godfrey test is a regression diagnostic for serial correlation in the model's errors up to a specified lag order.
  • Brown - Forsythe test - The Brown - Forsythe test commonly means a median-centered version of Levene's test for equality of population variances across groups.
  • Brunner-Munzel test - The Brunner-Munzel test compares two independent populations through the probability that a randomly selected observation from one exceeds an observation...
  • Brushing - Brushing is an interactive data-exploration technique in which a user selects and highlights observations in a chart.

Sources

Statsmodels, het_breuschpagan documentation: https://www.statsmodels.org/stable/generated/statsmodels.stats.diagnostic.het_breuschpagan.html . Implementation and references to Breusch–Pagan and Koenker: https://www.statsmodels.org/stable/_modules/statsmodels/stats/diagnostic.html#het_breuschpagan . Numerical data and company scenario are original illustrations.

Previous: Breusch - Godfrey test Next: Bridging inference

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer