Confidence intervals for a difference in means (Welch, pooled, paired)
Intervals for μ₁ − μ₂ from independent samples (Welch by default, pooled when variances are assumed equal) or for the mean difference of paired data.
- mean, SD () and size of sample
- Welch–Satterthwaite degrees of freedom (usually not a whole number)
- pooled standard deviation
- difference within pair
- mean and SD of the differences
- number of pairs
When to use
- Independent groups (two different sets of units): Welch. It is the engine's default because it stays valid when variances differ and loses almost nothing when they are equal.
- Pooled: only when equal variances are justified by design or prior knowledge.
- Paired (same units measured twice, or matched pairs): analyse the differences.
Assumptions
Random samples / random assignment; independence within (and, for two-sample, between) groups; approximately normal data or differences, or reasonably large samples.
How to interpret
The interval gives plausible values for the difference (group 1 − group 2). If it excludes 0, the matching two-sided test rejects "no difference" at that α. Judge the size: is the whole interval practically important?
Common mistakes
- Treating paired data as independent: the SE ignores the pairing and is usually far too large.
- Choosing pooled vs Welch after looking at which gives the smaller p-value.
- Concluding "no difference" because two separate intervals overlap.
Example
Group A: 34, 29, 41, 38, 30, 36 (, ); group B: 27, 31, 25, 29, 24, 28, 26 (, ). Welch 95% interval: with ; pooled: with df 11. Paired example: before 142, 150, 138, 147, 155, 141 and after 136, 146, 135, 140, 150, 139; , , 95% interval .