t-Test Explained: How to Make, Read and Report It

By Dr. Faheem Afzal Shah, Founder, StatFAS.com · Tool: t-Test Calculator

A t-test compares means. It asks whether the difference between a sample mean and a reference value, or between two means, is large relative to the uncertainty in that difference. This overview explains which of the three main t-tests to use, how the calculation works, and how to report the result.

Which t-test do I need?

DesignTestStatistic
One sample vs a known value μ0One-samplet = (x̄ − μ0) / (s/√n), df = n − 1
Two independent groupsStudent's or Welch'st = (x̄1 − x̄2) / SE
Two related measurementsPairedt = d̄ / (sd/√n), df = n − 1

Student's test pools the variances (df = n1 + n2 − 2). Welch's test does not assume equal variances and adjusts the degrees of freedom (Welch, 1947). Delacre et al. (2017) argue that Welch's test is a sensible default for independent groups, because it performs well when variances or group sizes differ and loses little when they are equal.

Assumptions

Independent observations (or independent pairs), a continuous outcome, and approximately normal sampling distribution of the mean (or differences, for paired data). With moderate or large samples, the test is fairly robust to mild non-normality; with very small samples, strong skew or outliers, consider a rank-based alternative such as Mann-Whitney U.

Original example (illustrative)

Two study-skills workshops are compared on a test score (n = 5 per group). Workshop A: 5, 7, 6, 8, 9. Workshop B: 9, 11, 10, 12, 13.

Means are 7 and 11. Sums of squared deviations are both 10, so each variance is 10/4 = 2.5 and the standard deviations are 1.58. Because the variances and sizes are equal, Student's and Welch's tests coincide: SE = √(2.5 × (1/5 + 1/5)) = 1. Then t(8) = (7 − 11)/1 = −4.00, p ≈ .004 (two-sided). The 95% confidence interval for the mean difference is −4 ± 2.306 × 1 = [−6.31, −1.69]. Cohen's d = 4/1.58 = 2.53; with the small-sample correction J = 1 − 3/(4 × 8 − 1) = .903, Hedges' g = 2.28.

The interval shows how large the difference plausibly is. The huge effect size is a feature of these invented numbers; real effects of this size are rare, and with n = 5 per group the estimate is imprecise.

How to make it in StatFAS

Open the t-Test Calculator. Arrange data in columns, one per group (independent), two columns per pair (paired), or a single column (one-sample). StatFAS has separate posts for one-sample, independent, Welch and paired t-tests; link to them here after verifying their URLs.

APA 7 reporting

Workshop B scores (M = 11.00, SD = 1.58) were significantly higher than Workshop A scores (M = 7.00, SD = 1.58), t(8) = −4.00, p = .004, Hedges' g = 2.28, 95% CI of the mean difference [−6.31, −1.69].

Common mistakes

Testing equal variances first and then switching tests (which distorts error rates), using independent tests for paired data, running many t-tests instead of ANOVA for three or more groups, treating "not significant" as "no difference", and reporting only p. For three or more groups see the ANOVA calculator.

Conclusion

Pick the t-test from the design, prefer Welch for independent groups, and always report the mean difference with its interval and an effect size.

Screenshots to supply (genuine captures only):
1. statfas-t-test-interface.png, alt: "StatFAS t-Test Calculator interface"
2. statfas-t-test-example-data.png, alt: "Example data entered in the StatFAS t-Test Calculator"
3. statfas-t-test-settings.png, alt: "t-Test Calculator settings in StatFAS"
4. statfas-t-test-result.png, alt: "t-Test Calculator result generated in StatFAS"

References