When should I use a t-test?

One-sample, paired, and unpaired t-tests, and why Welch's is the safer default

TL;DR

Use a t-test to compare means when your outcome is continuous and you have one or two groups. One-sample: one group vs. a known value. Unpaired: two independent groups. Paired: the same subjects measured twice. For two groups, Welch's t-test (unequal variances) is the safer default over the classic Student's t-test.

The three flavors

  • One-sample t-test: compares one group's mean to a fixed reference value. Example: is the mean pH of your buffer different from 7.4?
  • Unpaired (two-sample) t-test: compares the means of two independent groups. Example: tumor volume in treated vs. untreated mice.
  • Paired t-test: compares two measurements on the same subjects (or matched pairs). It analyzes the differences within each pair, which removes between-subject variability and is more powerful. Example: expression in each patient before vs. after treatment.

Student's vs. Welch's

The classic Student's t-test assumes the two groups have equal variances. Welch's t-test does not, and it performs just as well when variances are equal. Most statisticians now recommend defaulting to Welch's for two independent groups and skipping the preliminary equal-variance test.

For two independent groups, default to Welch's t-test. It doesn't assume equal variances, performs just as well when they happen to be equal, and saves you a preliminary variance test.

Assumptions

  1. Continuous outcome. Don't use a t-test on proportions or counts.
  2. Approximate normality of the data (or of the paired differences). t-tests are fairly robust to mild departures, especially with larger n, but heavy skew or strong outliers are a problem.
  3. Independence of observations (the pairing structure aside). Must ensure each measurement is sampled independently.

If normality clearly fails with a small sample, use the non-parametric counterpart: Mann–Whitney (unpaired) or Wilcoxon signed-rank (paired).

Always report the mean difference and its 95% CI alongside the p-value → effect size and confidence intervals.

A biology example

You measure a biomarker in 12 patients before and after a drug. Because each patient is their own control, use a paired t-test on the 12 within-patient differences. If you mistakenly ran an unpaired test, the large patient-to-patient baseline differences would swamp the treatment effect and you'd likely miss a real change.

Common mistakes

  • Running many pairwise t-tests across 3+ groups. Use ANOVA + post-hoc correction instead.
  • Using an unpaired test on paired data (or vice versa). Match the test to the design.
  • Applying a t-test to a proportion or count (e.g., % survival). That's categorical data.
  • Ignoring outliers or obvious non-normality in small samples.

ANOVA · Non-parametric tests · Checking assumptions

Ready to run this analysis on your own data?