Bell Statistics

One-way ANOVA calculator

Work out how many observations each arm needs across three or more groups, then get F, the degrees of freedom, the p-value and both effect sizes. Be clear about what that buys: a significant F says some group differs, and [nothing about which one](/post/the-more-the-merrier-the-problem-of-multiple-comparisons-in-a-b-testing).

Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

Calculator

σ of the means ÷ σ within. 0.10 small, 0.25 medium, 0.40 large.

Required sample size per group
Per group77
Total308
Achieved powerAt the whole-number sample above.80.3%
Degrees of freedomBetween groups, then within.3, 304
Effect size (Cohen's f)0.190
Non-centrality (λ)f²·N, what the F test actually sees.11.119

Collect 77 observations in each of the 4 groups — 308 in all — and the F test will reject equality of the means 80.3% of the time, if the spread of true means is as large as Cohen's f of 0.190. What it will not do is name a group: a significant F says some group differs from the others and stops there. Sizing for the pairwise comparison you actually care about, at an α corrected for the number of comparisons you will make, needs a noticeably larger sample than this — and that is worth discovering now rather than when someone asks which arm won.

  • This sizes the omnibus F test only. If the question is which pairs of groups differ, the pairwise comparisons that follow need their own correction and a larger sample than this.
Sample size per group against statistical powerReaching 5.8% power takes 2 per group and 98.5% takes 154; the 80.0% target is met at 77.204060801001201400%25%50%75%100%PowerSample size — per group80.0% → 77

Drag the dashed line — or focus it and use the arrow keys — to change the target power and resize the study.

Show these numbers as a table
Power at each sample size per group
PowerSample size
5.8%2
16.0%12
27.7%22
39.8%32
51.2%42
61.4%52
70.1%62
77.3%72
83.0%82
87.5%92
90.9%102
93.5%112
95.4%122
96.7%132
97.7%142
98.4%152
Required sample per group against effect size (cohen's f)Detecting 0.05 takes 1,092 and 0.60 takes 9. At the 0.19 currently entered it is 77 — the requirement falls roughly as the square of the effect.101001,0000.100.200.300.400.500.60Effect size (Cohen's f)Required sample per group (log scale)0.19 → 77

Drag the dashed line — or focus it and use the arrow keys — to change effect size (cohen's f).

Show these numbers as a table
Required sample per group against effect size (cohen's f)
Effect size (Cohen's f)Required sample per group
0.051,092
0.11242
0.16104
0.2258
0.2837
0.3326
0.3920
0.4415
0.5012
0.5610

When to use it

Use one-way ANOVA when you have one continuous outcome and three or more independent groups, and the first question is whether the means differ at all. Four onboarding variants, five pricing pages, three routing rules — each unit belongs to exactly one group and no unit appears twice. With two groups it reduces exactly to the two-sample t-test (F = t², same p-value), so there is no reason to use it there.

The reason it exists is error rate, not convenience. Six pairwise t-tests across four arms at α = 0.05 give you roughly a one-in-four chance of a false positive when every arm is identical, and that arithmetic turns a multi-arm test into a machine for imaginary winners. The omnibus F holds the family-wise rate at α for the one question it asks. What it does not do is answer the question you have: "at least one of these four differs from at least one other" is almost never a decision. Getting from there to "variant C beats control" is a separate inferential problem with its own correction — see choosing a multiple-comparison correction and why the problem is worse than it looks.

Use something else when the data says so. Conversion outcomes across several arms belong in a chi-square test; time-to-event outcomes want the log-rank test. If the same units are measured under every condition the groups are not independent and this model is wrong — you want a repeated-measures design, or the paired t-test for two conditions. For badly behaved continuous data the rank analogue is Kruskal–Wallis, the k-group generalisation of the Wilcoxon rank-sum test, with the same caveats about what it does and does not compare.

Assumptions

ANOVA inherits the t-test's assumptions and adds one about variances. They are not equally important, and the received order of importance is roughly backwards:

  • Independence, within and across groups. The one that matters and the one no diagnostic reveals. Clustered assignment — by account, by geography, by session rather than by user — inflates F in a way that looks exactly like a real effect, and randomisation done properly is the only defence.
  • Normality of the residuals, not of the outcome. With a few hundred observations per arm this is close to a non-issue; with a dozen per arm and a long right tail it is not, because F is a ratio of variances and variances are far more sensitive to extreme values than means.
  • Equal variances across groups — and unlike Welch's t-test, the classical F does not drop this one. With balanced arms it is fairly robust. With unbalanced arms it breaks in both directions: anti-conservative when the smaller groups carry the larger variances, over-conservative when they carry the smaller. Unbalanced and heteroscedastic, use Welch's ANOVA.
  • No hidden multiplicity in the metric. ANOVA controls error across groups, not across outcomes: running it on nine metrics and reporting the significant one reintroduces the exact problem the F test prevents — see common testing mistakes.
  • And, unstated but assumed, that the omnibus null is worth testing. Exact equality of four population means is rarely a hypothesis anyone believes. If you know which comparisons matter, planned contrasts fixed in advance beat an F test followed by a post-hoc trawl.

How the calculation works

The sample-size tab solves the exact non-central F power function using Cohen's f — the standard deviation of the group means over the within-group standard deviation. Because it summarises a whole pattern in one number, the easiest route is to write down the means you expect and let the calculator reduce them, as [the two-group calculator](/calculators/two-sample-t-test) reduces two means and an SD to Cohen's d. Power depends on the pattern, not the largest gap: one arm 20 points from three identical ones is a smaller f than two arms 20 points from two others.

Partition of variance
SS_total = SS_between + SS_within

The whole method in one line: variation of the group means around the grand mean, plus variation of observations around their own group mean.

Test statistic
F = MS_between / MS_within, df = (k − 1, N − k)

Under the null both mean squares estimate the same within-group variance, so F sits near 1; a real difference inflates only the numerator.

Effect size
f = σ_means / σ_within, f = √(η² / (1 − η²))

Cohen's benchmarks are 0.10 small, 0.25 medium, 0.40 large — a last resort, since they summarise a psychology literature, not your funnel.

Power
1 − β = P( F′ > F₁₋α,ₖ₋₁,ₙ₋ₖ ), λ = f²·N

λ depends on total N, so adding a fifth arm to a fixed budget costs power twice: fewer observations per arm, and one more numerator degree of freedom.

Eta-squared
η² = SS_between / SS_total

The share of variance associated with group membership in this sample. Biased upward: with no real effect at all its expected value is about (k − 1)/(N − 1), not zero.

Omega-squared
ω² = (SS_between − (k − 1)·MS_within) / (SS_total + MS_within)

The bias-corrected version, and the one to report. It can come out negative — what an unbiased estimator of a near-zero quantity does — which reads as "indistinguishable from no effect".

Worked example

You are testing four pricing-page layouts, and the outcome is seconds on the page before clicking through. Within-arm variability is about 45 seconds. You would act on a result where one layout runs 20 seconds from the other three — a smaller pattern than it sounds, since with three means together and one apart the SD of the four means is only about 8.7 seconds.

Significance level (α)
0.05
Power (1 − β)
0.80
Number of groups (k)
4
Expected means
120 / 120 / 120 / 140 seconds
Within-group SD (σ)
45
Allocation
Equal

Cohen's f is about 0.19, which needs 75 sessions per arm — 300 in total — for 80% power.

That 296 buys the omnibus answer and nothing else: four times in five the F test will tell you the four layouts are not all the same, and it will not identify the winner. Sizing for the comparison you actually want — layout D against control, at a Bonferroni-adjusted level across all six pairwise contrasts — takes closer to 120 per arm, because the correction pushes the per-comparison α to about 0.008 and the critical value up with it. That gap is the real cost of a four-arm test, and the moment to notice it is while planning, not when someone asks which one won.

Interpreting the output

Start with ω² and the group means, not with F. The F statistic answers a yes/no question about exact equality; ω² says how much of the outcome's variation goes with which arm a unit landed in. An ω² of 0.01 alongside p < 0.001 is ordinary in a large test: the arms differ detectably while explaining almost nothing. Prefer ω² to η², which is biased upward by roughly (k − 1)/(N − 1) even when nothing is going on.

A significant F licenses exactly one sentence: the group means are not all equal. It does not rank the arms, and the arm with the highest observed mean is not thereby the winner — with four arms and no real differences one still has to come first, and it will look convincing. A claim about a specific pair needs a procedure that controls error across the comparisons you make: Tukey's HSD for all pairwise contrasts, Dunnett's when every arm is compared against one control, Bonferroni on a short list fixed in advance. Our guide to choosing between corrections covers the trade-off; every one of them costs power.

A non-significant F is not permission to call the arms equivalent, and it is a weak statement — the omnibus test spreads its power across every way the means could differ, so it can miss a real gap between two specific arms while detecting nothing overall. If the question is whether a cheaper variant is no worse than the incumbent, nominate a margin in advance and use an equivalence test or a non-inferiority test on that pair.

Finally, treat multi-arm tests as a design problem before they become an analysis problem. Splitting fixed traffic four ways costs power twice over, and the marginal arm is usually the one nobody had a hypothesis for. Where the arms are geographies rather than users, geo testing gives the same comparison with far fewer independent units; where you just want more decisions per quarter, parallel testing beats more arms.

Frequently asked questions

My F test is significant. Which group is the winner?
The F test cannot tell you. It rejects a single null hypothesis — that all the population means are equal — and rejecting it says only that at least one differs from at least one other. Identifying which requires a follow-up procedure that accounts for how many comparisons you are making: Tukey's HSD across all pairs, Dunnett's when everything is compared to one control, or a small set of contrasts you specified before seeing the data. Picking the arm with the highest observed mean and calling it the winner has no error control at all.
Why not just run every pairwise t-test?
Because the false-positive rate compounds. With four arms there are six pairwise comparisons, and at α = 0.05 each the chance of at least one spurious significant result when all arms are truly identical is around 26%. With five arms and ten comparisons it is about 40%. ANOVA holds the rate at 5% for the omnibus question, and the corrected post-hoc procedures hold it for the pairwise ones. Running the pairwise tests uncorrected does not.
Should I report eta-squared or omega-squared?
Omega-squared. Eta-squared is the share of variance explained in the sample you happened to collect, and it is biased upward: with four groups and 40 observations, an eta-squared of around 0.08 is what you would expect from pure noise. Omega-squared corrects for that bias and estimates the population quantity, which is what a reader assumes you are reporting. It can be negative when the effect is near zero, and that should be reported as-is rather than rounded up to zero.
Do my groups have to be the same size?
No, but equal sizes are worth defending. Balanced designs maximise power for a fixed total, and — more importantly — they make the F test robust to unequal variances. With unbalanced groups and unequal variances the actual error rate can drift well away from the nominal 5% in either direction, depending on whether the larger variances sit in the larger or the smaller groups. If you end up unbalanced with visibly different spreads, use Welch's ANOVA rather than the classical F.
How do I pick a value for Cohen's f?
Do not pick one directly. Write down the group means you would consider worth acting on and the within-group standard deviation you expect from historical data, and let those imply f. Cohen's 0.10/0.25/0.40 benchmarks exist for situations with no information at all, and they came from summarising a particular research literature rather than from anything about your product. Using them as a default tends to produce studies sized for effects nobody has a reason to expect.
Is there a downside to adding another arm?
Two, and they compound. A fifth arm splits the same traffic five ways rather than four, so each arm has fewer observations, and it adds a numerator degree of freedom, which raises the critical value the F statistic has to clear. It also enlarges the family of pairwise comparisons afterwards — five arms means ten pairs — so the correction on the comparison you actually care about gets harsher. Add arms when you have a hypothesis for each one, not to fill the slot.

Related calculators

  • Two-sample t-test

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

  • Wilcoxon test

    Rank-sum (Mann-Whitney) and signed-rank tests, with the exact distribution for small samples.

  • Chi-square test

    Test a contingency table of counts for association — any number of rows and columns.

  • Log-rank test

    Compare two survival, retention or churn curves — events needed to plan, chi-square and p-value to analyse.

Terms on this page

  • Sample size

    Four inputs, one number, fixed before the test runs — and the square law that makes small effects expensive.

  • Statistical power

    The probability your test finds a real effect — and why most tests that report nothing were never able to.

  • Multiple comparisons

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

  • Effect size

    How big the difference is — the number a p-value throws away and a business case runs on.

  • Marketing mix modelling

    One regression across every channel, built on aggregate data — no tracking, and strong assumptions.

  • Regression analysis

    Fit a line through the data — and the phrase 'holding everything else fixed' is where the trouble starts.

  • R-squared

    Share of variance explained — the most quoted and most over-interpreted number in any model output.

  • Multicollinearity

    When predictors move together the model cannot separate them — good predictions, meaningless coefficients.

  • Overfitting

    A model that memorised the noise — excellent on the data it saw, useless on the data it will meet.

  • Variance

    Spread in squared units — awkward to read, and the quantity every sample-size formula is built on.

Talk to the people who build these for a living

Multi-cell geo tests let you compare several markets at once without splitting your user base four ways. Geo Testing

References

  • Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Lawrence Erlbaum Associates.
  • Levine, T. R., & Hullett, C. R. (2002). Eta squared, partial eta squared, and misreporting of effect size in communication research. Human Communication Research, 28(4), 612-625.
  • Delacre, M., Leys, C., Mora, Y. L., & Lakens, D. (2019). Taking parametric assumptions seriously: arguments for the use of Welch's F-test instead of the classical F-test in one-way ANOVA. International Review of Social Psychology, 32(1), 13.