Solved – Test that two normal distributions have same standard deviation

distributionshypothesis testingnormal distributionstandard deviationstatistical significance

I have two normal distributions, and I want to test whether they have the same standard deviation, I really don't care about the mean.

My idea is: de-mean both of them and then use Kolmogorov-Smirnov to test if the distributions are different, if they are then standard deviations also should be different.

I am wondering if I am missing anything, and if there is a better way to do this.

Best Answer

1) The approach you suggest won't have the null distribution of an actual Kolmogorov-Smirnov-statistic. You could actually do that procedure to compute a test statistic, but to find the p-value you'd have to find the distribution of the resulting test statistic (probably by simulation), or perhaps perform a permutation test.

2) If you know they're normal, the F-test for equality of variances (as mark999 suggested in comments) is probably the way to go, since it will be the likelihood ratio test. If the distributions might be non-normal, that F-test can be badly affected by that assumption failure, and you might instead look at Levene or Brown-Forsythe (also mentioned at the link), or some of the other relatively less sensitive-to-assumptions tests for equality of variance.

(If the sample sizes are equal the level of the F-test is not as badly affected, though the power might still be relatively poor.)

An alternative might be to keep the F-statistic but use it as the basis of a resampling based approach such as a bootstrap or permutation test. But if you're contemplating such a route, it might be wise (because of potential effects of outliers on power) to base it off one of the more robust measures of scale - and if you have near-normal data, you'd probably want to choose one with reasonably good efficiency at the normal (three mentioned at the link are $Q_n$, $S_n$ and the biweight midvariance) .

You might like to search CrossValidated on some of the terms in your question and the responses here - you'll be able to find some additional discussion and advice.

For example one such search turns up this, this, and this, the last of which includes this answer by Alan Forsythe.

Allingham and Rayner[1] suggest a test based off a Wald test for the differences (rather than the ratio) which has much better level-robustness than the F-test on the heavier-tailed-than-normal distributions considered (often almost as good as the Levene on level, but erring on the conservative side while Levene tends to exceed the level) with good power at the normal (slightly beating the Levene at larger sample sizes, not generally as good at very small sample sizes). If both sample sizes are above 25 or so, it's worth considering this test.

Additional searches here will turn up one or two other possibilities besides the ones I mentioned.

[1]: Allingham, D. & J.C.W. Rayner (2012),
"Testing Equality of Variances for Multiple Univariate Normal Populations",
Journal of Statistical Theory and Practice, 6:3, 524-535
(there's a 2011 conference paper version here)

Related Question