How to Compare Two Means When the Groups Have Different Standard Deviations

The standard unpaired t test assumes equal variances in both groups. When standard deviations differ substantially, you have several valid options. The Welch t test is almost always the right answer.

Why This Matters

The standard two-sample t test pools the variance from both groups. This pooling is only valid when the population variances are equal. When the variances differ, the pooled variance estimate is biased and the computed t statistic no longer follows the t distribution accurately, leading to incorrect P values.

The variance assumption is violated whenever the SDs of the two groups are substantially different. There is no precise cutoff, but an SD ratio greater than 2:1 is often cited as a practical threshold worth investigating.

The F Test for Equal Variances

The F test (also called Levene's test for equality of variances in some software) compares the two sample variances. In Prism, the F test is computed automatically when you run an unpaired t test, and the result appears alongside the t test output.

Caution: The F test has low statistical power with small samples. It may fail to detect real variance differences when N is small (the most common situation in biological research). Do not rely on a non-significant F test result to conclude that variances are equal.

Five Approaches

1

Just use the standard t test

The standard unpaired t test is fairly robust against unequal variances when sample sizes are equal. If your N is equal in both groups, the t test will usually give approximately correct P values even with moderately unequal SDs.

2

Use the Welch t test (recommended)

The Welch t test does not assume equal variances. It adjusts the degrees of freedom (using the Welch-Satterthwaite equation) to account for the unequal variances. GraphPad Prism performs the Welch t test automatically when you check the option. This is the safest default when SDs are visibly different.

3

Transform the data

A logarithmic transformation often equalizes variances when the SD is proportional to the mean (common in biological assays). After log-transforming, apply the standard t test to the transformed values. The result is equivalent to testing the ratio of geometric means.

4

Use a nonparametric test

The Mann-Whitney U test does not assume equal variances. However, it tests the null hypothesis that the distributions are identical, not just that the means are equal. If the variances are unequal, a significant Mann-Whitney result may reflect a difference in spread rather than location.

5

Use the F test first to decide

The F test compares the two SDs. If the P value from the F test is not significant (F test P > 0.05), use the standard t test. If it is significant, switch to the Welch t test. Warning: this sequential approach inflates the type I error rate, and the F test has low power. Most statisticians now recommend using the Welch t test by default rather than pre-testing with F.

Prism Recommendation

GraphPad Prism recommends using the Welch t test by default when comparing two group means, regardless of whether the variances appear equal. The Welch test loses very little power when variances are truly equal, but it gains robustness when they are not. Enable it in the t test dialog under "Assume equal or unequal variances."

References

  • Welch BL. The generalization of 'Student's' problem when several different population variances are involved. Biometrika 34(1–2): 28–35 (1947).
  • Ruxton GD. The unequal variance t-test is an underused alternative to Student's t-test and the Mann-Whitney U test. Behavioral Ecology 17(4): 688–690 (2006).

Related Resources