Skip to content

One-Way ANOVA Calculator

Paste one group of readings per line and get the whole one-way ANOVA table: sums of squares, mean squares, the F ratio, its degrees of freedom and the p-value.

F

9.591107

3 groups, 15 readings in all

p-value

0.0032482226

the share of F values this large or larger, if every group really has the same mean

Degrees of freedom

2 and 12

groups − 1, then readings − groups

Critical value at 0.05

3.8852938

reject equal means when F lands above this

Treatment sum of squares

27.897333

Error sum of squares

17.452

Treatment mean square

13.948667

the spread between the group means

Error mean square

1.4543333

the spread left inside the groups — F is the first of these over the second

SS(Total) = SST + SSE · MST = SST / (k − 1) · MSE = SSE / (N − k) · F = MST / MSE

One-way ANOVA compares three or more group means at once, and it exists because comparing them in pairs does not work: run six t-tests at the five percent level and you have given yourself roughly a one in four chance of finding a difference that is not there. Instead it asks a single question about all the groups together — is the spread between the group means bigger than the spread inside them? Paste one group per line and this page builds the whole ANOVA table, so you can see what the F ratio is made of rather than just what it came to.

How it is calculated

SS(Total) = SST + SSE · MST = SST / (k − 1) · MSE = SSE / (N − k) · F = MST / MSE

The total variation in the data splits cleanly into two pieces: how far the group means sit from the grand mean, and how far the individual readings sit from their own group mean. Divide each by its degrees of freedom and both become variance estimates. If every group really has the same mean, the two estimate the same thing and their ratio should sit near one; if the group means differ, the first grows and the second does not. That ratio follows the F distribution with k − 1 and N − k degrees of freedom, which is where the p-value comes from.

Source: NIST/SEMATECH e-Handbook of Statistical Methods, 7.4.3.3, The ANOVA table and tests of hypotheses about means — resistor differences at three temperatures, five each, give the ANOVA table Treatments SS 27.897 on 2 degrees of freedom with MS 13.949, Error SS 17.452 on 12 degrees of freedom with MS 1.454, F = 9.59; the handbook adds "The p-value for 9.59 is 0.00325"

Questions people ask

A small p-value tells me the means differ. Which ones?
ANOVA does not say. It tests one hypothesis — that all the group means are equal — and rejecting it tells you only that at least one differs from at least one other. Finding out which requires a follow-up designed for the purpose, such as Tukey's procedure or another multiple-comparison method that keeps the overall error rate under control. Running every pair as a t-test afterwards reintroduces exactly the problem ANOVA was there to avoid.
Why not just run t-tests between every pair?
Because each test carries its own chance of a false positive and they add up. With four groups there are six pairs; at the five percent level the chance of at least one spurious difference is about 26 percent rather than 5. ANOVA asks one question at one level and keeps that number honest.
What does the test assume?
Three things: the observations are independent, the values within each group are roughly normal, and the groups have similar spread. The third is the one worth checking, because ANOVA pools all the within-group variation into a single error term — one group far noisier than the rest inflates that term and hides real differences among the others. Compare the group ranges before trusting the F.
Can the groups be different sizes?
Yes. Unequal group sizes are handled properly here: each group mean is weighted by its own count in the treatment sum of squares, and the error degrees of freedom count the total readings minus the number of groups. Balanced designs are more powerful and more robust to unequal spread, but unbalanced ones are perfectly legitimate.
What is the difference between the two mean squares?
The treatment mean square measures how far apart the group means are, scaled by group size. The error mean square measures how noisy the readings are within their own groups, and is the pooled estimate of the underlying variance. F is the first divided by the second, so a large F means the gaps between groups are large compared with the noise you would have to explain them away with.
With two groups, is this the same as a t-test?
Yes, exactly. With two groups the F statistic is the square of the pooled two-sample t statistic and the two p-values agree to the last digit. ANOVA earns its keep from the third group onward, and the two-sided pooled t-test is the easier way to read a two-group comparison.

Sources

The documents this page reads its numbers out of, linked so you can check them yourself.

  1. NIST/SEMATECH e-Handbook of Statistical Methods, 7.4.3.3, The ANOVA table and tests of hypotheses about means — resistor differences at three temperatures, five each, give the ANOVA table Treatments SS 27.897 on 2 degrees of freedom with MS 13.949, Error SS 17.452 on 12 degrees of freedom with MS 1.454, F = 9.59; the handbook adds "The p-value for 9.59 is 0.00325"
  2. NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.7.3, Upper Critical Values of the F Distribution — five percent upper critical values with ν1 numerator and ν2 denominator degrees of freedom: 3.885 at ν1 = 2, ν2 = 12, and 3.098 at ν1 = 3, ν2 = 20; the one percent table gives 6.927 at ν1 = 2, ν2 = 12
  3. NIST/SEMATECH e-Handbook of Statistical Methods, 7.4.3.4, One-way ANOVA calculations — the corrected total is the raw sum of squares less the correction for the mean, CM = (108.1)² / 15 = 779.041, and the group totals are T1 = 26.7, T2 = 38.6, T3 = 42.8 over 15 observations

Related tools

Found a problem, or want more?

A number that disagrees with its source is a defect, not a rounding preference.

What did you enter, what did the tool show, and what did you expect instead? If you have a source that disagrees with ours, a link to it is the most useful thing you can send.

Write to us

Opens your mail app with the page and tool already filled in.