Quick answer
ANOVA (analysis of variance) tests whether the means of several groups differ more than the variation within the groups would explain. It reports an F statistic, the ratio of between-group to within-group variance, and a p-value, but not which groups differ.
Formula: F = (SS between ÷ (k − 1)) ÷ (SS within ÷ (N − k))
What is ANOVA?
ANOVA, short for analysis of variance, is a statistical method that tests whether the means of several groups differ by more than the scatter inside the groups would explain. Despite its name, the question is about means. It gets there by comparing two kinds of variance: how far the group means sit from the overall mean, and how far individual values sit from their own group mean.
One-way ANOVA is the simplest form. There is one factor, such as the version of a page, with three or more levels, and one numeric outcome measured on each unit, such as the seconds a visitor needs to complete a form. The null hypothesis is that all group means are equal. The alternative is only that at least one of them is different.
The method was developed by the statistician Ronald Fisher, and the F distribution used to judge the result carries his initial. The NIST handbook presents the calculation as a table with a treatment row, an error row and an F statistic, which is the layout used below.
Worked example: one-way ANOVA on three page variants
A team shows one of three versions of a signup page to different visitors and records how many seconds each takes to finish signing up. Six visitors per version (sample data):
| Variant | Seconds | Sum | Mean | Sum of squared deviations |
|---|---|---|---|---|
| A | 52, 48, 55, 50, 47, 54 | 306 | 51 | 52 |
| B | 45, 43, 49, 41, 46, 46 | 270 | 45 | 38 |
| C | 50, 53, 46, 52, 47, 52 | 300 | 50 | 42 |
The last column adds up (value − group mean)² inside each group. For A: 1 + 9 + 16 + 1 + 16 + 9 = 52. The grand mean is (306 + 270 + 300) ÷ 18 = 876 ÷ 18 = 48.67 seconds.
Step 1: between-group sum of squares. Each group mean is compared with the grand mean and weighted by group size:
SS between = 6 × (51 − 48.67)² + 6 × (45 − 48.67)² + 6 × (50 − 48.67)² = 124
Step 2: within-group sum of squares. Add the last column: 52 + 38 + 42 = 132. The two parts sum to the total sum of squares, 256.
Step 3: degrees of freedom. With k = 3 groups and N = 18 values, between groups k − 1 = 2, within groups N − k = 15.
Step 4: mean squares and F.
| Source | Sum of squares | Degrees of freedom | Mean square | F |
|---|---|---|---|---|
| Between variants | 124 | 2 | 124 ÷ 2 = 62 | 62 ÷ 8.8 = 7.05 |
| Within variants | 132 | 15 | 132 ÷ 15 = 8.8 | |
| Total | 256 | 17 |
Step 5: judge F. The 5% critical value of the F distribution with 2 and 15 degrees of freedom is 3.68, and 7.05 is well above it. The p-value is about 0.007. When the numerator has exactly 2 degrees of freedom there is a shortcut you can check on a calculator: p = (15 ÷ (15 + 2 × 7.045))^7.5 ≈ 0.0070.
What F and p say, and what they do not
F is a ratio of signal to noise. If the three versions had the same true mean, both mean squares would estimate the same variance and F would tend to be near 1. A value of 7 says the group means are spread much wider than the scatter within groups would normally produce.
The scatter matters as much as the gap. Keep the three means at 51, 45 and 50, but make every visitor's distance from their group mean three times larger. SS between stays 124, SS within becomes 1,188, the within mean square 79.2, F drops to 0.78 and p rises to about 0.47. The same differences in means are now indistinguishable from noise.
| The output tells you | It does not tell you |
|---|---|
| The data would be unusual if all means were equal | Which variants differ from which |
| How between-group spread compares with within-group spread | How large or useful the difference is |
| The evidence at this sample size | The probability that the null hypothesis is true |
| Nothing about direction | Whether variant B caused it, unless assignment was random |
For size, report the means with their differences, and a measure such as eta squared = SS between ÷ SS total = 124 ÷ 256 = 0.48. That share is optimistic in small samples; the adjusted omega squared, (124 − 2 × 8.8) ÷ (256 + 8.8) = 0.40, is lower. See effect size and p-value.
Why not run many t tests?
With three variants there are three pairs, and each test at the 0.05 level gets its own chance of a false alarm. If the three tests were independent, the chance of at least one false alarm when nothing differs would be 1 − 0.95³ = 14%. Pairwise tests share data, so the exact figure differs, but it is well above 5%. With six variants there are 15 pairs, and the independent-tests figure is 54%.
ANOVA asks one question first, with one error rate. If it rejects, you then compare pairs with a method that accounts for multiplicity. Tukey's method, described by NIST, is built for all pairwise comparisons. A simpler choice is the Bonferroni correction: divide 0.05 by the number of comparisons, here 0.0167. Using the pooled within mean square of 8.8, the standard error of a difference is √(8.8 × (1/6 + 1/6)) = 1.713 seconds:
| Pair | Difference in means | t (15 df) | Two-sided p | Passes 0.0167? |
|---|---|---|---|---|
| A vs B | 6 s | 3.50 | 0.003 | Yes |
| C vs B | 5 s | 2.92 | 0.011 | Yes |
| A vs C | 1 s | 0.58 | 0.57 | No |
The conclusion in words: B is faster than both A and C; this data cannot separate A from C. "Cannot separate" is not the same as "equal".
ANOVA vs t test vs chi-square
| Method | Outcome | Groups | Question |
|---|---|---|---|
| t test | Numeric | 1 or 2 | Do two means differ? |
| One-way ANOVA | Numeric | 3 or more (also works with 2) | Do any of the means differ? |
| Two-way ANOVA | Numeric | Two factors | Does each factor matter, and do they interact? |
| Chi-square test | Categories or yes/no | 2 or more | Do the proportions differ? |
With exactly two groups, one-way ANOVA with pooled variance and the pooled two-sample t test agree: F equals t². If your outcome is converted or not converted, ANOVA is the wrong tool. The full decision table is in which statistical test.
Assumptions and alternatives
- Independent observations. One value per randomized unit. Ten visits by one person are not ten independent people. No later correction repairs this.
- Roughly normal residuals. This matters most in small groups. With large groups, the means are close to normal even when values are skewed.
- Similar variances. In the example the group standard deviations are 3.22, 2.76 and 2.90, close enough. When they differ a lot, especially with unequal group sizes, use Welch's ANOVA. On this data it gives F = 6.96 with about 2 and 10.0 degrees of freedom, p = 0.013, the same direction with a little less certainty.
- Ordinal or strongly skewed outcomes. The Kruskal–Wallis test works on ranks. It answers a question about the ordering of values, not about means.
Before computing anything, plot the groups. A single visitor who took 600 seconds would dominate SS within, and the right response is to find out what happened to that visitor.
ANOVA inputs from TapCub
TapCub does not run A/B tests, assign variants or calculate ANOVA. It can record what you need to do the calculation elsewhere.
- Tag the variant. Let your testing tool assign the version and send it as an event property, for example
variantwith values A, B and C, on the page view and the signup event. Write it into All-platform analytics › Data › Tracking plan so the name stays consistent. - Check the timing. All-platform analytics › Behavior › Interval shows the distribution of time between two events, such as opening the signup page and completing signup, with median, quartiles and average. Use segments or filters to look at one variant at a time, and compare shapes before testing.
- Pull per-person values. In All-platform analytics › Behavior › SQL query, return one row per person with the variant and the seconds between the two events, or the three summaries per variant that ANOVA needs: count, sum and sum of squares. Within-group squares follow from Σx² − n × mean². For large lists, use All-platform analytics › Data › Data export on a plan that includes it.
- Compute outside. Paste the numbers into a spreadsheet or statistics package, run the ANOVA, then the pairwise comparisons. Note how many visitors never finished: ANOVA on completion time silently leaves them out, so compare completion rates separately.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.4.3.3 The ANOVA table and tests of hypotheses about means.
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.4.7.1 Tukey's method.
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.7.3 Upper critical values of the F distribution.
- Welch, B. L. (1951). On the comparison of several mean values: an alternative approach. Biometrika, 38(3–4), 330–336.
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Product Experience Specialist
Writes about product experience, practical workflows, and growth, turning complex processes into clear steps for everyday decisions.