Welch's t-test
Compare a continuous outcome between exactly two independent groups without assuming equal variances.
Requirements
- continuous outcome
- one two-level group
- independent observations
Avoid when
- paired/repeated observations
- three or more groups
- strong ordinal/non-normal outcome with small n
Formula
Interpretation
Reports the mean difference, t statistic, p-value, and confidence interval.
Example use case
Compare mean blood pressure between two independent treatments with unequal variances.
Open example datasetsA worked example
Synthetic data, two independent groups, six observations each. Question: how much does the mean score differ? This is a read-only example, not a calculation on your data.
| Group | Scores | Mean |
|---|---|---|
| A | 10, 12, 11, 13, 12, 14 | 12 |
| B | 14, 15, 13, 16, 15, 17 | 15 |
B − A = 3.00 points; 95% confidence interval 1.18 to 4.82. Two-sided Welch t-test: t = 3.674, df = 10, p = 0.0043. All 12 observations are analyzed; none are missing or excluded.
Group B averages 3 points higher in this sample. The interval describes uncertainty in the population mean difference under the model assumptions, not the range of individual scores. The test does not establish causation or practical importance. With six observations per group, distributional assumptions deserve particular care. Verified with SciPy's Welch test; use this example as orientation, not a validation certificate.