PickMyTest

Levene's Test

Levene's test assesses equality of variances (homoscedasticity) across two or more groups. It is more robust to departures from normality than Bartlett's test.

Levene's Test#

Levene's test is an inferential statistical procedure for assessing the homogeneity of variances (homoscedasticity) across two or more groups. It tests whether the variances in different groups are equal β€” a key assumption of many parametric procedures such as the independent samples t-test or one-way ANOVA.

Unlike the classical Bartlett's test, Levene's test is considerably more robust to departures from normality, which is why it is preferred in practice. The variant proposed by Brown and Forsythe (1974), which uses the median instead of the mean, further improves robustness.

When to Use#

  • Before running an independent samples t-test to verify the equal variances assumption
  • Before an ANOVA to check the homogeneity of variances assumption
  • When the data may not be normally distributed (more robust than Bartlett's test)
  • When comparing variability across experimental groups
  • As part of a systematic assumption check before parametric analyses

Assumptions#

  • Independent observations β€” no dependencies between or within groups
  • Continuous dependent variable at least at interval scale level
  • Random samples from the respective populations

Formula#

Levene's test computes an F statistic based on the absolute deviations of observations from their respective group center:

F=(Nβˆ’k)(kβˆ’1)β‹…βˆ‘j=1knj(ZΛ‰jβ‹…βˆ’ZΛ‰β‹…β‹…)2βˆ‘j=1kβˆ‘i=1nj(Zijβˆ’ZΛ‰jβ‹…)2F = \frac{(N - k)}{(k - 1)} \cdot \frac{\sum_{j=1}^{k} n_j (\bar{Z}_{j\cdot} - \bar{Z}_{\cdot\cdot})^2}{\sum_{j=1}^{k} \sum_{i=1}^{n_j} (Z_{ij} - \bar{Z}_{j\cdot})^2}

Where:

  • kk is the number of groups
  • NN is the total sample size
  • njn_j is the sample size of the jj-th group
  • Zij=∣xijβˆ’xΛ‰j∣Z_{ij} = |x_{ij} - \bar{x}_j| is the absolute deviation from the group mean (classical Levene's test)
  • ZΛ‰jβ‹…\bar{Z}_{j\cdot} is the mean of the ZijZ_{ij} in group jj
  • ZΛ‰β‹…β‹…\bar{Z}_{\cdot\cdot} is the overall mean of all ZijZ_{ij}

Brown-Forsythe variant: Uses the median instead of the mean, i.e., Zij=∣xijβˆ’x~j∣Z_{ij} = |x_{ij} - \tilde{x}_j|. This variant is more robust with skewed distributions.

Hypotheses#

  • Hβ‚€: The variances are equal across all groups (Οƒ12=Οƒ22=…=Οƒk2\sigma_1^2 = \sigma_2^2 = \ldots = \sigma_k^2)
  • H₁: At least two groups differ in their variance

Under Hβ‚€, the test statistic follows an F distribution with kβˆ’1k - 1 and Nβˆ’kN - k degrees of freedom.

Example#

Practical Example: Variance Check for Three Teaching Methods

An educational researcher wants to use a one-way ANOVA to investigate whether exam performance differs among students under three different teaching methods (lecture, seminar, e-learning). Before running the ANOVA, he needs to check the homogeneity of variances.

Each group contains 25 students. He performs Levene's test and obtains F(2, 72) = 1.34 with p = 0.27. Since p > 0.05, the null hypothesis of equal variances cannot be rejected. The homoscedasticity assumption is met, and the standard ANOVA may be applied.

Had the test yielded a significant result, the Welch ANOVA would have been used as a robust alternative.

Effect Size#

There is no standard effect size measure for Levene's test. In practice, the F statistic and p-value are reported. Additionally, the variance ratio can serve as a descriptive measure:

Variance Ratio=smax⁑2smin⁑2\text{Variance Ratio} = \frac{s^2_{\max}}{s^2_{\min}}
Variance RatioInterpretation
< 2:1Variances approximately equal β€” no concern
2:1 – 4:1Moderate differences β€” caution with unequal group sizes
> 4:1Large differences β€” robust procedures recommended

Note: As with all assumption tests, large samples make the test very sensitive, while small samples may miss meaningful violations. Inspecting the variance ratio is therefore a useful complement.

Further Reading

  • Levene, H. (1960). Robust tests for equality of variances. In I. Olkin (Ed.), Contributions to Probability and Statistics (pp. 278–292). Stanford University Press.
  • Brown, M. B., & Forsythe, A. B. (1974). Robust tests for the equality of variances. Journal of the American Statistical Association, 69(346), 364–367.
  • Glass, G. V. (1966). Testing homogeneity of variances. American Educational Research Journal, 3(3), 187–190.