In our real life, there are many situations where we need to compare the means from many groups ($\geqslant 3$), representing many different populations. How do we do this? Intuitively, we just perform t-tests for every pair of them. This is actually not a bad idea when the number of groups ($k$) is small. However, when $k$ becomes large, we have to perform many tests. If you remember the content from the previous lecture, you should understand that this actually increases our chances of making type I errors.

Therefore, we should avoid doing t-tests for all possible pairs. Instead, we investigate where the variation in our data comes from. We will see that the variation, measured by the sum of squares, in the whole data has two origins: the variation within the same group and the variation among different groups. If the variation in the whole data mainly comes from the latter, we say their means are different. This is why we call this procedure Analysis of Variance (ANOVA), but it is actually used to compare means.