StatisticsInference for Regression and Several Means2 of 3
Inference for Regression and Several Means · 2

One-Way ANOVA

We know how to compare two group averages with a two-sample tt-test, and now we want to test whether three or more groups have different population means without running separate tests on every pair.

1

Why ANOVA Compares Means Using Spread

Suppose we compare three study methods (re-reading notes in Group A, flashcards in Group B, and practice tests in Group C) and want to know whether their true population means μA\param{\mu_A}, μB\param{\mu_B}, and μC\param{\mu_C} are equal or whether at least one method has a different mean:

H0:μA\displaystyle H_0: \param{\mu_A} =μB\displaystyle = \param{\mu_B} =μC\displaystyle = \param{\mu_C}
Ha:At least one μ is different\displaystyle H_a: \text{At least one } \param{\mu} \text{ is different}

We write HaH_a in words rather than μA≠μB≠μC\param{\mu_A} \neq \param{\mu_B} \neq \param{\mu_C} because the population means do not all have to differ from one another to make H0H_0 false. Even if two of the true means are tied at 75\param{75} and only the third sits at 88\param{88}, H0H_0 is already false. Running separate two-sample tt-tests on every pair of groups at the 5%\risk{5\%} level would build up our 5%\risk{5\%} risk of a false alarm with every test we run, so One-Way ANOVA tests all the groups at once by comparing two kinds of spread.

Why ANOVA Compares Means Using Spread
A\htmlClass{lc-ink}{\text{A}}
B\htmlClass{lc-ink}{\text{B}}
C\htmlClass{lc-ink}{\text{C}}
xˉA=75\groupmean{\bar{x}_A} = \groupmean{75}
xˉB=80\groupmean{\bar{x}_B} = \groupmean{80}
xˉC=88\groupmean{\bar{x}_C} = \groupmean{88}
60\htmlClass{lc-ink}{60}
70\htmlClass{lc-ink}{70}
80\htmlClass{lc-ink}{80}
90\htmlClass{lc-ink}{90}
100\htmlClass{lc-ink}{100}
A\htmlClass{lc-ink}{\text{A}}
B\htmlClass{lc-ink}{\text{B}}
C\htmlClass{lc-ink}{\text{C}}
xˉ\htmlClass{lc-blue}{\bar{x}}
75\htmlClass{lc-blue}{75}
80\htmlClass{lc-blue}{80}
88\htmlClass{lc-blue}{88}
±1\htmlClass{lc-orange}{\pm 1}
50\htmlClass{lc-ink}{50}
60\htmlClass{lc-ink}{60}
70\htmlClass{lc-ink}{70}
80\htmlClass{lc-ink}{80}
90\htmlClass{lc-ink}{90}
100\htmlClass{lc-ink}{100}
110\htmlClass{lc-ink}{110}
A\htmlClass{lc-ink}{\text{A}}
B\htmlClass{lc-ink}{\text{B}}
C\htmlClass{lc-ink}{\text{C}}
xˉ\htmlClass{lc-blue}{\bar{x}}
75\htmlClass{lc-blue}{75}
80\htmlClass{lc-blue}{80}
88\htmlClass{lc-blue}{88}
±25\htmlClass{lc-orange}{\pm 25}
50\htmlClass{lc-ink}{50}
60\htmlClass{lc-ink}{60}
70\htmlClass{lc-ink}{70}
80\htmlClass{lc-ink}{80}
90\htmlClass{lc-ink}{90}
100\htmlClass{lc-ink}{100}
110\htmlClass{lc-ink}{110}

To judge whether the gap between sample averages is real or just random luck, the F\fstat{F}-statistic divides the spread between the group averages by the spread inside the groups:

F\displaystyle \fstat{F} =Spread Between Groups (Signal)Spread Within Groups (Noise)\displaystyle = \frac{\signal{\text{Spread Between Groups (Signal)}}}{\noise{\text{Spread Within Groups (Noise)}}}

With the group averages fixed at 75\groupmean{75}, 80\groupmean{80}, and 88\groupmean{88}, tightly packed scores inside each group keep the within-group noise small and make F\fstat{F} large, while widely spread scores overlap across groups and shrink F\fstat{F} toward 0\fstat{0}.

Even when the group averages stay put, spreading out the dots inside each group grows the noise and shrinks F\fstat{F} without changing the signal between groups.
2

Building the F\fstat{F}-Statistic from Raw Data

Now we want to turn raw scores into a single number for average signal and a single number for average noise so we can calculate F\fstat{F}. We will build both numbers from three groups of 33 students: Group A (2,3,42, 3, 4), Group B (5,6,75, 6, 7), and Group C (8,9,108, 9, 10).

Building the F-Statistic from Raw Data
A\htmlClass{lc-ink}{\text{A}}
B\htmlClass{lc-ink}{\text{B}}
C\htmlClass{lc-ink}{\text{C}}
xˉA=3\groupmean{\bar{x}_A} = \groupmean{3}
xˉB=6\groupmean{\bar{x}_B} = \groupmean{6}
xˉC=9\groupmean{\bar{x}_C} = \groupmean{9}
0\htmlClass{lc-ink}{0}
2\htmlClass{lc-ink}{2}
4\htmlClass{lc-ink}{4}
6\htmlClass{lc-ink}{6}
8\htmlClass{lc-ink}{8}
10\htmlClass{lc-ink}{10}
12\htmlClass{lc-ink}{12}
F=?\fstat{F} = {?}
Text solution
Grand Mean and total spread (SStotalSS_{\text{total}})Across all N=9N = 9 people, the overall average (the Grand Mean) is 6\grandmean{6}, and adding every score's squared distance from 6\grandmean{6} gives the Total Sum of Squares.
Grand Mean=2+3+4+5+6+7+8+9+109=549=6\displaystyle \begin{aligned}\grandmean{\text{Grand Mean}} &= \frac{\begin{gathered}2 + 3 + 4 + 5 + 6 \\ {} + 7 + 8 + 9 + 10\end{gathered}}{9} \\ &= \frac{54}{9} = \grandmean{6}\end{aligned}
SStotal=(16+9+4)⏟Group A+(1+0+1)⏟Group B+(4+9+16)⏟Group C=60\displaystyle \begin{aligned}SS_{\text{total}} &= \underbrace{(16 + 9 + 4)}_{\text{Group A}} \\ &+ \underbrace{(1 + 0 + 1)}_{\text{Group B}} \\ &+ \underbrace{(4 + 9 + 16)}_{\text{Group C}} \\ &= 60\end{aligned}
Noise inside the groups (SSwithin\noise{SS_{\text{within}}})Adding the squared distances of the scores from their own group averages (xˉA=3\groupmean{\bar{x}_A} = \groupmean{3}, xˉB=6\groupmean{\bar{x}_B} = \groupmean{6}, and xˉC=9\groupmean{\bar{x}_C} = \groupmean{9}) measures how much people vary inside their own group.
SSwithin=(1+0+1)⏟from xˉA=3+(1+0+1)⏟from xˉB=6+(1+0+1)⏟from xˉC=9=2+2+2=6\displaystyle \begin{aligned}\noise{SS_{\text{within}}} &= \underbrace{\noise{(1 + 0 + 1)}}_{\text{from }\groupmean{\bar{x}_A} = \groupmean{3}} \\ &+ \underbrace{\noise{(1 + 0 + 1)}}_{\text{from }\groupmean{\bar{x}_B} = \groupmean{6}} \\ &+ \underbrace{\noise{(1 + 0 + 1)}}_{\text{from }\groupmean{\bar{x}_C} = \groupmean{9}} \\ &= \noise{2} + \noise{2} + \noise{2} = \noise{6}\end{aligned}
Signal between the groups (SSbetween\signal{SS_{\text{between}}})Replacing each person's score with their group average and adding the squared distances from the Grand Mean of 6\grandmean{6} measures how far the groups sit from one another, splitting the total spread cleanly into 54⏟Signal (SSbetween)+6⏟Noise (SSwithin)=60⏟Total (SStotal)\underbrace{\signal{54}}_{\signal{\begin{gathered}\text{Signal } \\ (SS_{\text{between}})\end{gathered}}} + \underbrace{\noise{6}}_{\noise{\begin{gathered}\text{Noise } \\ (SS_{\text{within}})\end{gathered}}} = \underbrace{60}_{\begin{gathered}\text{Total } \\ (SS_{\text{total}})\end{gathered}}.
SSbetween=3(3−6)2+3(6−6)2+3(9−6)2=27+0+27=54\displaystyle \begin{aligned}\signal{SS_{\text{between}}} &= 3(\groupmean{3} - \grandmean{6})^2 \\ &+ 3(\groupmean{6} - \grandmean{6})^2 \\ &+ 3(\groupmean{9} - \grandmean{6})^2 \\ &= \signal{27} + \signal{0} + \signal{27} = \signal{54}\end{aligned}
Average signal, average noise, and F\fstat{F}Dividing each sum of squares by its degrees of freedom (dfbetween=k−1df_{\text{between}} = k - 1 for k=3k = 3 groups and dfwithin=N−kdf_{\text{within}} = N - k across N=9N = 9 people) puts the average signal over the average noise.
MSbetween=SSbetweenk−1=543−1=542=27\displaystyle \begin{aligned}\signal{MS_{\text{between}}} &= \frac{\signal{SS_{\text{between}}}}{k - 1} \\ &= \frac{\signal{54}}{3 - 1} = \frac{\signal{54}}{2} = \signal{27}\end{aligned}
MSwithin=SSwithinN−k=69−3=66=1\displaystyle \begin{aligned}\noise{MS_{\text{within}}} &= \frac{\noise{SS_{\text{within}}}}{N - k} \\ &= \frac{\noise{6}}{9 - 3} = \frac{\noise{6}}{6} = \noise{1}\end{aligned}
F\displaystyle \fstat{F} =MSbetweenMSwithin\displaystyle = \frac{\signal{MS_{\text{between}}}}{\noise{MS_{\text{within}}}} =271\displaystyle = \frac{\signal{27}}{\noise{1}} =27\displaystyle = \fstat{27}

So the average signal between the three study groups is 27\fstat{27} times the average person-to-person noise inside the groups.

Shifting an entire group's cluster of scores left or right changes the distances between the group averages (SSbetween\signal{SS_{\text{between}}}) while leaving the spacing inside each group (SSwithin\noise{SS_{\text{within}}}) unchanged, and at every position SSbetween+SSwithin\signal{SS_{\text{between}}} + \noise{SS_{\text{within}}} equals SStotalSS_{\text{total}}.

Sliding whole groups apart or together changes only the between-group signal while the within-group noise stays the same, and the two always add up to the total spread.
3

The F\fstat{F}-Distribution and the p\pval{p}-Value

Next, we need to turn F=27\fstat{F} = \fstat{27} into a p\pval{p}-value: the probability of getting an F\fstat{F}-statistic at least this large by random chance when all three study methods actually have the same population mean.

The F-Distribution and the p-Value
SS\htmlClass{lc-mute}{\text{SS}}
df\htmlClass{lc-mute}{\text{df}}
MS\htmlClass{lc-mute}{\text{MS}}
÷\htmlClass{lc-mute}{\div}
=\htmlClass{lc-mute}{=}
Between\signal{\text{Between}}
54\signal{54}
22
27\signal{27}
Within\noise{\text{Within}}
6\noise{6}
66
1\noise{1}
F=27p=?\begin{aligned} \fstat{F} &= \fstat{27} \\[4pt] \pval{p} &= {?} \end{aligned}

When H0H_0 is true, the sample averages differ only because of random person-to-person noise, so the top and bottom of F\fstat{F} measure the same random variation:

When H0 is true:F\displaystyle \text{When } H_0 \text{ is true:}\quad \fstat{F} =NoiseNoise≈1\displaystyle = \frac{\noise{\text{Noise}}}{\noise{\text{Noise}}} \approx \fstat{1}

To find the p\pval{p}-value, we look up our test statistic on the F(dfbetween⏟top df,dfwithin⏟bottom df)F(\underbrace{df_{\text{between}}}_{\text{top }df}, \underbrace{df_{\text{within}}}_{\text{bottom }df}) distribution, always listing the numerator degrees of freedom first and the denominator degrees of freedom second.

0\htmlClass{lc-ink}{0}
2\htmlClass{lc-ink}{2}
4\htmlClass{lc-ink}{4}
6\htmlClass{lc-ink}{6}
8\htmlClass{lc-ink}{8}
25\htmlClass{lc-ink}{25}
30\htmlClass{lc-ink}{30}
1\htmlClass{lc-violet}{1}
F\htmlClass{lc-blue}{F}
F(2, 6)\htmlClass{lc-ink}{F(2,\,6)}
27\htmlClass{lc-blue}{27}
25\htmlClass{lc-mute}{25}
30\htmlClass{lc-mute}{30}
27\htmlClass{lc-blue}{27}
heights×4000\htmlClass{lc-mute}{\text{heights} \times 4000}
p=0.001\htmlClass{lc-green}{p = 0.001}

On the F(2,6)F(2, 6) curve, the right-tail area past F=27\fstat{F} = \fstat{27} is p=0.001<0.05\pval{p = 0.001} < \risk{0.05}, so we reject H0H_0 and conclude that at least one study method has a different true population mean.

4

Computing ANOVA from a Summary Table

Often we aren't given individual raw scores; instead, we want to compute F\fstat{F} from a summary table of group sizes (nn), sample means (xˉ\groupmean{\bar{x}}), and sample standard deviations (s\noise{s}), often with unequal group sizes.

Even without the raw scores, we can get each group's sum of squares directly from its standard deviation s\noise{s}. Because a sample variance s2\noise{s^2} is that group's sum of squares divided by n−1n - 1, multiplying s2\noise{s^2} by n−1n - 1 gives the group's sum of squares back:

s2=Group’s Sum of Squaresn−1  ⟹  Group’s Sum of Squares=(n−1)s2\displaystyle \begin{aligned}&\noise{s^2} = \frac{\noise{\text{Group's Sum of Squares}}}{n - 1} \\ &\implies \noise{\text{Group's Sum of Squares}} \\ &\qquad = (n - 1)\noise{s^2}\end{aligned}

Now let's use this shortcut on N=18N = 18 students split unevenly across our three study groups: Group A (nA=4,xˉA=70,sA=5n_A = 4, \groupmean{\bar{x}_A} = \groupmean{70}, \noise{s_A} = \noise{5}), Group B (nB=6,xˉB=80,sB=4n_B = 6, \groupmean{\bar{x}_B} = \groupmean{80}, \noise{s_B} = \noise{4}), and Group C (nC=8,xˉC=85,sC=5n_C = 8, \groupmean{\bar{x}_C} = \groupmean{85}, \noise{s_C} = \noise{5}).

Computing ANOVA from a Summary Table
n\htmlClass{lc-ink}{n}
xˉ\htmlClass{lc-blue}{\bar{x}}
s\htmlClass{lc-orange}{s}
ARe-reading\text{A}\enspace\text{Re-reading}
4\htmlClass{lc-ink}{4}
70\htmlClass{lc-blue}{70}
5\htmlClass{lc-orange}{5}
BFlashcards\text{B}\enspace\text{Flashcards}
6\htmlClass{lc-ink}{6}
80\htmlClass{lc-blue}{80}
4\htmlClass{lc-orange}{4}
CPractice tests\text{C}\enspace\text{Practice tests}
8\htmlClass{lc-ink}{8}
85\htmlClass{lc-blue}{85}
5\htmlClass{lc-orange}{5}
N=18\htmlClass{lc-ink}{N = 18}
F=?\fstat{F} = {?}
Text solution
Weighted Grand MeanBecause the groups have different sizes, we weight each group mean by its sample size nn to add up all 14401440 points across the 1818 students rather than taking the simple average of 70\groupmean{70}, 80\groupmean{80}, and 85\groupmean{85}.
Grand Mean=4(70)+6(80)+8(85)4+6+8=280+480+68018=144018=80\displaystyle \begin{aligned}&\grandmean{\text{Grand Mean}} \\ &= \frac{4(\groupmean{70}) + 6(\groupmean{80}) + 8(\groupmean{85})}{4 + 6 + 8} \\ &= \frac{280 + 480 + 680}{18} \\ &= \frac{1440}{18} = \grandmean{80}\end{aligned}
Between-group mean square (MSbetween\signal{MS_{\text{between}}})Multiplying each group's squared distance from the Grand Mean of 80\grandmean{80} by its group size nn and dividing by dfbetween=3−1=2df_{\text{between}} = 3 - 1 = 2 gives the average signal.
SSbetween=4(70−80)2+6(80−80)2+8(85−80)2=400+0+200=600\displaystyle \begin{aligned}\signal{SS_{\text{between}}} &= 4(\groupmean{70} - \grandmean{80})^2 \\ &+ 6(\groupmean{80} - \grandmean{80})^2 \\ &+ 8(\groupmean{85} - \grandmean{80})^2 \\ &= \signal{400} + \signal{0} + \signal{200} = \signal{600}\end{aligned}
MSbetween=SSbetweenk−1=6003−1=6002=300\displaystyle \begin{aligned}\signal{MS_{\text{between}}} &= \frac{\signal{SS_{\text{between}}}}{k - 1} \\ &= \frac{\signal{600}}{3 - 1} = \frac{\signal{600}}{2} = \signal{300}\end{aligned}
Within-group mean square (MSwithin\noise{MS_{\text{within}}})Multiplying each group's variance s2\noise{s^2} by n−1n - 1 gives the sum of squares inside each group, and dividing their total by dfwithin=18−3=15df_{\text{within}} = 18 - 3 = 15 gives the average noise.
SSwithin=(4−1)(52)⏟Group A+(6−1)(42)⏟Group B+(8−1)(52)⏟Group C=75+80+175=330\displaystyle \begin{aligned}\noise{SS_{\text{within}}} &= \underbrace{(4 - 1)(\noise{5^2})}_{\text{Group A}} \\ &+ \underbrace{(6 - 1)(\noise{4^2})}_{\text{Group B}} \\ &+ \underbrace{(8 - 1)(\noise{5^2})}_{\text{Group C}} \\ &= \noise{75} + \noise{80} + \noise{175} = \noise{330}\end{aligned}
MSwithin=SSwithinN−k=33018−3=33015=22\displaystyle \begin{aligned}\noise{MS_{\text{within}}} &= \frac{\noise{SS_{\text{within}}}}{N - k} \\ &= \frac{\noise{330}}{18 - 3} = \frac{\noise{330}}{15} = \noise{22}\end{aligned}
F\fstat{F}-statisticDividing the average signal by the average noise gives our test statistic for the F(2,15)F(2, 15) distribution.
F\displaystyle \fstat{F} =MSbetweenMSwithin\displaystyle = \frac{\signal{MS_{\text{between}}}}{\noise{MS_{\text{within}}}} =30022≈13.64\displaystyle = \frac{\signal{300}}{\noise{22}} \approx \fstat{13.64}
In the right tail of the F(2,15)F(2, 15) curve, the area past F≈13.64\fstat{F} \approx \fstat{13.64} is p=0.0004<0.05\pval{p = 0.0004} < \risk{0.05}, so we reject H0H_0 and conclude that at least one study method has a different true population mean.
Notice two practical details when interpreting and checking an ANOVA test:
Rejecting H0H_0 gives evidence that at least one population mean differs from the others, but it does not tell you which specific pair differs (such as whether Group C beat Group B). Finding out which pairs differ requires follow-up pairwise comparisons.
Because MSwithin=22\noise{MS_{\text{within}}} = \noise{22} is a weighted average of the individual group variances (25\noise{25}, 16\noise{16}, and 25\noise{25}), combining them into one noise number requires that the groups have roughly similar spreads in the population, along with independent samples from roughly normal populations.

With the group means fixed at 70\groupmean{70}, 80\groupmean{80}, and 85\groupmean{85} and the group standard deviations fixed at 5\noise{5}, 4\noise{4}, and 5\noise{5}, having more students in a group pulls both the Grand Mean balance point and the pooled noise MSwithin\noise{MS_{\text{within}}} toward that group's values.

When study groups have different sizes, the largest group pulls both the Grand Mean and the pooled variance toward its own average and spread.

Key concepts

When you compare the averages of two groups, a single two-sample tt-test is all you need. Once you have k≥3k \ge 3 groups, running separate tt-tests on every pair builds up the 5%\risk{5\%} false-alarm risk, so use One-Way ANOVA to test H0:μ1=μ2=⋯=μkH_0: \param{\mu_1} = \param{\mu_2} = \dots = \param{\mu_k} against Ha:at least one μ is differentH_a: \text{at least one }\param{\mu}\text{ is different} in a single right-tailed test (assuming independent samples from roughly normal populations with similar spreads).

ANOVA splits the total squared spread around the Grand Mean into between-group signal and within-group noise:

SStotal⏟60\displaystyle \underbrace{SS_{\text{total}}}_{60} =SSbetween⏟54+SSwithin⏟6\displaystyle = \underbrace{\signal{SS_{\text{between}}}}_{\signal{54}} + \underbrace{\noise{SS_{\text{within}}}}_{\noise{6}}

To compare signal and noise fairly across kk groups and NN total observations, divide each sum of squares by its degrees of freedom (dfbetween=k−1df_{\text{between}} = k - 1 and dfwithin=N−kdf_{\text{within}} = N - k) and take their ratio on the F(k−1,N−k)F(k - 1, N - k) distribution:

F=MSbetweenMSwithin=SSbetweenk−1SSwithinN−k\displaystyle \begin{aligned}\fstat{F} &= \frac{\signal{MS_{\text{between}}}}{\noise{MS_{\text{within}}}} \\ &= \frac{\tfrac{\signal{SS_{\text{between}}}}{k - 1}}{\tfrac{\noise{SS_{\text{within}}}}{N - k}}\end{aligned}

When working from a summary table with unequal group sizes (nA=4,nB=6,nC=8n_A = 4, n_B = 6, n_C = 8), weight each group by nn when finding the Grand Mean and SSbetween\signal{SS_{\text{between}}}, and recover each group's sum of squares from its standard deviation using (n−1)s2(n - 1)\noise{s^2} (for example, (4−1)(52)=75(4 - 1)(\noise{5^2}) = \noise{75}). An F\fstat{F}-value near 1\fstat{1} means the between-group spread looks just like random noise; a large F\fstat{F}-value in the right tail gives a small p\pval{p}-value and convincing evidence that at least one population mean is different, though follow-up pairwise comparisons are still needed to tell which specific pairs differ.

5

Practice

1

A researcher wants to compare the average recovery time across 44 physical therapy programs. (a) Why should the researcher run one One-Way ANOVA instead of separate two-sample tt-tests for every pair of programs at the 5%\risk{5\%} significance level? (b) State the null and alternative hypotheses for the ANOVA test, and explain why the alternative is not written as μ1≠μ2≠μ3≠μ4\param{\mu_1} \neq \param{\mu_2} \neq \param{\mu_3} \neq \param{\mu_4}. (c) If the ANOVA test gives p=0.008\pval{p = 0.008}, what can the researcher conclude at the 5%\risk{5\%} significance level, and does this test alone tell them whether Program 1 beats Program 2?

For (a), think about what happens to the 5%\risk{5\%} chance of a false alarm when you run multiple separate tests. For (b), ask whether all four programs have to differ from one another for H0H_0 to be false.

(a) Running separate two-sample tt-tests for every pair of programs at the 5%\risk{5\%} level builds up the 5%\risk{5\%} risk of a false alarm across the multiple tests, making the overall chance of getting at least one false alarm much higher than 5%\risk{5\%}. (b) The hypotheses are:
H0:μ1\displaystyle H_0: \param{\mu_1} =μ2\displaystyle = \param{\mu_2} =μ3\displaystyle = \param{\mu_3} =μ4\displaystyle = \param{\mu_4}
Ha:At least one μ is different\displaystyle H_a: \text{At least one } \param{\mu} \text{ is different}
(Watch out for the common mistake of writing Ha:μ1≠μ2≠μ3≠μ4H_a: \param{\mu_1} \neq \param{\mu_2} \neq \param{\mu_3} \neq \param{\mu_4}. The group means do not all have to differ from each other to make H0H_0 false: even if three programs are tied and only one is different, H0H_0 is false.) (c) Because p=0.008<0.05\pval{p = 0.008} < \risk{0.05}, we reject H0H_0 and conclude that at least one physical therapy program has a different true mean recovery time. However, the ANOVA FF-test alone does not tell us whether Program 1 beats Program 2; follow-up pairwise comparisons are needed to tell which specific pairs differ.
2

Two studies each compare 33 teaching methods with 1010 students per group (N=30N = 30 total). In both studies, the three sample means are 72\groupmean{72}, 78\groupmean{78}, and 84\groupmean{84}. In Study 1, scores inside each group stay within 2\noise{2} points of their group mean; in Study 2, scores inside each group spread 25\noise{25} points above and below their group mean. (a) Without calculating, which study produces a larger F\fstat{F}-statistic and smaller p\pval{p}-value, and why? (b) In a third study with the same design, the researcher finds F=0.96\fstat{F} = \fstat{0.96}. What does an F\fstat{F}-value near 1\fstat{1} indicate, and which FF-distribution and tail are used to find the p\pval{p}-value?

Compare the between-group signal and within-group noise in F=SignalNoise\fstat{F} = \tfrac{\signal{\text{Signal}}}{\noise{\text{Noise}}} for the two studies, and remember how dfbetweendf_{\text{between}} and dfwithindf_{\text{within}} are ordered in F(dfbetween,dfwithin)F(df_{\text{between}}, df_{\text{within}}).

(a) Study 1 produces the larger F\fstat{F}-statistic and smaller p\pval{p}-value. Both studies have the exact same between-group signal (sample means of 72\groupmean{72}, 78\groupmean{78}, and 84\groupmean{84}), but Study 1 has much smaller within-group noise, which makes the ratio F=SignalNoise\fstat{F} = \tfrac{\signal{\text{Signal}}}{\noise{\text{Noise}}} much larger. (b) An F\fstat{F}-value near 1\fstat{1} indicates that the spread between the group averages is about the same size as the random person-to-person noise inside the groups, which is what we expect when H0H_0 is true. With k=3k = 3 groups and N=30N = 30 students, dfbetween=3−1=2df_{\text{between}} = 3 - 1 = 2 and dfwithin=30−3=27df_{\text{within}} = 30 - 3 = 27. (Be careful not to use N−1=29N - 1 = 29 for the bottom degrees of freedom or double the tail area for a two-tailed test, which are common mistakes.) Because squared distances make all differences positive, the p\pval{p}-value is the area in the right tail of the F(2,27)F(2, 27) distribution.
3

Three fertilizer formulas are tested on 33 plants each, giving the following height gains (in cm): Group A: 1,2,31, 2, 3; Group B: 3,4,53, 4, 5; Group C: 8,9,108, 9, 10. Find the Grand Mean, SStotalSS_{\text{total}}, SSwithin\noise{SS_{\text{within}}}, SSbetween\signal{SS_{\text{between}}}, dfbetweendf_{\text{between}}, dfwithindf_{\text{within}}, MSbetween\signal{MS_{\text{between}}}, MSwithin\noise{MS_{\text{within}}}, and the F\fstat{F}-statistic, and verify that SSbetween+SSwithin=SStotal\signal{SS_{\text{between}}} + \noise{SS_{\text{within}}} = SS_{\text{total}}.

Find each group's average and the Grand Mean across all 99 plants first; when computing SSbetween\signal{SS_{\text{between}}}, remember that we count that group's squared distance from the Grand Mean once for each plant in the group.

The group means are xˉA=2\groupmean{\bar{x}_A} = \groupmean{2}, xˉB=4\groupmean{\bar{x}_B} = \groupmean{4}, and xˉC=9\groupmean{\bar{x}_C} = \groupmean{9}, and the Grand Mean across all N=9N = 9 plants is:
Grand Mean=1+2+3+3+4+5+8+9+109=459=5\displaystyle \begin{aligned}\grandmean{\text{Grand Mean}} &= \frac{1 + 2 + 3 + 3 + 4 + 5 + 8 + 9 + 10}{9} \\ &= \frac{45}{9} = \grandmean{5}\end{aligned}
Adding the squared distances of all 99 plants from the Grand Mean of 5\grandmean{5} gives SStotalSS_{\text{total}}:
SStotal=(16+9+4)+(4+1+0)+(9+16+25)=84\displaystyle \begin{aligned}SS_{\text{total}} &= (16 + 9 + 4) + (4 + 1 + 0) + (9 + 16 + 25) \\ &= 84\end{aligned}
Inside each group, the squared distances from the group's own mean (xˉA=2\groupmean{\bar{x}_A} = \groupmean{2}, xˉB=4\groupmean{\bar{x}_B} = \groupmean{4}, xˉC=9\groupmean{\bar{x}_C} = \groupmean{9}) are 1+0+1=2\noise{1 + 0 + 1 = 2}, which gives SSwithin\noise{SS_{\text{within}}}:
SSwithin\displaystyle \noise{SS_{\text{within}}} =2+2+2\displaystyle = \noise{2} + \noise{2} + \noise{2} =6\displaystyle = \noise{6}
For SSbetween\signal{SS_{\text{between}}}, multiply each group's squared distance from the Grand Mean of 5\grandmean{5} by the n=3n = 3 plants in that group (forgetting to multiply by n=3n = 3 is the likeliest mistake here, which would give 9+1+16=269 + 1 + 16 = 26 instead of 78\signal{78} and fail the check 26+6≠8426 + 6 \neq 84):
SSbetween=3(2−5)2+3(4−5)2+3(9−5)2=27+3+48=78\displaystyle \begin{aligned}\signal{SS_{\text{between}}} &= 3(\groupmean{2} - \grandmean{5})^2 \\ &+ 3(\groupmean{4} - \grandmean{5})^2 \\ &+ 3(\groupmean{9} - \grandmean{5})^2 \\ &= \signal{27} + \signal{3} + \signal{48} = \signal{78}\end{aligned}
Checking the split confirms SSbetween+SSwithin=78+6=84=SStotal\signal{SS_{\text{between}}} + \noise{SS_{\text{within}}} = \signal{78} + \noise{6} = 84 = SS_{\text{total}}. With dfbetween=3−1=2df_{\text{between}} = 3 - 1 = 2 and dfwithin=9−3=6df_{\text{within}} = 9 - 3 = 6:
MSbetween\displaystyle \signal{MS_{\text{between}}} =782\displaystyle = \frac{\signal{78}}{2} =39,MSwithin\displaystyle = \signal{39}, \qquad \noise{MS_{\text{within}}} =66\displaystyle = \frac{\noise{6}}{6} =1\displaystyle = \noise{1}
F\displaystyle \fstat{F} =391\displaystyle = \frac{\signal{39}}{\noise{1}} =39\displaystyle = \fstat{39}
4

An experiment compares k=5k = 5 diet plans across a total of N=45N = 45 participants. The Total Sum of Squares across all 4545 participants is SStotal=520SS_{\text{total}} = 520, and the Mean Square Within is MSwithin=8\noise{MS_{\text{within}}} = \noise{8}. Find dfbetweendf_{\text{between}}, dfwithindf_{\text{within}}, SSwithin\noise{SS_{\text{within}}}, SSbetween\signal{SS_{\text{between}}}, MSbetween\signal{MS_{\text{between}}}, and the F\fstat{F}-statistic.

Find dfbetweendf_{\text{between}} and dfwithindf_{\text{within}} first, then use MSwithin=SSwithindfwithin\noise{MS_{\text{within}}} = \tfrac{\noise{SS_{\text{within}}}}{df_{\text{within}}} to work backwards to SSwithin\noise{SS_{\text{within}}}.

With k=5k = 5 groups and N=45N = 45 participants, the degrees of freedom are:
dfbetween=k−1=5−1=4dfwithin=N−k=45−5=40\displaystyle \begin{aligned}df_{\text{between}} &= k - 1 = 5 - 1 = 4 \\ df_{\text{within}} &= N - k = 45 - 5 = 40\end{aligned}
(Watch out for the common mistake of using N−1=44N - 1 = 44 for dfwithindf_{\text{within}}, which would give SSwithin=352\noise{SS_{\text{within}}} = 352 and F=5.25\fstat{F} = 5.25.) Working backwards from MSwithin=SSwithindfwithin\noise{MS_{\text{within}}} = \tfrac{\noise{SS_{\text{within}}}}{df_{\text{within}}} gives SSwithin\noise{SS_{\text{within}}}, and subtracting from SStotal=520SS_{\text{total}} = 520 gives SSbetween\signal{SS_{\text{between}}}:
SSwithin=MSwithin×dfwithin=8×40=320SSbetween=SStotal−SSwithin=520−320=200\displaystyle \begin{aligned}\noise{SS_{\text{within}}} &= \noise{MS_{\text{within}}} \times df_{\text{within}} = \noise{8} \times 40 = \noise{320} \\ \signal{SS_{\text{between}}} &= SS_{\text{total}} - \noise{SS_{\text{within}}} = 520 - \noise{320} = \signal{200}\end{aligned}
Dividing SSbetween\signal{SS_{\text{between}}} by dfbetween=4df_{\text{between}} = 4 and taking the ratio gives MSbetween\signal{MS_{\text{between}}} and F\fstat{F}:
MSbetween\displaystyle \signal{MS_{\text{between}}} =2004\displaystyle = \frac{\signal{200}}{4} =50\displaystyle = \signal{50}
F\displaystyle \fstat{F} =508\displaystyle = \frac{\signal{50}}{\noise{8}} =6.25\displaystyle = \fstat{6.25}
5

A study compares exam scores across 33 tutoring formats with unequal sample sizes (N=15N = 15): Group A has nA=2,xˉA=56,sA=4n_A = 2, \groupmean{\bar{x}_A} = \groupmean{56}, \noise{s_A} = \noise{4}; Group B has nB=5,xˉB=66,sB=5n_B = 5, \groupmean{\bar{x}_B} = \groupmean{66}, \noise{s_B} = \noise{5}; Group C has nC=8,xˉC=76,sC=4n_C = 8, \groupmean{\bar{x}_C} = \groupmean{76}, \noise{s_C} = \noise{4}. (a) Find the Grand Mean and explain why it is higher than the simple average of the three group means (6666). (b) Find SSbetween\signal{SS_{\text{between}}}, dfbetweendf_{\text{between}}, and MSbetween\signal{MS_{\text{between}}}. (c) Use the group standard deviations to find SSwithin\noise{SS_{\text{within}}}, dfwithindf_{\text{within}}, MSwithin\noise{MS_{\text{within}}}, and the F\fstat{F}-statistic. (d) What condition on the groups' spreads is needed to justify pooling the group variances into MSwithin\noise{MS_{\text{within}}}?

Weight each group mean by nn to find total points for the Grand Mean, and remember to square each standard deviation s\noise{s} into s2\noise{s^2} before multiplying by n−1n - 1 to get each group's sum of squares.

(a) Weighting each group mean by its sample size nn gives the Grand Mean across all 1515 students (taking the unweighted average 56+66+763=66\tfrac{56 + 66 + 76}{3} = 66 is a common mistake that throws off SSbetween\signal{SS_{\text{between}}}):
Grand Mean=2(56)+5(66)+8(76)2+5+8=112+330+60815=105015=70\displaystyle \begin{aligned}\grandmean{\text{Grand Mean}} &= \frac{2(\groupmean{56}) + 5(\groupmean{66}) + 8(\groupmean{76})}{2 + 5 + 8} \\ &= \frac{112 + 330 + 608}{15} \\ &= \frac{1050}{15} = \grandmean{70}\end{aligned}
The Grand Mean of 70\grandmean{70} is higher than the simple average of 6666 because Group C has the most students (88) and pulls the overall average toward 76\groupmean{76}. (b) Weighting each group's squared distance from the Grand Mean of 70\grandmean{70} by nn gives SSbetween\signal{SS_{\text{between}}} and MSbetween\signal{MS_{\text{between}}} (with dfbetween=3−1=2df_{\text{between}} = 3 - 1 = 2):
SSbetween=2(56−70)2+5(66−70)2+8(76−70)2=392+80+288=760\displaystyle \begin{aligned}\signal{SS_{\text{between}}} &= 2(\groupmean{56} - \grandmean{70})^2 \\ &+ 5(\groupmean{66} - \grandmean{70})^2 \\ &+ 8(\groupmean{76} - \grandmean{70})^2 \\ &= \signal{392} + \signal{80} + \signal{288} = \signal{760}\end{aligned}
MSbetween\displaystyle \signal{MS_{\text{between}}} =7602\displaystyle = \frac{\signal{760}}{2} =380\displaystyle = \signal{380}
(c) Using Group SS=(n−1)s2\noise{\text{Group } SS} = (n - 1)\noise{s^2} for each group (be careful to square s\noise{s} rather than multiplying n−1n - 1 by the unsquared standard deviation s\noise{s}, which would give 1(4)+4(5)+7(4)=521(4) + 4(5) + 7(4) = 52 instead of 228\noise{228}):
SSwithin=(2−1)(42)+(5−1)(52)+(8−1)(42)=16+100+112=228\displaystyle \begin{aligned}\noise{SS_{\text{within}}} &= (2 - 1)(\noise{4^2}) + (5 - 1)(\noise{5^2}) + (8 - 1)(\noise{4^2}) \\ &= \noise{16} + \noise{100} + \noise{112} = \noise{228}\end{aligned}
With dfwithin=15−3=12df_{\text{within}} = 15 - 3 = 12:
MSwithin\displaystyle \noise{MS_{\text{within}}} =22812\displaystyle = \frac{\noise{228}}{12} =19\displaystyle = \noise{19}
F\displaystyle \fstat{F} =38019\displaystyle = \frac{\signal{380}}{\noise{19}} =20\displaystyle = \fstat{20}
(d) Pooling the group variances into a single MSwithin\noise{MS_{\text{within}}} requires that the groups have roughly similar spreads in the population (along with independent samples from roughly normal populations).