BIOSTATISTICS AND DATA

What Is a T-Test?

Guide · 2 min read · Last updated 2026-10-31

A t-test compares means: it asks whether an observed difference between a mean and a reference value, or between two means, is larger than would be expected from sampling variation alone, assuming the data meet certain conditions.

Types

  • One-sample t-test: compares a sample mean with a known or hypothesised value.
  • Independent (two-sample) t-test: compares means of two separate groups. Welch's version does not assume equal variances and is often preferred.
  • Paired t-test: compares two measurements on the same people (before and after) or matched pairs, analysing the differences.

Assumptions

  1. The outcome is numerical (continuous).
  2. Observations are independent (except for pairing in the paired test).
  3. The data (or, for paired tests, the differences) are approximately normally distributed, particularly important with small samples; with larger samples the test is more robust.
  4. For the classic independent test, similar variances in the two groups.

If assumptions are doubtful, consider a nonparametric alternative (see Parametric vs Nonparametric Tests).

How to report

Give the means (and SDs) for each group, the mean difference with a 95% confidence interval, the test used and the exact p-value. Example form: "Mean systolic blood pressure was 128 mm Hg (SD 12) in group A and 134 mm Hg (SD 13) in group B; mean difference −6 mm Hg (95% CI −10 to −2), Welch t-test p = 0.004."

Illustrative example

Invented for teaching. Twenty patients have their blood pressure measured before and after a 12-week programme. Because the same patients are measured twice, a paired t-test is used on the 20 differences. The mean change is −7 mm Hg (95% CI −11 to −3).

Common pitfalls

  • Using an independent test on paired data (or the reverse).
  • Running multiple t-tests on several groups instead of an appropriate multi-group method.
  • Ignoring outliers or clear skew in small samples.

Key takeaways

  • Choose the type by study design (one, two or paired groups).
  • Report the difference with a confidence interval, not only the p-value.

References and further reading

  1. Altman DG, Bland JM. Standard deviations and standard errors. BMJ. 2005;331:903. doi:10.1136/bmj.331.7521.903
  2. Hulley SB, Cummings SR, Browner WS, Grady D, Newman TB. Designing Clinical Research. 4th ed. Lippincott Williams & Wilkins; 2013. Link
  3. Greenland S, Senn SJ, Rothman KJ, et al. Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations. Eur J Epidemiol. 2016;31:337-350. doi:10.1007/s10654-016-0149-3

Related reading

This page is general educational information about research methods. It is not medical, legal or regulatory advice; follow your institution's ethics board and your target journal's instructions.