This test is used in linear regressions to test for homoscedasticity of the error term.

For the regression verify homoscedastic using the Breusch-Pagan test.

Regress the squared back to the X:

and calculate the test statistics: .

This test statistics is Χ2 with (k-1) d.f. distributed under the null hypothesis of homoscedasticity.