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

A t-test is a statistical test that checks whether the average of one group is meaningfully different from the average of another group, rather than just different by chance. If you've measured a number (like test scores, blood pressure, or reaction time) for two groups and you want to know "is this difference real?", the t-test is almost always your starting point. The frustrating part — remembering which of the three versions you need and formatting the result for your thesis — is where most people get stuck.

Key Takeaways

  • A t-test compares the means of up to two groups on a continuous (numeric) outcome and tells you whether the difference is statistically significant.
  • There are three types: one-sample (one group vs a known value), independent-samples (two separate groups), and paired-samples (the same people measured twice).
  • Use a t-test when your outcome is numeric, roughly normally distributed, and you have only two groups — for three or more groups, use ANOVA instead.
  • A result is "significant" when p < .05, which means there's less than a 5% chance you'd see this difference if the groups were truly identical.
  • Always report an effect size (Cohen's d) alongside the t and p values — significance alone doesn't tell you how big the difference is.

What does a t-test actually tell you?

A t-test answers one question: are these two averages far enough apart that the difference is unlikely to be a fluke? Imagine you give a new study technique to one group of students and a standard technique to another. The new-technique group averages 78%; the standard group averages 72%. That 6-point gap looks promising — but could it just be random luck of who ended up in which group?

The t-test weighs the size of the difference between the two averages against the amount of natural variation in your data. A big difference with low variability gives a large t value (strong signal). A small difference with lots of variability gives a small t value (weak signal). The bigger the t, the less likely the gap is down to chance.

When should I use a t-test?

Use a t-test when you have a numeric outcome and want to compare no more than two means. Specifically, a t-test fits when:

  • Your outcome variable is continuous (scores, measurements, time, counts that behave like measurements).
  • You're comparing one or two groups — not three or more.
  • The data are roughly normally distributed within each group.
  • For independent samples, the two groups have similar variances (there's an adjusted version, Welch's t-test, when they don't).

If your data violate normality — for example, skewed income or reaction-time data — a non-parametric alternative like the Mann-Whitney U test is the safer choice. If you're torn between them, see our guide on Mann-Whitney vs the t-test.

What are the three types of t-test?

Choosing the wrong type is the single most common mistake we see. Here's how they differ.

T-test type Use it when... Example
One-sample Comparing one group's mean to a known or hypothesised value Is the average IQ in your sample different from the population average of 100?
Independent-samples Comparing two separate, unrelated groups Do men and women differ in average anxiety scores?
Paired-samples Comparing the same people measured twice Did patients' pain scores change from before to after treatment?

The deciding question is simple: are the two sets of numbers from the same people (paired) or from different people (independent)? Pre/post measurements on the same participants are paired. Two separate groups are independent.

A worked example with real numbers

Say you run a study on sleep and memory. You randomly assign 30 participants to either a full-sleep group (8 hours) or a sleep-deprived group (4 hours), then measure how many words each person recalls from a 20-item list. Because these are two separate groups of people, you need an independent-samples t-test.

Your results:

  • Full-sleep group: M = 14.2, SD = 2.8 (n = 15)
  • Sleep-deprived group: M = 11.1, SD = 3.1 (n = 15)

Running the test gives:

t(28) = 2.87, p = .008, d = 1.05

Here's what each number means:

  • t(28) = 2.87 — the test statistic. The 28 is the degrees of freedom (n₁ + n₂ − 2 = 15 + 15 − 2). A t of 2.87 says the group difference is nearly three times larger than you'd expect from random variation alone.
  • p = .008 — there's only a 0.8% chance you'd see a difference this large if sleep truly had no effect. Because .008 is below the conventional .05 cutoff, the result is statistically significant.
  • d = 1.05 — Cohen's d, the effect size. A d of 1.05 is a large effect (0.2 = small, 0.5 = medium, 0.8 = large). The groups differ by just over one standard deviation — this is a substantial, real-world difference, not just a technically significant one.

Conclusion: sleep-deprived participants recalled significantly fewer words, and the effect was large.

What counts as "significant"?

A t-test result is statistically significant when the p-value is below .05 — the standard threshold in psychology, medicine, and most social sciences. A p of .008, as in the example above, clears that bar comfortably. A p of .07 would not: you'd conclude there isn't enough evidence of a difference.

But significance isn't the whole story. With a large enough sample, even a tiny, trivial difference can be "significant." That's why APA 7 expects you to report an effect size (Cohen's d for t-tests) so readers can judge whether the difference actually matters. A significant result with d = 0.1 is real but small; d = 1.05 is both real and meaningful.

How do I report a t-test in APA 7 format?

APA 7 wants the test statistic, degrees of freedom, exact p-value, and an effect size, typically with the group means and standard deviations. For our example:

An independent-samples t-test showed that full-sleep participants (M = 14.2, SD = 2.8) recalled significantly more words than sleep-deprived participants (M = 11.1, SD = 3.1), t(28) = 2.87, p = .008, d = 1.05.

Note the APA conventions: t, p, M, SD, and d are all italicised, and the p-value has no leading zero (.008, not 0.008). Getting these details right is exactly where manual formatting trips people up — and where StatRyx does the formatting automatically.

Running a t-test without the headache

You can run a t-test by hand or wrestle with SPSS menus — but SPSS licences run to roughly $100+ per year for the base edition, and you still have to know which test to pick and format the output yourself. StatRyx takes a different route: you upload your data, and it detects your variable types, checks assumptions like normality and equal variances, selects the correct t-test (or flags that Mann-Whitney is a better fit), and returns a ready-to-paste APA 7 write-up.

That means the three decisions that cause the most errors — which test, is my data normal, how do I report it — are handled for you, which is why StatRyx is built for researchers who need the right answer, not a statistics degree.

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

Frequently Asked Questions

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

A t-test compares the means of up to two groups, while ANOVA compares the means of three or more groups. If you run multiple t-tests to compare several groups, your chance of a false positive inflates — ANOVA controls for that. In practice: two groups, use a t-test;

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