StatsToTable

t test or ANOVA?

With two groups they are not two tests. They are one test written two ways, and the arithmetic proves it: F is exactly t². The interesting question is why ANOVA exists at all, and the answer is what happens from three groups upward.

The short answer

Two groups: use either, they agree. Three or more independent groups: use ANOVA, because running repeated t tests multiplies your false-positive rate. More than two paired measurements: that is a different design again — repeated-measures ANOVA.

The identity, on real numbers

Two groups of twelve. Group A averages 50.21 (SD 2.11), group B averages 54.98 (SD 1.96). Running both tests on the same data:

StatisticpEffect size
Independent-samples t testt(22) = −5.73< .001d = −2.34
One-way ANOVAF(1, 22) = 32.84< .001η² = 0.599

Now square the t statistic: (−5.73)² = 32.8384. The F statistic is 32.8384. They are not close — they are identical, to every decimal the computation carries. The degrees of freedom line up too: t with df 22 becomes F with 1 and 22.

This is not a coincidence or a rounding artefact. Both tests partition the same total variation into a part explained by the grouping and a part left over, and compare them. With two groups there is only one way to partition, so there is only one test.

So why does ANOVA exist?

Because at three groups the partition stops being trivial — and because of what people do instead.

The tempting shortcut with three groups is to run three pairwise t tests: A vs B, A vs C, B vs C. Each is conducted at the 5% level, so each carries a 5% chance of a false positive. Three independent chances do not add to 5%; they combine to 1 − 0.95³ ≈ 14.3%.

GroupsPairwise t testsFamily-wise error rate
215.0%
3314.3%
4626.5%
51040.1%
61553.7%

With six groups you are more likely than not to report at least one difference that is not there. ANOVA avoids this by asking one question instead of fifteen: are all the group means equal? One test, one 5%, one answer.

What ANOVA does not tell you

A significant F says the means are not all equal. It does not say which ones differ. That second step needs planned contrasts, or a correction for multiplicity such as Tukey's HSD or Holm's method — a different family of tests, designed for exactly this.

This is why an ANOVA followed by uncorrected pairwise t tests gives back the error rate you just bought insurance against.

The assumption that matters most

Both tests assume the within-group variability is comparable across groups. That is checked with Levene's test; when it rejects, the pooled version of the t test should give way to Welch, and ANOVA to its Welch variant.

Normality matters less than people expect, and the reason is worth stating: the test does not assume your individual values are normal, it assumes the group means are approximately normal, and the central limit theorem gets you there quickly. Clear skew plus a small sample is where this breaks down.

How to report either one

For two groups: t(22) = −5.73, p < .001, d = −2.34, with the mean difference and its 95% confidence interval. For three or more: F(2, 34) = 4.12, p = .025, η² = .19 — and then the pairwise comparisons if you ran them, labelled as such.

Frequently asked

Is ANOVA the same as a t test?

With exactly two groups, yes — F equals t² and the p value is identical. The table above shows it on real numbers.

Why not run several t tests instead?

Each one carries its own 5% false-positive rate and they compound. Three groups reach about 14%, five groups about 40%.

If ANOVA is significant, which groups differ?

ANOVA does not say. Use planned contrasts or a multiplicity correction such as Tukey's HSD.

Does it matter that my groups are different sizes?

Not much, but unequal sizes combined with unequal variances is the risky combination — that is when the Welch correction matters.

Which test should I use? · Parametric or not? · Repeated measures · Method notes