InfyCalculator
📊

Levene's Test Calculator

Levene’s test (or the Brown–Forsythe median version) for equal variances across two or more groups — W statistic, degrees of freedom, p-value and each group’s variance.

Groups
Center
Significance level
Loading calculator…

How it works

Zᵢⱼ = |Yᵢⱼ − centerᵢ| (median or mean of group i); W = [(N − k) ÷ (k − 1)] · Σnᵢ(Z̄ᵢ − Z̄)² ÷ ΣΣ(Zᵢⱼ − Z̄ᵢ)²; W ~ F(k − 1, N − k)

Levene’s test checks the equal-variance (homoscedasticity) assumption behind ANOVA and the pooled t-test. It runs a one-way ANOVA on the absolute deviations of each value from its group centre. The Brown–Forsythe version centres on the median and is the robust default in SciPy and in R’s car::leveneTest; the original Levene test centres on the mean and is more sensitive to non-normal data. A small p-value means the group variances are not equal.

Worked example

Three groups of six, centred on the median: W = 13.1594 with 2 and 15 df, p = 0.0005 — the second group is far more spread out, so the variances differ significantly.

Sources: NIST/SEMATECH e-Handbook — Levene test for equality of variances · SciPy — scipy.stats.levene

Frequently asked questions

Median or mean centre?

Use the median (Brown–Forsythe) unless your data are clearly normal; it keeps the false-positive rate close to α for skewed or heavy-tailed data.

What if Levene’s test is significant?

Use a method that does not assume equal variances: Welch’s t-test for two groups or Welch’s ANOVA (with Games–Howell post-hoc tests) for several.

Levene’s test or the F-test for variances?

The two-variance F-test is very sensitive to non-normality and only compares two groups. Levene’s test handles any number of groups and is far more robust.

Is a non-significant result proof of equal variances?

No — small samples have little power. Also compare the largest and smallest variance: a ratio under about 4 is usually tolerable for ANOVA with equal group sizes.

Related calculators

Educational tool: check the test’s assumptions (sample size, independence, distribution) before relying on a result for a real decision.