Bell Statistics

What is ANOVA?

ANOVA compares three or more group means at once by asking whether the variation between the groups is larger than the variation within them. It answers whether any of the groups differ, in a single test, without comparing every pair separately.

Notation
F
Also called
analysis of variance, one-way anova, f-test, omnibus test
Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

In plain English

Run an A/B/C/D test and the obvious move is six pairwise t-tests, one for each pair. The obvious move is also a trap: six tests at the 5% level give roughly a 26% chance that at least one comes back significant when all four variants are identical. ANOVA exists to ask the question once. It returns a single p-value for "do any of these groups differ", spending 5% in total rather than 5% per comparison.

The name describes the mechanism, which is less intuitive than the goal. To find out whether means differ, ANOVA compares two kinds of variation. Between-group variation measures how far the group means sit from the overall mean; within-group variation measures how much individual observations scatter around their own group's mean. If the groups are genuinely alike, both quantities estimate the same underlying noise and their ratio should sit near 1. If the groups differ, the between-group term is inflated by real differences and the ratio grows. That ratio is the F statistic.

The critical limitation is that a significant F tells you something is going on and refuses to say what. With four variants and p = 0.008 you know they are not all the same and you do not know whether C beat A, D beat everything, or B is dragging the rest down. Finding out requires follow-up comparisons — and those bring back exactly the multiplicity problem ANOVA sidestepped, so they need a correction such as Tukey's or Bonferroni. ANOVA is a gatekeeper rather than an answer.

For most online experiments there is a better framing available, and it is worth saying plainly. A four-arm test usually has a control and three challengers, and the question is not "are these four different" but "does any challenger beat control". That is three comparisons against a baseline, not six among peers, and Dunnett's correction handles it with more power than an omnibus F followed by pairwise cleanup. ANOVA earns its place when the groups are genuinely symmetric — four pricing tiers, five onboarding variants with no incumbent.

Its assumptions are the t-test's, extended: independent observations, roughly normal sampling distributions, and — for the classical version — similar variances across groups. That last one is the fragile one, and Welch's ANOVA relaxes it the same way Welch's t-test does. When the outcome is badly skewed, the Kruskal-Wallis test is the rank-based counterpart, standing in the same relation to ANOVA as the Mann-Whitney U test does to the t-test.

The formula

One ratio of two variance estimates. The whole method is deciding how much of the total scatter belongs between the groups and how much belongs inside them.

The F statistic
F = ( between-group variance ) / ( within-group variance )

Near 1 when the groups are alike. Large when the group means are further apart than internal scatter explains.

Between-group mean square
MS_between = Σ nᵢ ( x̄ᵢ − x̄ )² / ( k − 1 )

k groups. Each group's distance from the grand mean, weighted by its size.

Within-group mean square
MS_within = Σ Σ ( xᵢⱼ − x̄ᵢ )² / ( N − k )

The pooled noise estimate. N observations in total — see the one-way ANOVA calculator.

Degrees of freedom
df_between = k − 1, df_within = N − k

The F distribution takes both, which is why an F is always quoted as F(df₁, df₂) — see degrees of freedom.

Two groups only
F = t²

With k = 2 this is algebraically a t-test. ANOVA is the generalisation rather than a different idea.

Worked example

A subscription business tests four onboarding flows on day-30 retention, measured as sessions in the first month. Each arm has 2,500 users. The means are 8.1, 8.4, 9.2 and 8.3 sessions, with a pooled within-group standard deviation of 4.6. Six pairwise t-tests were the alternative under consideration.

Groups
A 8.1, B 8.4, C 9.2, D 8.3 sessions
Per arm
n = 2,500 (N = 10,000)
Within-group SD
4.6
MS between
659.4
MS within
21.16
F(3, 9996)
31.16

p < 0.0001. The four flows are not interchangeable. Which one to ship is a question this test does not answer.

The F is decisive and it is also where the analysis begins rather than ends. Flow C is a full session ahead of A, which looks like the story, but the omnibus test has not established that C beats A — only that the four means are further apart than noise explains, which flow B being unusually low would also produce. Tukey's HSD on the six pairs confirms C against each of the others and finds no separation among A, B and D. Worth noticing what six uncorrected t-tests would have cost here: a 26% chance of at least one spurious significant pair even if all four flows were identical, and with a real effect present that noise sits underneath a true finding and makes it hard to tell which pairs to believe. Also worth noticing that if A were the incumbent, Dunnett's against control would have been the sharper design from the start.

Common misconceptions

A significant ANOVA means the best-performing group is significantly better.
It means at least one group differs from at least one other, and the highest mean is not automatically the one responsible. A single low group can drive the whole result. Establishing that the leader beats the rest requires pairwise tests with a correction — the omnibus F is a gate, not a verdict.
ANOVA is about variance, so it does not test means.
It tests means, using variance as the instrument. The null hypothesis is that all group means are equal; comparing between-group scatter to within-group scatter is simply how that hypothesis is evaluated. The name describes the machinery rather than the question.
With four variants you should always run ANOVA before anything else.
Only when the groups are symmetric. Most product experiments have a control and several challengers, where the questions of interest are challenger-versus-control — three comparisons, not six — and Dunnett's correction is more powerful than an omnibus test followed by pairwise cleanup. Running ANOVA first can cost power on the comparison you actually cared about.

Frequently asked questions

Why not just run a t-test on every pair of groups?
Because the error rate compounds. Four groups make six pairs, and six independent tests at 5% give about a 26% chance of at least one false positive when nothing differs at all. ANOVA asks the question once at 5% overall. If you do need the pairwise answers — and usually you do — run them after, with a correction such as Tukey's or Dunnett's, which is what keeps the overall rate at the level you intended.
What if the groups have very different variances?
Classical ANOVA assumes they do not, and violating that inflates the false-positive rate — particularly when the group sizes are also unequal, which in an online experiment is common. Welch's ANOVA drops the assumption and is the safer default, exactly as Welch's t-test is for two groups. Levene's test can confirm whether the variances differ, though with large samples it will flag differences too small to matter.
Can I use ANOVA when the outcome is badly skewed?
Often yes, because what matters is the sampling distribution of each group mean rather than the raw data, and the central limit theorem usually delivers that at experiment sample sizes. The case where it genuinely breaks is heavy skew with a handful of extreme values dominating a group mean — revenue data with a few enormous customers. There, Kruskal-Wallis compares by rank instead and is far less sensitive to those few points.
What does ANOVA give you with only two groups?
Exactly the same answer as a t-test. With two groups F equals t squared and the p-values are identical, so there is nothing gained and a less familiar output to read. Use a t-test for two groups; ANOVA earns its place from three upward, where the multiplicity problem it solves actually exists.

Related terms

  • Chi-square test

    The test for counts in a table — the standard SRM check, and the reason expected counts matter more than sample size.

  • Mann-Whitney U test

    Compares by rank instead of by mean, so one whale cannot move the result — and answers a subtly different question.

  • Multiple comparisons

    Test enough things and something will look significant — the arithmetic, and the four fixes.

  • Paired t-test

    When every observation has a partner, pairing removes the differences between units and can cut the sample you need by an order of magnitude.

  • T-test

    The workhorse for comparing two averages — and the four assumptions that decide whether its answer means anything.

  • Interaction effect

    When two changes stop being independent — the reason concurrent tests can both read as wins and lose money together.

Calculate it

  • One-way ANOVA

    Three or more independent groups on one continuous outcome — size it, then run the F test.

  • Two-sample t-test

    Compare the average of two independent groups — plan the sample size, then test the result.

Knowing the term is the easy part

Applying it to a live measurement problem is the part that goes wrong. If you are designing an experiment, reading a result you do not trust, or trying to work out what your marketing actually caused, that is the work we do.