ANOVA
calculator.
One-way analysis of variance tests whether several group means could really be equal.
- Critical F
- 3.8853
- η², share explained
- 0.615
- Effect
- large
A difference this large would be rare if all 3 means were equal. The groups account for 61.5% of the variation, a large effect. 2 of 3 pairs differ after the Bonferroni adjustment.
Where your F falls
Under equal means, F follows this curve with 2 and 12 degrees of freedom. Your F of 9.5911 is beyond the critical value of 3.8853, and the shaded tail, the p-value, is 0.0032.
How big is the effect?
- η² below 0.01
- negligible
- η² 0.01 to 0.06
- small
- η² 0.06 to 0.14
- medium
- η² 0.14 or more
- large, yours
Cohen's rough benchmarks. Yours is 0.615, so judge it against what matters in your field as well.
ANOVA table
| Source | SS | df | MS | F | p |
|---|---|---|---|---|---|
| Between | 27.8973df 2 | 2 | 13.9487 | 9.5911p 0.0032 | 0.0032 |
| Within | 17.452df 12 | 12 | 1.4543 | ||
| Total | 45.3493df 14 | 14 |
Each group on one scale
Dots are your values, and a tick marks each group's mean.
Group statistics
| Group | n | Mean | SD | Min | Max |
|---|---|---|---|---|---|
| Level 1n 5 | 5 | 5.34 | 1.1171Min 4Max 6.9 | 4 | 6.9 |
| Level 2n 5 | 5 | 7.72 | 1.1032Min 6.5Max 9.2 | 6.5 | 9.2 |
| Level 3n 5 | 5 | 8.56 | 1.3777Min 6.9Max 10.5 | 6.9 | 10.5 |
Pairs, Bonferroni for 3
| Pair | Difference | t | Adjusted p | Differs |
|---|---|---|---|---|
| Level 1 vs Level 2 | −2.38t −3.12 | −3.12 | 0.0265Differs Yes | Yes |
| Level 1 vs Level 3 | −3.22t −4.222 | −4.222 | 0.0036Differs Yes | Yes |
| Level 2 vs Level 3 | −0.84t −1.101 | −1.101 | 0.8771Differs No | No |
Classic F against Welch's test
The two tests agree here at α = 0.05. If the group standard deviations differ a lot, rely on Welch's line.
If you had more data
| Data | Values | F | p |
|---|---|---|---|
| As enteredValues 15 | 15 | 9.5911 | 0.0032 |
| 2 timesValues 30 | 30 | 19.1822 | < 0.0001 |
| 3 timesValues 45 | 45 | 28.7733 | < 0.0001 |
| 5 timesValues 75 | 75 | 47.9555 | < 0.0001 |
Each row keeps your means and spreads, and multiplies every group's size. It shows how p depends on sample size, and it is not a forecast.
Your data as a grid
| # | Level 1 | Level 2 | Level 3 |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 |
Working
- 1Find each group mean and the grand meanLevel 1: 5.34; Level 2: 7.72; Level 3: 8.56. Grand mean of 15 values: 7.2067
- 2Sum of squares between the groupsSSB = Σ n(group mean − grand mean)² = 27.8973
- 3Sum of squares within the groupsSSW = Σ (value − its group mean)² = 17.452
- 4Divide each by its degrees of freedomMSB =27.89732= 13.9487MSW =17.45212= 1.4543
- 5Divide the two mean squaresF=13.94871.4543= 9.5911
- 6Compare with the F distributionp = 0.0032. The critical F at α = 0.05 is 3.8853, so reject equal means.
- 7Check: the two sums of squares add to the total27.8973 + 17.452 = 45.3493, and the total is 45.3493
How it's worked out
You have one factor, such as a temperature setting or a teaching method, and independent measurements at each level of it. The hypothesis under test says the population means are all the same. The alternative says they are not. The method splits the spread of your values into a part between the groups and a part inside them.
Here and are the size and mean of group , is the mean of every value, and is one value. Each sum of squares is then divided by its degrees of freedom, which gives a mean square. With groups and values, the two mean squares and their ratio are:
MSW measures the noise inside the groups, whether or not the means differ. MSB measures that same noise only when the means are equal, and real differences push it up. So F sits near 1 when nothing is going on. The p-value is the area of the F curve to the right of your F, on and degrees of freedom.
The effect sizes
Eta squared is the share of the total sum of squares that the groups explain in your sample. Omega squared takes off what chance alone would produce, so it is a less biased guide to the population. That published form of omega squared assumes equal group sizes, so treat it as approximate when yours differ.
Worked examples
Resistors tested at three temperatures
This is the example in NIST's handbook: five resistors at each of three temperature levels. The group means are 5.34, 7.72, 8.56, and the mean of all 15 values is 7.2067.
The sums of squares are 27.897 between and 17.452 within. That gives mean squares of 13.949 on 2 degrees of freedom and 1.454 on 12, so F is 9.59. The critical value at 0.05 is 3.89, and p is 0.0032, so you reject equal means.
Eta squared is 0.615, so temperature accounts for about 62% of the variation. The pairs show where the difference lies. Level 1 differs from level 2 (adjusted p 0.0265) and level 3 (adjusted p 0.0036), but levels 2 and 3 do not clearly differ from each other (adjusted p 0.8771).
Etch rate at four plasma power settings
An engineer measures etch rate in angstroms per minute, five wafers at each of 160, 180, 200 and 220 W. The group means climb from 551.2 to 707. F on 3 and 16 degrees of freedom is 66.8, and p is below 0.0001.
Eta squared of 0.926 says power setting explains almost all of the variation. All 6 pairs differ after the Bonferroni adjustment, which is what you would expect when the means are this far apart and the groups this tight.
Daily sales at three similar stores
Three stores log six days of sales each. The means are 12.83, 13, 12.83, and F is 0.026 with p of 0.9741. The between mean square is smaller than the within one, which is quite possible when the means are equal.
This does not prove the stores sell the same amount. It says these 18 readings cannot tell them apart. Keep the same means and spreads with five times the data, and p is still 0.8769, because these means hardly differ at all.
Reading your result
Start with F and p. An F below the critical value means the means vary about as much as chance alone would make them. A p below your level means a gap this large would be rare if all the means were equal. It does not tell you how big the gap is.
Then read the effect size. Cohen's benchmarks for eta squared are 0.01 small, 0.06 medium and 0.14 large. Lakens, who quotes them, suggests using them only as a last resort, since they were built for comparisons between unrestricted populations. With a lot of data, even a tiny gap can be significant, so read both figures together.
Use the pairs to find the difference. Each pair gets a t statistic built on the pooled MSW and degrees of freedom, and its p-value is multiplied by the number of pairs. That is the Bonferroni method. NIST notes that Tukey has the edge when you want every pair, and that Bonferroni may do better when you want only a few.
Look at Welch's line when spreads differ. The classic test assumes equal variances. Delacre and colleagues found that when this fails, the classic F can be too strict or too lenient, depending on how group sizes pair with spreads, and that with more than two groups it turns lenient even at equal sizes. Welch's test held up better, so it is the one to trust when the standard deviations clearly differ.
Under the model, errors are independent and normal with one shared variance. Each group needs at least two values. If every group has no spread at all but the means differ, F has no upper limit, and the tool reports an infinite F and a p of 0.
On NIST's reference data set SiRstv, whose certified F is 1.18046237440255, this tool gives 1.18046237. That is the check to run if you want to compare it with your own software.
| df within | 1 | 2 | 3 |
|---|---|---|---|
| 10 | 4.965 | 4.103 | 3.708 |
| 15 | 4.543 | 3.682 | 3.287 |
| 20 | 4.351 | 3.493 | 3.098 |
| 30 | 4.171 | 3.316 | 2.922 |
| 60 | 4.001 | 3.15 | 2.758 |
| df within | 4 | 5 |
|---|---|---|
| 10 | 3.478 | 3.326 |
| 15 | 3.056 | 2.901 |
| 20 | 2.866 | 2.711 |
| 30 | 2.69 | 2.534 |
| 60 | 2.525 | 2.368 |
Common mistakes
- Testing every pair with a plain t-test. Three groups make 3 pairs, and at 0.05 each the chance of a false alarm somewhere is about 14%. Five groups make 10 pairs and about 40%.
- Using it on repeated measures. If the same people appear in every group, the values are not independent. That design needs a repeated-measures analysis, which this tool does not run.
- Reading a large p as proof of equal means. It only says your data cannot separate the groups.
- Stretching one factor to cover two. For dose and sex together, use the two-way ANOVA calculator. For ranks or badly skewed data, the Kruskal-Wallis calculator drops the normal assumption.
Questions people ask
Sources
- NIST/SEMATECH e-Handbook, section 7.4.3, One-way ANOVA
- NIST/SEMATECH e-Handbook, section 7.4.3.2, The one-way ANOVA model
- NIST/SEMATECH e-Handbook, section 7.4.3.3, One-way ANOVA calculations
- NIST/SEMATECH e-Handbook, section 7.4.7.3, Bonferroni's method
- NIST Statistical Reference Datasets, SiRstv certified values
- Lakens (2013), Calculating and reporting effect sizes, Frontiers in Psychology 4, 863
- Delacre, Leys, Mora and Lakens (2019), International Review of Social Psychology 32
- Wikipedia, Effect size
- GraphPad knowledgebase article 782