b. ANOVA
Math 115
Do mean vocabulary scores differ across self-identified social class? In 15a we looked at GSS wordsum scores — a 0–10 vocabulary test — for 795 U.S. adults, split into four classes. In the sample, Middle scored highest and Lower lowest:
| Class | n_i | \bar{x}_i | s_i |
|---|---|---|---|
| Lower | 41 | 5.07 | 2.24 |
| Working | 407 | 5.75 | 1.87 |
| Middle | 331 | 6.76 | 1.89 |
| Upper | 16 | 6.19 | 2.34 |
The four sample means clearly differ — but is that real, or just sampling noise? 15a’s ANOVA compares the spread between the class means to the spread within the classes. Next we lay that computation out in a standard ANOVA table.
15a’s arithmetic — sums of squares, mean squares, and F — is conventionally organized into an ANOVA table, the standard summary every stats package (Jamovi included) prints. Read each row left to right: a mean square is that row’s SS over its df, and F is the ratio of the two.
| Source | df | SS | MS | F |
|---|---|---|---|---|
| Between groups (class) | 3 | 236.6 | 78.9 | 21.73 |
| Within groups (residual) | 791 | 2869.8 | 3.63 | |
| Total | 794 | 3106.4 |
Is F \approx 21.73 big enough to reject H_0? We need a reference distribution — the F values we’d expect if H_0 were true.
Under H_0, F follows an F-distribution with two df — df_1 (numerator) and df_2 (denominator); conditions next slide.
For k groups and total sample size n:
df_1 = k - 1 \qquad df_2 = n - k
Try it: what are df_1 and df_2 for the vocabulary ANOVA? Recall k = 4, n = 795.
df_1 = 4 - 1 = 3 and df_2 = 795 - 4 = 791. So we compare F = 21.73 to an F-distribution with df_1 = 3 and df_2 = 791.
Three conditions for the F-distribution to be a valid reference:
| Condition | Rule |
|---|---|
| Independence | Independent within and between groups — random samples or random assignment (else justify from context). |
| Normality | Each group roughly normal, or n_i \geq 30 (CLT covers the means). |
| Equal variance | Group SDs similar — s_{\max} / s_{\min} < 2. |
Try it: do the conditions hold for the vocabulary ANOVA? Recall the smallest group is Upper (n = 16); group SDs range from 1.87 to 2.34.
Independence: GSS random sample ✓. Normality: n_i \geq 30 for Lower, Working, Middle ✓; Upper’s n = 16 is small, but scores are bounded 0–10 with no big outliers — F approximation still OK (mild caution). Equal variance: 2.34 / 1.87 \approx 1.25 < 2 ✓.
pf): p-value < 0.001 — essentially zero, far below 0.05.Results: F = 21.73, df_1 = 3, df_2 = 791, p-value < 0.001 → reject H_0.
In context: mean vocabulary scores differ across self-identified social classes in the U.S. adult population — at least one class mean is different from the others.
Scope of inference.
Heads up: ANOVA tells us at least one class differs from the others — it doesn’t say which classes differ from each other or in which direction. Topic 16a picks up that thread with pairwise follow-ups (and a correction for doing many comparisons).
Does a treatment change plant yield? A controlled experiment grew 30 plants under three conditions — control (ctrl), treatment 1 (trt1), treatment 2 (trt2) — and measured dried weight (Dobson, 1983).
| Group | n_i | \bar{x}_i (g) | s_i (g) |
|---|---|---|---|
| ctrl | 10 | 5.03 | 0.58 |
| trt1 | 10 | 4.66 | 0.79 |
| trt2 | 10 | 5.53 | 0.44 |
Software reports the two sums of squares: SSG = 3.77, SSE = 10.49. With k = 3 groups and n = 30 plants, fill in the rest of the table (each MS = SS/df; F = MSG/MSE):
| Source | df | SS | MS | F |
|---|---|---|---|---|
| Between groups (group) | ?2 | 3.77 | ?1.88 | ?4.85 |
| Within groups (residual) | ?27 | 10.49 | ?0.39 | |
| Total | ?29 | ?14.26 |
Recall: from your table, F \approx 4.85 on df_1 = 2, df_2 = 27. The shaded area to the right of F is the p-value, out of a total area of 1.
Eyeball the shaded tail: is the p-value below \alpha = 0.05? Conclude, with scope.
The shaded tail is a tiny slice of the area → p-value < 0.05 (\approx 0.02), so reject H_0 (moderate). Conclusion: the group means aren’t all equal — at least one condition’s mean yield differs from the others. Scope: random assignment → the difference is causal, for these plants; no random sample → limited generalization.
ANOVA tells us: whether at least one group mean differs from the others — one yes/no question about the whole collection of group means.
ANOVA doesn’t tell us:
Topic 16a (next class — same Friday) picks up where ANOVA leaves off: pairwise comparisons of means, with a correction for the inflated error from running many comparisons — the problem from the start of 15a.
ANOVA is the natural generalization of the two-sample (independent-means) t-test from topic 12:
| Two Means (Topic 12) | Multiple Means (Topic 15) | |
|---|---|---|
| Number of groups | exactly 2 | 3 or more |
| Statistic | \bar{x}_1 - \bar{x}_2 | F = MSG / MSE |
| Reference distribution | t with df = n - 2 | F with df_1 = k-1, df_2 = n-k |
| What we test | \mu_1 = \mu_2 | \mu_1 = \mu_2 = \cdots = \mu_k |
| Tail(s) used for p-value | One- or two-sided, depending on H_A | Always right tail |
For k = 2 groups the two methods are equivalent — the two-sided t-test p-value matches the ANOVA p-value exactly, and F = T^2.