Two-sample t-test (Welch and pooled)
Compares the means of two independent groups; Welch's version (the engine default) does not assume equal variances, the pooled version does.
- Mean, SD (n − 1) and size of group i.
- Difference stated by H₀ (usually 0).
- Welch–Satterthwaite degrees of freedom.
- Pooled standard deviation.
When to use
A quantitative outcome compared between two independent groups (different people/units in each group). Use Welch by default; the pooled test is only marginally more powerful when variances really are equal and can be badly wrong when they are not (especially with unequal group sizes).
Assumptions
- Independent observations within and between groups (random samples or random assignment).
- Each group roughly normal, or large enough samples for the CLT; watch for outliers.
- Pooled version only: equal population variances.
How to interpret
- The estimate is (first minus second); report it with its CI.
- A small p-value is evidence that the population means differ. Whether a difference is caused by the grouping depends on the design (random assignment) — not on the test.
- Effect size: Cohen's d with the pooled SD (the engine reports it for both versions).
Common mistakes
- Using the two-sample test on paired data (it ignores the pairing and usually loses a lot of power).
- Running a variance test first and switching between pooled and Welch based on it — just use Welch.
- Reading the CI for the difference as "the overlap of two separate CIs": overlapping individual CIs do not imply a non-significant difference.
Example
Group A: 23, 25, 28, 30, 26, 27 (mean 26.5, SD 2.43); group B: 20, 22, 24, 21, 25, 19, 23 (mean 22.0, SD 2.16). Welch: , , , 95% CI for : 1.64 to 7.36. Pooled: , df = 11, , CI 1.70 to 7.30. Cohen's .