All Articles
Quantitative Finance
Intermediate
5 min readJune 15, 2025

Diagnosing Heteroskedasticity: The Breusch-Pagan Test

176
#BreuschPaganTest#Heteroskedasticity#RegressionDiagnostics#Econometrics#QuantitativeFinance#ActuarialScience#RiskManagement#ModelValidation#OLSRegression#FinancialModeling#StatisticalDiagnostics#DataScience#CFA#FRM#CQF

In the world of regression analysis, we often focus on estimating the mean response of the dependent variable. But what if the variance of the residuals isn't constant across observations? That phenomenon—known as heteroskedasticity—can undermine the reliability of your statistical inferences, leading to biased standard errors, inefficient estimates, and misleading hypothesis tests.

Enter the Breusch-Pagan Test, a powerful and widely used tool to detect heteroskedasticity in regression models.


Why Heteroskedasticity Matters

Most classical linear regression models assume homoskedasticity—a constant variance of the error terms across all levels of the explanatory variables. When this assumption is violated:

  • Confidence intervals and p-values become unreliable.
  • The efficiency of OLS estimators deteriorates.
  • Model risk increases, especially in financial and risk models where tail behavior is critical.

What is the Breusch-Pagan Test?

The Breusch-Pagan (BP) Test, proposed by Trevor Breusch and Adrian Pagan, checks whether the variance of the residuals from a regression depends on the independent variables.

Hypotheses

  • H₀ (Null): Homoskedasticity (constant variance of errors)
  • H₁ (Alternative): Heteroskedasticity (variance depends on explanatory variables)

How to Compute the Breusch-Pagan Test

  1. Fit your original regression model and obtain the residuals.
  2. Square the residuals to estimate the variance for each observation.
  3. Regress these squared residuals on the original independent variables.
  4. Calculate the test statistic and compare it against a chi-squared distribution with k degrees of freedom (where k is the number of independent variables).

Example in Python

import statsmodels.api as sm
import statsmodels.stats.api as sms

model = sm.OLS(y, X).fit()
bp_test = sms.het_breuschpagan(model.resid, model.model.exog)

print(f'BP Statistic: {bp_test[0]}')
print(f'p-value: {bp_test[1]}')

How to Interpret the Results

  • Reject H₀ (p < 0.05): Heteroskedasticity is present — consider robust standard errors or model transformations.
  • Fail to reject H₀ (p > 0.05): No evidence of heteroskedasticity — homoskedasticity assumption holds.

When Should You Use It?

  • When residual plots suggest increasing or decreasing spread.
  • In financial models (e.g., asset returns often exhibit heteroskedasticity).
  • In risk management models to test model robustness.
  • During model diagnostics for regulatory or audit review.

Breusch-Pagan vs. White Test

  • Breusch-Pagan: Use when you expect a linear change in variance.
  • White Test: Use when you're unsure and want to capture any type of heteroskedasticity, including non-linear effects.

Final Thoughts

The Breusch-Pagan Test reminds us that the story in the data isn't just about averages—it's also about volatility. Ignoring heteroskedasticity can lead to underestimating risk and overconfident predictions, especially in complex domains like finance, insurance, and econometrics.

"If the noise gets louder when stakes are higher, you might be missing the signal."


Let's Discuss: Have you encountered heteroskedasticity in real-world modeling? How do you adjust your models once detected? Drop your thoughts, tools, or experiences in the comments.

Originally published on LinkedIn.