statforclinicians

Welch's t-test

Compares the mean of a measurement between two independent groups, without assuming both groups have the same spread (equal variances). It gives practically the same answer as the classic t-test when the spreads are equal.

Statistically reviewed by Daniel Wolff on 5 November 2026.

Clinical example

Whether mean hemoglobin at admission differs between patients with and without heart failure. One measurement per patient, two separate groups of patients, and no baseline value to adjust for.

When to use it

  • The outcome is a measurement on a continuous scale.
  • You compare exactly two groups, and each patient is in only one of them.
  • There is no baseline value to adjust for, or you only need a simple comparison. In a trial with a baseline measurement, ANCOVA adjusting for the baseline is preferred.

Assumptions to check

Independent observations

One value per patient, and the two groups do not overlap: no patient is in both. Repeated measurements or clustered patients need a mixed model.

The mean difference is roughly normal

Look at a histogram per group. With moderate sample sizes, mild skew is usually acceptable. With strong skew you need much larger groups, or a different approach. Skew partly cancels when the groups are similar in size and shape, so this test is more robust than the one-sample t-test. It does not cancel when the groups differ a lot in size and are skewed differently. Outliers can still drive the means.

Equal variances not needed

That's the point of Welch's version. Don't run a variance test (Levene's) beforehand to choose between the classic and Welch's version: like a normality test, it depends on the sample size, and testing first and then choosing distorts the error rates (Delacre et al. 2017).

Enough patients to estimate each spread

With very small groups the SDs are poorly estimated, Welch's degrees of freedom become small and the CI wide. That is honest: the result is imprecise.

What to report

  • Mean with SD, and the number of patients actually analyzed, per group
  • The mean difference with 95% CI, and the direction (which group minus which). The CI uses Welch's (Satterthwaite) degrees of freedom
  • The t statistic, Welch's degrees of freedom (usually not a whole number) and the exact p-value, not just "p < 0.05"
  • That Welch's version was used, and that the test was two-sided

Common mistakes

Paired data need a paired test

Measurements in the same patient are related. An unpaired test ignores that and loses power, or gives the wrong answer.

Don't test baseline differences in an RCT

With randomization, any baseline difference is chance by definition. Choose adjustment variables in advance, based on how strongly they predict the outcome.

Reading the wrong row in SPSS

SPSS prints two rows: Equal variances assumed (the classic Student's t-test) and Equal variances not assumed (Welch's). Welch's result is the second row. Reporting the first while believing it is Welch's is the most common error with this test.

Choosing the row by Levene's test

Running Levene's test first and choosing the row from its p-value. Always read the Welch row.

Ignoring the baseline in a trial

If a baseline value was measured, ANCOVA adjusting for it is preferred, and it is more powerful than comparing the follow-up values.

Non-significant is not 'the same'

Reading a non-significant result as the groups being the same. That needs an equivalence approach, or at least a look at the width of the CI.

Mann-Whitney is not a fix for unequal spreads

Switching to the Mann-Whitney U test because the spreads differ. It is not robust to unequal spreads either, and it changes the question from means to whether values tend to be higher.

Alternatives

If your situation is…Use
Strongly skewed, always-positive data and the mean matters (costs, length of stay): the log transform gives a ratio of geometric means. A bootstrap CI for the mean difference is another optionUnpaired t-test on log-transformed data
Strongly skewed data, small groups. This changes the question from means to whether values in one group tend to be higher, and it is not robust to unequal spreadsMann-Whitney U test (Wilcoxon rank-sum test)
Same patients measured twicePaired t-test
Baseline value measured tooANCOVA (adjusting for baseline)
Three or more groupsOne-way ANOVA
Yes/no outcomeChi-square test
You need to adjust for confoundersLinear regression
Patients are clusteredLinear mixed model

In your software

R
# R (Welch is the default)
d$hf <- factor(d$hf, levels = c("no", "yes"))   # exactly two levels; the order sets the direction
res <- t.test(hb ~ hf, data = d)
res   # the CI is for the mean in "no" minus the mean in "yes"; df is not a whole number (Welch)
sum(complete.cases(d$hb, d$hf))   # patients used: rows with a missing value are dropped silently
SPSS
* Read the row Equal variances not assumed (Welch's t-test). Ignore Levene's test.
* GROUPS=hf(1 2) needs the groups coded 1 and 2. The difference is group 1 minus group 2.
T-TEST GROUPS=hf(1 2)
  /VARIABLES=hb
  /CRITERIA=CI(.95).

Sources

An interval without assuming normality

For skewed data, when the mean difference itself is what you need, a bootstrap confidence interval for the mean difference assumes less than the t-test. It does not rescue very small groups.