What Is a T-Test? Independent, Paired, and One-Sample T-Tests
What Is a T-Test?
A t-test uses the t distribution to judge whether a difference in means is larger than chance would comfortably explain. With three or more groups, repeated t-tests accumulate error, so analysis of variance (ANOVA) is used instead.
What Types of T-Tests Are There?
There are three types, depending on what is compared and how the samples are structured.
| Type | What is compared | Example |
|---|---|---|
| One-sample t-test | One group mean vs. a reference value | Is our class average different from the national average |
| Independent samples t-test | Means of two separate groups | Treatment group vs. control group |
| Paired samples t-test | Pre and post means for the same cases | Before treatment vs. after treatment |
How Do You Run a T-Test?
Check the assumptions, run the test, then interpret the result.
Step 1: Check Assumptions
Confirm the normality of the dependent variable, and for independent samples check equality of variances with Levene's test. If normality is badly violated, consider a nonparametric test (Mann-Whitney U, Wilcoxon).
Step 2: Run the Test and Interpret
Compute the t statistic, degrees of freedom, and p-value. If p falls below the threshold (usually .05), the difference in means is interpreted as statistically significant.
Step 3: Report Effect Size
Significance alone says nothing about how large the difference is, so report an effect size such as Cohen's d alongside it.
What Are the Assumptions of a T-Test?
Normality must hold, and for independent samples so must equality of variances. When variances are unequal, use Welch's t-test, and when normality is badly violated, use a nonparametric alternative.
What If You Have Three or More Groups?
With three or more groups, do not repeat t-tests — use analysis of variance (ANOVA). Repeated t-tests inflate the Type I error rate, meaning you start calling differences significant when they are not.
Summary
A t-test tests a difference in means between two groups, or against a reference value. Check normality and equality of variances, and report the p-value together with an effect size. For three or more groups go to ANOVA, and to estimate effects on a continuous outcome go to regression analysis.