Breusch-Pagan test
Models and regression · reference distribution: χ²(k)
When to use it
Check whether the variance of the residuals of a regression is constant (homoscedasticity).
Null hypothesis
The residuals are homoscedastic.
Assumptions
- Approximately normal residuals
Test statistic
LM = n\, R^2_{\text{aux}}How to report it
BP(2) = 8.9, p = .012
In R and Python
R
library(lmtest)
bptest(model)
Python
from statsmodels.stats.diagnostic import het_breuschpagan
het_breuschpagan(model.resid, model.model.exog)
In Python, stats is scipy.stats and np is numpy.
Variants and alternatives
- White, without assuming a form for the heteroscedasticity
Where it sits in the catalog
Models and regression. Tests run inside a fitted model: whether a coefficient matters, whether the model explains anything and whether the residuals meet the assumptions.
In the decision tree
- What do you want to do? Test a regression model
- What do you want to test? The residuals
- What problem do you suspect? Variance that changes with the fitted values