Equal variances: Levene and Brown-Forsythe

Analytika TeamLast reviewed 5 min read

Student’s t-test and the classic one-way ANOVA pool the groups’ variances into one estimate. That only makes sense if the groups really have similar spreads, an assumption called homogeneity of variance (or homoscedasticity).

Why it matters

If the variances differ, the pooled estimate is wrong for every group, and the test’s error rate drifts. The damage depends on group sizes:

  • Equal group sizes: Student’s t-test is fairly robust. The t statistic is even identical to Welch’s, and only the degrees of freedom differ.
  • Unequal group sizes: if the smaller group has the larger variance, false positives become more common than α says. If the larger group has the larger variance, the test becomes overly conservative and loses power.

Levene’s test and Brown-Forsythe

Both test H₀: all group variances are equal. They work by running an ANOVA on how far each value is from its group’s centre:

  • Levene’s test (original) measures distances from the group mean.
  • Brown-Forsythe measures distances from the group median, which makes it robust when the data are skewed. It’s often what software means by “Levene’s test based on the median”.

p < .05 suggests the variances differ. As with normality tests, these tests can miss real differences in small samples and flag trivial ones in large samples, so look at the SDs too. A common rule of thumb is to worry when the largest SD is more than about twice the smallest.

Two real examples

ComparisonGroup SDsBrown-ForsytheTest Analytika chooses
Iris petal length, setosa vs versicolor (50 each)0.17 vs 0.47F = 30.50, p < .001Welch’s t-test
Tooth growth, ascorbic acid vs orange juice (30 each)8.27 vs 6.61p = .275Student’s t-test

The iris SDs differ by almost a factor of three, a clear violation. The tooth-growth SDs are similar enough that equal variances are reasonable.

What to do when variances differ

Instead ofUse
Student’s t-testWelch’s t-test
One-way ANOVAWelch’s ANOVA, with Games-Howell post-hoc tests
Linear regression with fanning residualsRobust (heteroscedasticity-consistent) standard errors, or a transformation (see regression assumptions)

Many statisticians go further and recommend Welch’s t-test by default, because it loses almost nothing when variances are equal and protects you when they aren’t.

How Analytika handles it

Before choosing a group comparison, Analytika runs the Brown-Forsythe test at α = .05. If variances differ, it uses Welch’s t-test or Welch’s ANOVA, with Games-Howell for the follow-up comparisons. If you request Student’s t-test when the check has failed, it explains why it kept Welch’s.

Reporting

A Brown-Forsythe test indicated unequal variances, F(1, 98) = 30.50, p < .001, so Welch’s t-test was used.

More in Choosing a test

Try it with the free tools

Run this on your own data

Upload a dataset and ask your question in plain English. Analytika checks the assumptions, picks the test, runs it, and writes the results up in APA format.

Try it free