How to use it
Type one row per level of factor A, with the cells for the levels of factor B separated by |:
4 5 6 5 | 7 9 8 8 | 10 12 11 11; 3 4 3 2 | 6 5 7 6 | 6 7 5 6
is 2 levels of A × 3 levels of B with 4 values per cell. Read the p-values at the top and the full table below.
Formulas
For a levels of A, b levels of B and r values per cell, with grand mean G, row means Āᵢ, column means B̄ⱼ and cell means x̄ᵢⱼ:
- SS_A = b·r·Σ(Āᵢ − G)², df a − 1
- SS_B = a·r·Σ(B̄ⱼ − G)², df b − 1
- SS_AB = r·Σ(x̄ᵢⱼ − G)² − SS_A − SS_B, df (a − 1)(b − 1)
- SS_E = Σ(x − x̄ᵢⱼ)², df ab(r − 1)
Each MS = SS/df, F = MS/MS_E, and p is the upper tail of the F distribution. Partial η² = SS/(SS + SS_E).
Worked example
A 2 × 2 design with two values per cell: 1 3 | 5 7; 2 4 | 10 12. The cell means are 2, 6 (row A1) and 3, 11 (row A2), G = 5.5, the row means 4 and 7 and the column means 2.5 and 8.5.
- SS_A = 2·2·(1.5² + 1.5²) = 18, SS_B = 2·2·(3² + 3²) = 72
- SS_cells = 2·(3.5² + 0.5² + 2.5² + 5.5²) = 98, so SS_AB = 98 − 18 − 72 = 8
- SS_E = 8 (each value is 1 away from its cell mean), df 4, MS_E = 2
F_A = 18/2 = 9 (p = 0.03994), F_B = 72/2 = 36 (p = 0.003883), F_AB = 8/2 = 4 (p = 0.1161). At α = 0.05 both factors are significant and the interaction is not.
Tips and common mistakes
- Keep the cells in the same order of B levels in every row.
- ANOVA assumes independent observations, roughly normal residuals and similar variances in all cells.
- A significant factor with more than two levels tells you that the means differ, not which ones; follow up with pairwise comparisons and a multiple-testing correction.