From a Question to an ANOVA Conclusion
A one-way ANOVA problem is more than a calculation of an F statistic. A complete analysis connects a question about several population means to hypotheses, a model, an ANOVA table, a decision, and a conclusion in context. Keeping those steps together helps prevent a correct calculation from being given an incorrect interpretation.
This workshop follows that full sequence in three hypothetical examples. In each, one categorical factor defines the groups, and one quantitative response is measured. The test asks whether the population means are all equal; it does not, by itself, name which means differ.
Independence is supported by the study design, not established by the arithmetic in the ANOVA table. The normal-error and common-variance assumptions describe the model for the responses around their group means. In the examples below, the hypothetical designs are stated to support independence, and the model assumptions are stipulated; a small data set alone cannot prove that they hold.
The Calculation Behind the Table
Let \(\bar{x}_i\) be the sample mean in group \(i\), and let \(\bar{x}\) be the grand mean of all \(N\) observations. ANOVA divides total variation into variation among the group means and variation within the groups.
The degrees of freedom are \(k-1\) for between groups, \(N-k\) for within groups, and \(N-1\) for the total. Divide each sum of squares by its degrees of freedom to obtain the corresponding mean square. The test statistic is the ratio of the between-groups mean square to the within-groups mean square.
The upper tail is used because a large F statistic means the observed differences among group means are large relative to the variation within groups. The p-value is the probability, under \(H_0\) and the model assumptions, of an F statistic at least as large as the one observed. It is not the probability that \(H_0\) is true.
Worked Through: Three Mixtures
Worked Example: A Balanced One-Way ANOVA From Raw Data
Question. In a hypothetical experiment, plants are randomly assigned to one of three nutrient mixtures. Their root lengths, in centimeters, are recorded. The data are Mixture 1: 7, 8, 9, 8; Mixture 2: 9, 10, 11, 10; Mixture 3: 11, 12, 13, 12. Is there evidence at \(\alpha=0.05\) that the population mean root lengths differ among the mixtures?
Hypotheses. With \(\mu_1,\mu_2,\mu_3\) denoting the population mean root lengths for the three mixtures, \(H_0:\mu_1=\mu_2=\mu_3\). The alternative is \(H_a:\) not all three population means are equal. This alternative does not assert that every pair of means differs.
Conditions. Random assignment supports independence of the plant responses across groups. For this worked example, assume the errors are normally distributed with a common variance in the three groups. Thus, under \(H_0\), the exact reference distribution is \(F(2,9)\).
Group and grand means. Each group has \(n_i=4\). The group means are \(\bar{x}_1=32/4=8\), \(\bar{x}_2=40/4=10\), and \(\bar{x}_3=48/4=12\) cm. The grand mean is \(\bar{x}=(32+40+48)/12=10\) cm.
Within-groups variation. In each group, the deviations from its own mean are \(-1,0,1,0\) cm, so the squared deviations sum to \(1+0+1+0=2\) cm². Therefore, \(SS_{\text{within}}=2+2+2=6\) cm².
Between-groups variation. The group means differ from the grand mean by \(-2,0,2\) cm. Thus,
Check of the partition. Summing the squared deviations of every observation from the grand mean gives group contributions \(18\), \(2\), and \(18\) cm², respectively. Hence \(SS_{\text{total}}=18+2+18=38\) cm², which agrees with \(SS_{\text{between}}+SS_{\text{within}}=32+6=38\) cm².
Degrees of freedom and test statistic. Here \(k=3\), \(N=12\), so the between-groups, within-groups, and total degrees of freedom are \(2\), \(9\), and \(11\). The mean squares and F statistic are
Decision and conclusion. Under \(F(2,9)\), the upper-tail p-value for \(F=24.00\) is approximately \(0.000247\). Since \(0.000247<0.05\), reject \(H_0\). The hypothetical data provide strong evidence that the population mean root lengths are not all equal across the three nutrient mixtures. The omnibus test does not establish which mixture means differ.
| Source | Sum of squares (cm²) | df | Mean square | F | p-value |
|---|---|---|---|---|---|
| Between groups | 32 | 2 | 16 | 24.00 | 0.000247 |
| Within groups | 6 | 9 | 0.6667 | ||
| Total | 38 | 11 |
Why the Sums of Squares Add Up
The partition used above follows from splitting each observation’s deviation from the grand mean into two parts: its deviation from its own group mean, and the group mean’s deviation from the grand mean. For a particular observation, \(x_{ij}-\bar{x}=(x_{ij}-\bar{x}_i)+(\bar{x}_i-\bar{x})\). Squaring and summing over observations produces the within- and between-groups terms plus a cross-product term.
That cross-product is zero. Within each group, \(\sum_j(x_{ij}-\bar{x}_i)=0\), while \(\bar{x}_i-\bar{x}\) is constant for that group. Therefore,
This identity is a useful arithmetic check: if the total does not equal the two components added together, revisit the calculations before interpreting the F statistic.
Unequal Group Sizes and a Significant Result
Worked Example: Unequal Group Sizes
Question and hypotheses. In a second hypothetical study, independent randomly assigned participants receive one of three brief training programs. Their task scores are Program A: 4, 5, 6; Program B: 6, 7, 8, 7; and Program C: 7, 8, 9. Is there evidence at \(\alpha=0.05\) that the population mean scores are not all equal? Let \(\mu_A,\mu_B,\mu_C\) be those population means. Test \(H_0:\mu_A=\mu_B=\mu_C\) against \(H_a:\) not all are equal.
Conditions. The stated random assignment supports independence. Assume normally distributed errors with a common variance across the programs. Under \(H_0\), use the exact \(F(2,7)\) reference distribution.
Means and sums of squares. The sample sizes are 3, 4, and 3; the group means are 5, 7, and 8. The grand mean is \(\bar{x}=(15+28+24)/10=6.7\). Each group has within-group squared deviations totaling 2, so \(SS_{\text{within}}=2+2+2=6\). For the between-groups component,
Thus \(SS_{\text{total}}=14.10+6=20.10\). The degrees of freedom are \(2\), \(10-3=7\), and \(9\), respectively. Therefore \(MS_{\text{between}}=14.10/2=7.05\), \(MS_{\text{within}}=6/7=0.8571\), and \(F=7.05/0.8571=8.225\).
Decision and conclusion. The upper-tail p-value from \(F(2,7)\) is approximately \(0.0145\). Since \(0.0145<0.05\), reject \(H_0\). These hypothetical data provide evidence that the population mean task scores are not all equal among the three programs. The unequal sample sizes are handled by using each group’s own \(n_i\) in the between-groups sum of squares.
| Source | Sum of squares | df | Mean square | F | p-value |
|---|---|---|---|---|---|
| Between groups | 14.10 | 2 | 7.05 | 8.225 | 0.0145 |
| Within groups | 6.00 | 7 | 0.8571 | ||
| Total | 20.10 | 9 |
A Nonsignificant Result Is Not Proof of Equality
Worked Example: A Result That Does Not Reach the Significance Level
Question and hypotheses. A third hypothetical comparison records measurements in units for three independent groups: Group A: 10, 11, 12; Group B: 11, 12, 13; Group C: 10, 11, 12. Test \(H_0:\mu_A=\mu_B=\mu_C\) against \(H_a:\) not all population means are equal, using \(\alpha=0.05\).
Conditions and calculations. Assume the study design makes observations independent and that errors are normally distributed with a common variance. The group means are 11, 12, and 11, and the grand mean is \(102/9=11.333\). Each group has within-group sum of squares 2, giving \(SS_{\text{within}}=6\). The between-groups sum of squares is
Then \(SS_{\text{total}}=8.000\). The degrees of freedom are \(2\), \(6\), and \(8\); so \(MS_{\text{between}}=2/2=1\), \(MS_{\text{within}}=6/6=1\), and \(F=1/1=1.000\).
Decision and conclusion. For \(F(2,6)\), the upper-tail p-value is \(0.4219\). Since \(0.4219>0.05\), do not reject \(H_0\). These data do not provide sufficient evidence at the 0.05 level that the three population means differ. This is not proof that the means are equal: the test may not detect differences that are small relative to within-group variation or that the sample sizes cannot resolve.
| Source | Sum of squares | df | Mean square | F | p-value |
|---|---|---|---|---|---|
| Between groups | 2.000 | 2 | 1.000 | 1.000 | 0.4219 |
| Within groups | 6.000 | 6 | 1.000 | ||
| Total | 8.000 | 8 |
A Reliable Problem-Solving Sequence
Name the response, groups, and population means; state \(H_0\) and \(H_a\) in context.
Address independence, normal errors, and a common variance before using the exact F reference distribution.
Find group means, the grand mean, both component sums of squares, and verify that they sum to the total.
Use the correct degrees of freedom, divide to find mean squares, calculate F, and obtain its upper-tail p-value.
Compare the p-value with \(\alpha\), then describe the evidence about the population means in the problem’s context.
Common Mistakes and Why the Workflow Matters
A frequent mistake is to read a significant omnibus F test as proof that every group differs from every other group. The test addresses the global null that all population means are equal. Rejecting it supports the conclusion that not all are equal, but does not identify the particular means responsible. Another mistake is to interpret a nonsignificant p-value as proof of equality; the correct conclusion is that the data did not provide sufficient evidence to reject the null at the chosen significance level.
Calculation errors can also change the decision. Use \(n_i\), not a common sample size unless the design is balanced, when calculating between-groups variation. Use \(N-k\), not \(N-1\), for the within-groups degrees of freedom. Finally, make the units clear: sums of squares have squared response units, while the F ratio is unitless because it divides two mean squares measured in the same squared units.
Check Your Understanding
Try these questions without looking back at the worked solutions.
- For a one-way ANOVA with four groups and \(N=28\) observations, what are the between-groups, within-groups, and total degrees of freedom?
- In a study comparing three population means, what does the alternative hypothesis “not all means are equal” assert—and what does it not assert?
- Why must independence be justified from the study design rather than inferred from a completed ANOVA table?
- If \(SS_{\text{between}}=18\), \(SS_{\text{within}}=42\), and there are three groups with \(N=24\), calculate \(MS_{\text{between}}\), \(MS_{\text{within}}\), and F.
- A test has p-value \(0.18\) and uses \(\alpha=0.05\). State the decision and explain why it does not prove that all population means are equal.