What Is a T-Test and When to Use It? A Plain-Language Guide for Researchers

A t-test is a statistical test that tells you whether the difference between two averages is big enough to be real, or whether it's just random chance — and you use it when you're comparing the means of two groups (or one group measured twice) on a numeric outcome. If you've ever stared at two columns of numbers wondering "are these actually different, or am I imagining it?", the t-test is almost certainly the tool you need. The problem most people hit isn't understanding what it does — it's knowing which of the three t-tests applies to their data and whether they've met the assumptions.

Key Takeaways

  • A t-test compares two means to see if their difference is statistically significant (unlikely to be due to chance).
  • There are three types: one-sample (one group vs. a known value), independent-samples (two separate groups), and paired-samples (the same group measured twice).
  • Use a t-test when your outcome is numeric (like test scores or reaction times) and you're comparing exactly two conditions.
  • A result is "significant" when p < .05, but you should always report an effect size (Cohen's d) to show how big the difference is.
  • If you have more than two groups, use ANOVA instead; if your data is badly skewed or ordinal, use a Mann-Whitney U test.

What Does a T-Test Actually Measure?

A t-test measures whether the gap between two averages is large relative to the spread (variability) in your data. The intuition: a 5-point difference in exam scores means a lot more if everyone scored within a point or two of each other than if scores were bouncing all over a 40-point range.

The test boils this down to a single number, the t-statistic, which is essentially the size of the difference divided by the noise. A big t-statistic means the difference stands out against the background variability. The test then converts that into a p-value — the probability you'd see a difference this large if there were truly no difference between the groups. A small p-value (conventionally below .05) means "chance alone is an unlikely explanation."

When Should I Use a T-Test?

Use a t-test when all three of these are true:

  1. Your outcome variable is continuous (numeric) — things like weight, score, temperature, income, or reaction time.
  2. You're comparing two means — exactly two groups, or one group measured at two time points.
  3. Your data is roughly normally distributed within each group (especially important with small samples under ~30).

If you're comparing three or more groups, you've outgrown the t-test and need a one-way ANOVA. If your data is ordinal (like a Likert item) or heavily skewed, a non-parametric alternative like the Mann-Whitney U or Wilcoxon signed-rank test is the safer choice — if you're unsure, see our guide on Mann-Whitney vs the t-test.

What Are the Three Types of T-Tests?

Picking the wrong type is the single most common t-test mistake. Here's how to tell them apart.

T-test type Use it when… Example research question
One-sample You compare one group's mean to a known or hypothesised value "Is our clinic's average wait time different from the national average of 20 minutes?"
Independent-samples You compare two separate, unrelated groups "Do students taught online score differently from students taught in person?"
Paired-samples You compare the same people (or matched pairs) at two time points "Did anxiety scores change from before to after therapy?"

The deciding question is simple: are your two sets of numbers from the same people or different people? Same people measured twice → paired. Different people → independent. Comparing to a fixed benchmark → one-sample.

A Worked Example: Independent-Samples T-Test

Imagine you're testing whether a new study technique improves exam performance. You randomly assign 40 students to two groups of 20.

  • Group A (new technique): mean = 78.5, SD = 8.2
  • Group B (standard study): mean = 72.1, SD = 9.1

You run an independent-samples t-test and get:

t(38) = 2.34, p = .025, d = 0.74

Here's what every piece means:

  • t(38) = 2.34 — the t-statistic is 2.34, with 38 degrees of freedom (for an independent t-test, that's your total sample minus 2: 40 − 2 = 38).
  • p = .025 — there's a 2.5% probability of seeing a difference this large if the techniques were truly equal. Because .025 is below .05, the difference is statistically significant.
  • d = 0.74 — Cohen's d, the effect size. A value around 0.2 is small, 0.5 is medium, and 0.8 is large, so 0.74 is a medium-to-large effect. This tells you the difference is not just real, but meaningful.

The practical takeaway: the new technique produced about a 6.4-point boost, and that difference is unlikely to be a fluke.

What Counts as a "Significant" Result?

A t-test result is conventionally called statistically significant when p < .05, meaning there's less than a 5% chance the observed difference arose from random noise. But significance alone isn't the whole story. With a very large sample, even a trivial difference can be "significant," which is why APA 7 expects you to report an effect size (Cohen's d for t-tests) alongside the p-value. A tiny p-value with a tiny effect size means the difference is real but probably not important.

How Do I Report a T-Test in APA 7 Format?

APA 7 has a strict format. For an independent-samples t-test, report it like this:

An independent-samples t-test showed that students using the new technique (M = 78.5, SD = 8.2) scored significantly higher than those using standard study methods (M = 72.1, SD = 9.1), t(38) = 2.34, p = .025, d = 0.74, 95% CI [0.86, 11.94].

Notice the APA conventions: the test statistic t and the p are italicised, there's no leading zero before the p-value (.025, not 0.025), degrees of freedom sit in parentheses, and you include means, standard deviations, the effect size, and a confidence interval for the mean difference.

How StatRyx Runs Your T-Test For You

Getting the notation right — and picking the correct type of t-test in the first place — is exactly where non-statisticians get stuck. StatRyx is an AI-powered statistical analysis tool that replaces manual SPSS workflows with automated, APA 7-formatted reporting. You upload your data, and StatRyx checks your assumptions (normality, equal variances), chooses between an independent, paired, or Welch's t-test, runs it, and hands you a copy-paste-ready APA write-up with the effect size and confidence interval already in place.

Unlike SPSS — which costs roughly $99+ per month for individuals and still leaves you formatting the output by hand — StatRyx does the interpretation and the write-up. If your data turns out to violate assumptions, it'll flag the problem and point you to the right non-parametric alternative instead of silently giving you a misleading result.

Stop calculating this by hand — run it free in StatRyx → Try StatRyx

Frequently Asked Questions

What is the difference between a t-test and an ANOVA?

A t-test compares the means of exactly two groups, while an ANOVA (analysis of variance) compares the means of three or more groups at once. If you run multiple t-tests across several groups, you inflate your chance of a false positive, which is precisely the problem ANOVA was designed to avoid. Use a t-test for two groups and a one-way ANOVA for three or more.

Can I use a t-test with a small sample size

Stop calculating this by hand. Upload your dataset and StatRyx's AI runs the correct test and returns copy-paste-ready APA 7 output in seconds — no SPSS license, no syntax.

Run your data through StatRyx free →
← All posts