FormulaCamp
Completed
12. Statistics and Data Analysis · Hypothesis Testing · 30 min

9. ANOVA: Comparing Three or More Groups

Lesson 9 of 11
Task 1 of 6
  1. In F2:H4, calculate each display's number of days, average, and variance (VAR.S).

Lesson theory

A store chain tries three ways of displaying a product. Comparing them pairwise with t-tests is a bad idea: with three comparisons the chance of finding a "significant" difference by luck is noticeably higher than 5%. For several groups at once, use one-way analysis of variance (ANOVA).

The idea: split the total spread of the data into two parts.

  • SSB (between groups) = Σ nᵢ·(meanᵢ - grand mean)². It shows how much the group means differ from each other;
  • SSW (within groups) = Σ (nᵢ - 1)·varianceᵢ. This is the ordinary "noise" inside each group. In Excel it's VAR.S(group)*(n-1);
  • degrees of freedom: between is k - 1 (k is the number of groups), within is N - k (N is the total number of observations);
  • F = (SSB / (k-1)) / (SSW / (N-k)). If the groups are the same, F is about 1. The larger F is, the bigger the differences.

F.DIST.RT(x, deg_freedom1, deg_freedom2) gives the p-value (the right tail of the F distribution), and F.INV.RT(probability, deg_freedom1, deg_freedom2) gives the critical F. If p is below α, at least one group differs from the others.

ANOVA doesn't tell you which group differs. Next you look at the means and make pairwise comparisons with a correction (for example Bonferroni: divide α by the number of comparisons). In desktop Excel the same calculation is done by the Analysis ToolPak add-in, under Data Analysis › Anova: Single Factor. The simulator doesn't have it, so we use formulas. That way you can see where the numbers come from.

Test yourself

1. Why don't you run ten pairwise t-tests at α = 5% for five groups?
2. ANOVA gave p = 0.002. What can you claim?
3. Without the DEVSQ function, how can you get the sum of squared deviations within a group in Excel?

Practice is part of Pro

The live spreadsheet, task checking and .xlsx files in all 170 lessons. Your progress is saved in this browser; sync across devices is coming soon.