The Breusch-Pagan test is a statistical test used to detect the presence of heteroskedasticity in regression models. Heteroskedasticity refers to the situation where the variability of the errors (residuals) in a regression model is not constant across all levels of the independent variables.
‘statsmodels’ library can be used to perform The Breusch-pagan test for heteroscedasticity in pyhton. This test to ensure the validity of regression assumptions, improve model accuracy, and enable robust statistical inferences.
H0:The residuals are uniformly scattered. (No heteroskedasticity)
HA:The residuals are not uniformly scattered. (Heteroskedasticity detected), If the P-value is less than 0.05 we reject the null hypothesis otherwise we fail to reject the null hypothesis in general.