
Two-way ANOVA
We could extend our initial example (a website with different color palettes) to something slightly more complex: instead of having just one factor (color), we could have another one (actually, we could have even more than two). For example, we could add the font type that was used on the website and study how those two factors (color and font type) impact the number of purchases that are made. Unfortunately, this adds an extra complication, because one effect might depend on the levels for the other one: for example, the font type might be relevant to explain the number of purchases, but only when the color is red.
The effects for the color and website are usually referred to as main effects, and the interaction between them is referred to as the interaction effect. Before analyzing the main effects, we should always study the interaction effect first: if it is found to be significant, we can't really look at the main effects, since the factors involved in the interaction won't have an effect when taken in isolation.
There are actually three ways of calculating the sum of squares, which are usually referred to as Type1, Type2, and Type3 sum of squares. If the underlying design is balanced, the three ways are equivalent and yield the same results. When it is unbalanced, the three of them will differ. A balanced design is one where the number of observations for each combination of effects is the same.