What one-way ANOVA does
Analysis of variance (ANOVA) tests whether the means of three or more independent groups are all equal. Running several t-tests instead would inflate the chance of a false positive; ANOVA answers the overall question with a single test. This calculator works from each group’s mean, standard deviation and size.
The calculation
ANOVA splits the total variation into two parts:
- between groups: SSB = Σ nᵢ (x̄ᵢ − x̄)², where x̄ is the grand mean;
- within groups: SSW = Σ (nᵢ − 1) sᵢ².
Each is divided by its degrees of freedom (k − 1 and N − k, for k groups and N observations) to give mean squares. Then:
F = (SSB ÷ (k − 1)) ÷ (SSW ÷ (N − k))
The p-value is the probability of an F at least this large under Fisher’s F distribution.
Example
Three groups of 10, with means 20, 23 and 25 and SDs 4, 5 and 4.5:
- grand mean: 22.67;
- SSB = 126.7 with 2 degrees of freedom;
- SSW = 551.25 with 27 degrees of freedom;
- F = 63.3 ÷ 20.4 ≈ 3.10, p ≈ 0.061: not significant at α = 0.05;
- η² ≈ 0.19: the groups explain about 19% of the variance.
Reading the result
- p below α: at least one group mean differs from the others. ANOVA does not say which; use a post hoc test such as Tukey’s HSD, or Bonferroni-corrected comparisons.
- p at or above α: the data do not show a difference, which may also reflect a small sample.
Effect size
η² (eta squared) = SSB ÷ (SSB + SSW) is the share of total variance explained by the groups. As a rough guide, 0.01 is small, 0.06 medium and 0.14 large.
Assumptions
- Observations are independent, within and between groups.
- Each group is roughly normal; ANOVA is fairly robust with similar group sizes.
- Variances are similar across groups. A common rule is that the largest SD should be less than about twice the smallest. Otherwise, Welch’s ANOVA is more reliable.
For ranked or strongly skewed data, the Kruskal–Wallis test is a non-parametric alternative. With two groups, one-way ANOVA gives exactly the same p-value as Student’s t-test, with F = t².
To compare only two groups, use the two-sample t-test calculator. To include a fourth group, enter its size; leave it at 0 to use three groups.