- Introduced by
- B. L. Welch
- Year
- 1947
- Type
- Parametric mean comparison (unequal variances)
Scientific review pending.
What does it do?
Welch's t-test is a parametric hypothesis test that compares the means of two independent groups without assuming that their variances are equal. B. L. Welch introduced it in 1947 as a generalization of Student's two-sample test for groups whose spreads differ.
It is intended for a single continuous outcome measured in two independent groups.
The intuition behind the method
The classic two-sample t-test assumes both groups vary to the same degree and pools their variances into one estimate. When that assumption fails, because one group is much more variable than the other, the pooled estimate distorts the test. Welch's test avoids this by weighting each group's own variance separately and adjusting the degrees of freedom to match, so the comparison remains valid when the spreads differ.
History
B. L. Welch published the test in 1947 in Biometrika as a generalization of Student's problem to the case where the population variances differ. The underlying problem, comparing two means when the population variances are unknown and unequal, is known as the Behrens–Fisher problem. The test relies on the Welch–Satterthwaite approximation for the effective degrees of freedom. The original paper is the primary source for the method.
When to use it
This section awaits scientific review. Do not use its conditions as method selection rules.
Limitations and considerations
- It compares exactly two groups; for more groups, a method such as one-way ANOVA is needed, or Welch's ANOVA when the group variances are unequal.
- The Welch–Satterthwaite degrees of freedom are an approximation, so the p-value is approximate rather than exact.
- With small samples and clearly non-normal data it can be unreliable, and a nonparametric test is then preferable.
- It assumes that observations are independent within each group and between the groups; clustered, paired, or repeated measurements violate this assumption and call for a different model.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- It does not assume equal variances, so the comparison remains valid when the two groups have clearly different spread, a situation in which the pooled Student test is distorted.
- Its degrees of freedom adjust to the observed variances and sample sizes, so the reference distribution reflects the data at hand.
- With large samples it tolerates mild departures from normality, owing to the central limit theorem.
- Reporting the mean difference, its confidence interval, and Cohen's d alongside the p-value conveys the size of the difference as well as its statistical significance.
Applications
- Comparing a treatment and a control group when the treatment may change the variability of the outcome as well as its mean.
- Comparing two groups of clearly unequal size or unequal spread on a continuous measure.
- Reanalyzing a two-sample comparison after Levene's test flags unequal variances.
- A/B testing two variants on a continuous metric when one variant is much more variable than the other.
How it works
How it works
The null hypothesis states that the two population means are equal; the alternative states that they differ. The test decides between these two claims, just like the ordinary t-test.
Formula
H_0:\ \mu_1 = \mu_2 \quad H_1:\ \mu_1 \neq \mu_2
The Welch t statistic divides the difference between the two sample means by a standard error built from each group's own variance divided by its own sample size. The variances are not pooled. Because the two terms are not combined under a common variance, the degrees of freedom are not those of the pooled Student test. They are given by the Welch–Satterthwaite approximation ν, which combines the two variance-to-size ratios and the sample sizes. This value is usually not an integer. The statistic is compared against a Student t distribution with ν degrees of freedom.
Formula
t = \dfrac{\bar{x}_1 - \bar{x}_2}{\sqrt{\tfrac{s_1^2}{n_1} + \tfrac{s_2^2}{n_2}}}, \quad \nu = \dfrac{\left(\tfrac{s_1^2}{n_1} + \tfrac{s_2^2}{n_2}\right)^2}{\tfrac{(s_1^2/n_1)^2}{n_1-1} + \tfrac{(s_2^2/n_2)^2}{n_2-1}}If the two-tailed p-value is below 0.05, the null hypothesis is rejected and the means are judged to differ. The 95% confidence interval for the difference in means is (x̄1 − x̄2) ± t(ν) × SE, where SE is the denominator of the statistic above and t(ν) is the Student t critical value with ν degrees of freedom at the 1 − α/2 quantile, with α = 0.05. An interval that excludes zero agrees with rejecting H0 at this level. Outliers can distort both the means and the variances, and hence the statistic and the interval, so the data should be inspected for them before the test is run. The result is usually reported with the mean difference, its 95% confidence interval, and Cohen's d. The d formula on this page divides by a pooled standard deviation s_p, which is a pooled estimate even though the test itself does not pool variances, so state how the standardiser was computed whenever d is reported.
Formula
\text{reject } H_0 \text{ if } p < 0.05;\quad d = \dfrac{\bar{x}_1 - \bar{x}_2}{s_p}Frequently asked questions
When should I prefer Welch over the Student t-test?
Use Welch when the two groups may have unequal variances. It is a reasonable default for two independent groups and does not require a preliminary test of equal variances. A significant Levene's test (p < 0.05) or greatly different group sizes are further reasons to choose it. If the variances turn out to be equal, Welch remains valid and gives up little.
Why are the degrees of freedom not a whole number?
Welch's test uses the Welch–Satterthwaite approximation, which combines the two separate variances and sample sizes into an effective degrees-of-freedom value. This blended quantity is usually fractional, which is normal and expected for this test.
Does Welch's test still need normality?
Each group's values should be approximately normal, which can be checked with Shapiro-Wilk. However, with reasonably large samples the central limit theorem makes the test insensitive to mild departures from normality. With small samples and clear non-normality, switch to the Mann-Whitney U test.
What should I report alongside the result?
Report the mean difference, its 95% confidence interval, and Cohen's d as an effect size, in addition to the t value, the Welch degrees of freedom, and the p-value. State how the standard deviation in d was computed.
Related methods
Sources
Welch, B. L. (1947). The generalization of Student's problem when several different population variances are involved. Biometrika, 34(1/2), 28–35.
Open DOI referenceLearn R for Applied Statistics: With Data Visualizations, Regressions, and Statistics, p. 191