I want to use the Levene test to quantify the homo/heterogeneity of the variances of two samples. The density plot looks like this: Density plot of samples

But the Levene test for the data [hov(average~window,data=df)] yields 1.531-e13, i.e. the probability that the variances are not equal is very high.

But given the density plot, is this result reasonable or have I used the function incorrectly? To me the samples look identical, thus the variance should not be so different.

  • $\begingroup$ What's the sample size? What are the actual variances? $\endgroup$ Commented Apr 24, 2014 at 20:40
  • $\begingroup$ Of what is this the density plot? What are the "windows" and what does "V5" mean? What are your group sizes? $\endgroup$
    – whuber
    Commented Apr 24, 2014 at 20:41
  • 2
    $\begingroup$ (1) NB the p-value is NOT "the probability that the variances are not equal". This is a serious mistake. $\quad$ (2) What R package are you using? It's not in base R, and we don't necessarily know which of many thousands of packages you're using. Is this the hov in HH? If so, you're doing Browne-Forsythe, not Levene (3) If the sample size is large, then hypothesis tests can pick up small, even trivial differences. If that concerns you, it implies that you shouldn't have been doing hypothesis tests in the first place, because you're interested in a different question to the one they answer $\endgroup$
    – Glen_b
    Commented Apr 24, 2014 at 22:48
  • $\begingroup$ Right, I was using Browne-Forsythe from the HH package. I mixed it up. The sample size is around 23300 samples for each group. That's the reason for the p-value. Thanks for reminding me. $\endgroup$
    – Andreas
    Commented Apr 25, 2014 at 14:49
  • $\begingroup$ Regarding your comment (3). I don't fully understand. Levene or Browne-Forsyth test for homoscedasticity. And I'm interested in the spread of the variance of both samples. $\endgroup$
    – Andreas
    Commented Apr 25, 2014 at 14:53

1 Answer 1


Here's some data that looks vaguely something like yours:



    hov: Brown-Forsyth

data:  values
F = 54.5708, df:ind = 1, df:Residuals = 31998, p-value = 1.536e-13
alternative hypothesis: variances are not identical

If you have lots of points, it can easily happen.

  • $\begingroup$ Yes, sample size is around 23.300 per group. Should I sample from both distributions and then use the BF test (as the data doesn't follow a normal distribution)? $\endgroup$
    – Andreas
    Commented Apr 25, 2014 at 14:54
  • $\begingroup$ Why would you sample from them? What purpose does it serve? $\endgroup$
    – Glen_b
    Commented Apr 25, 2014 at 14:57
  • $\begingroup$ If I take 46.000 samples then the tiniest effect will be significant. I thought if I sampled only a few hundreds from both populations, then I could check for the variance homo/heterogeneity correctly. $\endgroup$
    – Andreas
    Commented Apr 26, 2014 at 10:30
  • $\begingroup$ How is increasing the chance of failing to pick up a difference doing it "correctly"? If you think that the behavior of a significance test in a large sample doesn't have desirable behavior, it's a clear signal that your actual question of interest isn't answered by a hypothesis test. $\endgroup$
    – Glen_b
    Commented Apr 26, 2014 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.