You now have two estimates of the variability in the population: the within-groups mean square and the between-groups mean square. The within-groups mean square is based on how much the observations within each of the groups vary. The between-groups mean square is based on how much the group means vary among themselves . If the null hypothesis is true, the two numbers should be close to each other. If we divide one by the other, the ratio should be close to one.
The statistical test for the null hypothesis that all of the groups have the same mean in the population is based on computing such a ratio. It is called an F statistic. You take the between-groups mean square and divide it by the within-groups mean square as shown in the following formula:
F = between-groups mean square/within-groups mean square