MaizePrepSTATS 250
Exam 3 · Lec 15

One-way ANOVA

Compare a quantitative response across three or more groups: the F statistic as a ratio of two kinds of variation, its right-tail p-value, and Tukey intervals to find which groups differ.

30 min

Key ideas

When to use it

Quantitative response, categorical explanatory variable with three or more groups (e.g. GPA across three colleges). With exactly two groups a two-sample t-test is enough. Running a t-test for every pair instead adds a false-positive chance with each test; ANOVA tests all the means at once.

The two things ANOVA looks at

In side-by-side boxplots: (1) how far apart the group means are, and (2) how variable the responses are within each group. Means that look far apart are weak evidence if each group is very spread out.

Hypotheses

H0:μ1=μ2=⋯=μkH_0: \mu_1 = \mu_2 = \cdots = \mu_k (no association: the population means are all equal). HaH_a: at least one population mean differs. The alternative is always that sentence; it never says which group, or that all differ.

F statistic

A ratio: variation between the group means divided by variation within the groups. Define it in words: "the variation among the sample means was F times as large as the variation within groups." Unlike z or t, it does not count standard errors from a null value.

Example F = 10: the numerator is 10 times as large as the denominator.

F distribution and p-value

F is a ratio of variances, so it is never negative. Its distribution starts at 0 and is skewed right, and the p-value is always the area to the right of the observed F (no two-sided version). Larger F, smaller p, stronger evidence.

Tukey's procedure

After a small ANOVA p-value, Tukey builds a confidence interval for each pair's difference in population means. Read lwr and upr: an interval containing 0 gives no evidence of a difference for that pair; an interval entirely above or below 0 gives evidence of a difference, in the direction of the subtraction order.

What to know

Hypotheses
H0:μ1=μ2=⋯=μkHa: at least one μi differsH_0:\mu_1=\mu_2=\cdots=\mu_k\qquad H_a:\ \text{at least one }\mu_i\text{ differs}
F, in words
F=variation between the group meansvariation within the groupsF=\frac{\text{variation between the group means}}{\text{variation within the groups}}
Lecture: you will never compute F by hand; R reports it.
p-value
p=P(F≥Fobs∣H0)p=P(F\ge F_{obs}\mid H_0)
Always the right tail of a right-skewed F curve.

Which procedure?

Quantitative response, two groups
Two-sample (Welch) t-test or interval.
Quantitative response, three or more groups
One-way ANOVA: read F and its p-value.
ANOVA p-value is small and you need to know which groups differ
Tukey intervals: check which contain 0, and keep the subtraction order.
Both variables are categorical
Conditional proportions and a chi-square test (Lec 21–22), not ANOVA.
Worked example

Study breaks and quiz scores: the F test

A tutoring center randomly assigns 60 volunteer students (20 per group) to one of three 5-minute study breaks before a 10-point memory quiz: no break (none), a walk (walk), or phone scrolling (scroll). Sample mean scores: none 6.1, scroll 5.9, walk 7.5. Is break type associated with mean quiz score? This is an original example with composed R output.

summary(aov(score ~ breaktype, data = breaks))
            Df Sum Sq Mean Sq F value   Pr(>F)   
breaktype    2   30.4    15.2     7.6 0.001186 **
Residuals   57  114.0     2.0
  1. Hypotheses. H0:μnone=μwalk=μscrollH_0: \mu_{none} = \mu_{walk} = \mu_{scroll} versus HaH_a: at least one population mean differs. μwalk\mu_{walk} is the true mean quiz score for all students like these who take a 5-minute walk before the quiz.

  2. Read two numbers only. F = 7.6 and its p-value 0.001186. The Df, Sum Sq and Mean Sq columns are intermediate calculations you can ignore in STATS 250.

  3. Define F. The variation among the three sample mean quiz scores was 7.6 times as large as the variation in individual scores within the break groups.

  4. p-value. Assuming all three population means are equal, the probability of an F statistic of 7.6 or larger is about 0.0012: the right tail of the F curve.

  5. Conclude, and stop there. p ≤ 0.01, so very strong evidence that at least one population mean quiz score differs among the break types. The F test cannot say which one; the plot suggests the walk, but that needs Tukey.

Answer

Very strong evidence (p ≈ 0.0012) that at least one break type has a different population mean quiz score. Random assignment supports a causal reading for students like these volunteers; which break differs needs a follow-up.

Worked example

Study breaks: which pairs differ? (Tukey)

Use the Tukey output for the same study to say which break types differ in population mean quiz score, and in which direction.

TukeyHSD(aov(score ~ breaktype, data = breaks))
  Tukey multiple comparisons of means
    95% family-wise confidence level

$breaktype
                diff        lwr      upr   p adj
scroll-none     -0.2 -1.2761829 0.8761829 0.8958
walk-none        1.4  0.3238171 2.4761829 0.0076
walk-scroll      1.6  0.5238171 2.6761829 0.0020
  1. Read only lwr and upr. Each row is a 95% interval for the first-named group's population mean minus the second's.

  2. scroll − none: (-1.28, 0.88) contains 0: no evidence that scrolling and no break differ.

  3. walk − none: (0.32, 2.48) is entirely positive: evidence the walk's population mean score is higher than no break's.

  4. walk − scroll: (0.52, 2.68) is entirely positive: evidence the walk's mean is higher than scrolling's.

  5. Put it together. The walk group differs from both others; scrolling and no break do not appear to differ. That pinpoints what the ANOVA conclusion could only call "at least one".

Answer

The population mean quiz score appears higher after a walk than after no break (by about 0.32 to 2.48 points) or after scrolling (0.52 to 2.68 points). There is no evidence of a difference between scrolling and no break, which does not mean they are exactly equal.

Check yourself

1
Lec 15

A researcher wants to know whether mean daily screen time differs among first-years, sophomores, juniors and seniors, using a random sample from each class year. Which approach fits, and why?

2
Lec 15

Mean battery life is compared across three phone brands. Which pair of hypotheses is written correctly?

3
Lec 15

Select every true statement about the F statistic and its p-value.

4
Lec 15

An ANOVA comparing mean delivery time across three couriers gives F = 2.8 with p = 0.07. Which conclusion fits the course scale?

5
Lec 15

After an ANOVA on plant height for fertilizers A, B and C, Tukey gives these 95% intervals: B − A (1.2, 4.8) cm, C − A (−0.9, 2.7) cm, C − B (−3.9, −0.3) cm. Select every conclusion the intervals support.

6
Lec 15

A study compares mean reaction time across three caffeine doses. Which change, with everything else the same, would make the F statistic larger?

MaizePrep is an independent study resource. It is not affiliated with, sponsored by, or endorsed by the University of Michigan. Course names and numbers are used only to describe which class the material covers. Every practice question is original, written in the style of the course.