The independent samples t-test compares the means of two separate groups. It asks: is the observed difference larger than chance alone would usually produce?
Why it matters
It is one of the most common tests for comparing treatments, programmes or groups.
Key ideas
- Outcome: numeric (continuous)
- Groups: exactly two, made of different people
- t = mean difference ÷ standard error
- p-value = how surprising a difference this big would be if the true difference were zero
- Report mean difference, 95% CI and effect size (Cohen's d)
- Welch's version does not assume equal variances
Real-life research example
Systolic BP: diet group (n = 30) mean 128, control group (n = 30) mean 136. Is an 8 mmHg difference real or chance?
When to use
- Numeric outcome and two independent groups
- Roughly normal data in each group, or n ≥ 30 per group
When NOT to use
- Same people measured twice → paired t-test
- Strong skew or tiny n → Mann–Whitney U
- Three or more groups → ANOVA
Mini example
Group A: 120, 125, 130, 128, 122 Group B: 135, 140, 138, 132, 141 Paste both into the calculator below.
Quick takeaway
A small p-value says the difference is unlikely to be pure chance — not that it is important. Always read the effect size and the CI.
Try it yourself
Run the calculator with the example data, then change a few values. How do t, p and Cohen's d respond? Decide: is the difference practically meaningful?
Moving the groups further apart (or reducing the spread) raises |t| and lowers p. Statistical significance is not practical importance — judge the size of the difference and its CI against what matters clinically.