The t-test explained: when and how to use it
A t-test answers one question: is the difference between these means bigger than chance would produce? It works on a continuous outcome (test scores, blood pressure, reaction time) and returns a t-statistic and a p-value. The only real decision is which of the three t-tests matches how your data are structured.
The three types — pick by your design
| Type | Compares | Example |
|---|---|---|
| One-sample | One group’s mean vs a known value | Is our class’s mean score different from the national 70? |
| Independent samples | Means of two separate groups | Do treatment vs control groups differ? |
| Paired | Two measures on the same subjects | Before vs after, same people |
The paired test is the one people miss: if the same subjects are measured twice, a paired t-test is more powerful than treating the measurements as independent.
What the result tells you
The p-value says how surprising your difference would be if the true means were equal. But significance isn’t the whole story — always report the difference in means and a confidence interval, plus an effect size (Cohen’s d), so a reader sees how big the difference is, not just that it cleared p < 0.05.
Assumptions (and when to switch tests)
- Normality — the outcome roughly normal, especially for small samples.
- Independence — observations not clustered or repeated (unless paired).
- Equal variances — for the independent test; if not, use Welch’s t-test.
If normality is badly broken, switch to a non-parametric test (Mann–Whitney U for independent, Wilcoxon for paired).
t-test vs ANOVA
A t-test compares two means. With three or more groups, don’t run a pile of t-tests — that inflates your false-positive rate. Use ANOVA instead, which is the multi-group generalisation of the t-test.
Get the free Statistics toolkit
A reporting checklist, worked examples, and test-selection flowcharts from the Statistical Test Selection Workbook. We’ll email you the download link.
Frequently asked questions
What does a t-test do?
Compares means to ask whether a difference is bigger than sampling noise — on a continuous outcome, returning a t-statistic and p-value.
What are the three types?
One-sample (vs a fixed value), independent (two groups), and paired (same subjects measured twice).
t-test or ANOVA?
t-test for two means; ANOVA for three or more groups — running many t-tests inflates false positives.
What are the assumptions?
Approximate normality, independence, and (for the independent test) equal variances or Welch’s correction.