What this calculator does
One-way analysis of variance (ANOVA) tests whether the means of three or more independent groups are all equal. It splits the total variation in the data into two parts: variation between the group means and variation within each group. If the between-group variation is large relative to the within-group variation, the group means are unlikely to be equal.
Alongside the F-test, the calculator reports η² and ω² effect sizes, Tukey HSD post-hoc comparisons for every pair, Levene’s test for equal variances and Welch’s ANOVA, the version that does not assume equal variances.
The formulas
MS = SS / df, dfbetween = k − 1, dfwithin = N − k
F = MSbetween / MSwithin · η² = SSbetween / SStotal
The p-value comes from the F distribution with (k − 1, N − k) degrees of freedom. Tukey HSD compares each pair with q = |x̄i − x̄j| / √(MSwithin/2 × (1/ni + 1/nj)) against the studentized range distribution (the Tukey–Kramer form, which handles unequal group sizes).
Worked example: shelf placement and snack sales
Press Load example. A snack brand tracked average daily sales, in ₹ thousand, across 23 stores in Bengaluru with its product placed at eye level (8 stores), on the bottom shelf (7) or on an end-cap display (8).
- Group means: eye level 52.38, bottom shelf 46.66, end cap 54.55.
- ANOVA: F(2, 20) = 16.89, p < 0.0001. At least one placement has different average sales.
- Effect size: η² = 0.628 and ω² = 0.580, so placement accounts for well over half of the store-to-store variation.
- Tukey HSD: eye level beats bottom shelf by 5.72 (p = 0.0015) and end cap beats bottom shelf by 7.89 (p < 0.0001), but end cap vs eye level, a gap of 2.18, is not significant (p = 0.26).
- Assumptions: Levene’s test p = 0.79, so equal variances are reasonable; Welch’s ANOVA agrees (p = 0.0001).
The business reading: get off the bottom shelf. Paying extra for an end cap over eye level is not supported by this data, though a larger study might detect a smaller gain.
Assumptions
- Independent observations within and across groups.
- Roughly normal data in each group, which matters most for small groups. ANOVA is fairly robust with 15 or more per group.
- Equal variances across groups. If Levene’s test is significant, report Welch’s ANOVA instead, and treat Tukey HSD with caution.
Getting the same result in Excel and Python
In Excel, enable the Analysis ToolPak and use Data → Data Analysis → Anova: Single Factor on the group columns. It gives the ANOVA table but no post-hoc test. In Python:
from scipy import stats
eye = [52.4, 48.9, 55.1, 50.6, 57.3, 49.8, 53.7, 51.2]
bottom = [45.3, 48.7, 43.9, 47.2, 50.1, 44.6, 46.8]
endcap = [53.1, 57.4, 50.3, 54.7, 58.9, 51.6, 56.0, 54.4]
print(stats.f_oneway(eye, bottom, endcap)) # F = 16.89, p = 5.1e-05
print(stats.tukey_hsd(eye, bottom, endcap)) # pairwise differences, p-values, intervals
print(stats.levene(eye, bottom, endcap)) # equal-variance check
Common mistakes
- Stopping at a significant F. It does not say which groups differ. Always follow with a post-hoc test.
- Running post-hoc tests after a non-significant F and reporting whichever pair looks different.
- Using one-way ANOVA on repeated measurements of the same people or stores. That needs repeated-measures ANOVA.
- Treating ordered categories as unordered. If the groups are doses or price levels, a trend test or regression usually answers the real question better.