From Group Summaries to an ANOVA Table
A one-way ANOVA table organizes the evidence about differences among several population means. Often the raw observations are not available: a report may give only each group’s sample size, sample mean, and within-group sum of squares. Those summaries are enough to construct the table, provided the group summaries are based on the same observations and use the usual sample-mean definitions.
The essential bookkeeping is to weight each group mean by its sample size, not to average the group means equally unless the group sizes are equal. Then calculate the between-group variation, combine it with the within-group variation, and check that both sums of squares and degrees of freedom add correctly.
The Summary Formulas
The grand mean is the mean of all \(N\) observations. A group with more observations contributes more to it, so the group means must be weighted by their sample sizes. The between-group sum of squares measures variation among the group means around that grand mean. The within-group sum of squares is the sum of the group-specific within-group sums of squares.
The degrees of freedom follow from the number of independent deviations remaining after estimating means. There are \(k-1\) between-group degrees of freedom, \(N-k\) within-group degrees of freedom, and \(N-1\) total degrees of freedom. Dividing each sum of squares by its degrees of freedom gives its mean square. Under the equal-means null hypothesis and the stated model assumptions, the ratio of the between-group mean square to the within-group mean square has an \(F\) distribution with \(k-1\) and \(N-k\) degrees of freedom.
The completed table has one row for each source of variation and a total row. The total row is a reconciliation row: it carries the total sum of squares and total degrees of freedom, but no mean square or F statistic.
| Source | Sum of squares | Degrees of freedom | Mean square | F |
|---|---|---|---|---|
| Between groups | \(SS_{\text{between}}\) | \(k-1\) | \(SS_{\text{between}}/(k-1)\) | \(MS_{\text{between}}/MS_{\text{within}}\) |
| Within groups (error) | \(SS_{\text{within}}\) | \(N-k\) | \(SS_{\text{within}}/(N-k)\) | |
| Total | \(SS_{\text{total}}\) | \(N-1\) |
Why the Sums of Squares Reconcile
For an observation \(y_{ij}\), add and subtract its group mean and the grand mean: \(y_{ij}-\bar{y}_{..}=(y_{ij}-\bar{y}_i)+(\bar{y}_i-\bar{y}_{..})\). Squaring and summing separates within-group deviations from differences between group means. The cross-product term vanishes because the deviations from each group’s sample mean sum to zero.
The same centering logic explains the degrees of freedom: the \(N\) observations have one estimated grand mean for total variation, while within groups there are \(k\) estimated group means. These yield \(N-1\) and \(N-k\) degrees of freedom, respectively; the remaining \(k-1\) are between groups. Hence \((k-1)+(N-k)=N-1\).
A Reliable Construction Process
Add the group sizes, then divide the sum of \(n_i\bar{y}_i\) by \(N\).
For each group, square its deviation from the grand mean and multiply by its size; add the contributions.
Add the supplied group-specific values to obtain \(SS_{\text{within}}\).
Check both \(SS_{\text{total}}=SS_{\text{between}}+SS_{\text{within}}\) and \((k-1)+(N-k)=N-1\).
Divide each non-total sum of squares by its degrees of freedom, then divide the between-group mean square by the within-group mean square.
Worked Example: Constructing a Table for Three Training Methods
Hypothetical scenario. A training analyst compares assessment scores for employees assigned to three methods. Assume independent samples from normal populations with a common variance. The group summaries are: method A, \(n_1=4\), \(\bar{y}_1=10\), \(SS_1=12\); method B, \(n_2=3\), \(\bar{y}_2=12\), \(SS_2=8\); method C, \(n_3=5\), \(\bar{y}_3=14\), \(SS_3=20\). Construct the ANOVA table.
Method. Compute the weighted grand mean, the sums of squares, and then the degrees of freedom, mean squares, and F ratio.
The total sample size is \(N=4+3+5=12\). The weighted sum of the observations, computed from the group summaries, is \(4(10)+3(12)+5(14)=40+36+70=146\). Thus \(\bar{y}_{..}=146/12=73/6\approx12.1667\).
The between-group contributions are \(4(10-73/6)^2=4(169/36)=169/9\approx18.7778\), \(3(12-73/6)^2=3(1/36)=1/12\approx0.0833\), and \(5(14-73/6)^2=5(121/36)=605/36\approx16.8056\). Their sum is \(107/3\approx35.6667\). The within-group sum is \(12+8+20=40\), so \(SS_{\text{total}}=107/3+40=227/3\approx75.6667\).
There are \(k=3\) groups. Therefore the degrees of freedom are \(2\), \(12-3=9\), and \(11\). The mean squares are \(MS_{\text{between}}=(107/3)/2=107/6\approx17.8333\) and \(MS_{\text{within}}=40/9\approx4.4444\). Hence \(F=(107/6)/(40/9)=963/240=4.0125\).
| Source | Sum of squares | df | Mean square | F |
|---|---|---|---|---|
| Between groups | 35.6667 | 2 | 17.8333 | 4.0125 |
| Within groups | 40.0000 | 9 | 4.4444 | |
| Total | 75.6667 | 11 |
Check. \(35.6667+40.0000=75.6667\), and \(2+9=11\). The table reconciles. The displayed values are rounded to four decimal places; the calculations use the unrounded fractions.
Worked Example: A Group Mean Equal to the Grand Mean
Hypothetical scenario. A quality team records the number of processing errors under three software configurations. Assume independent normal samples with a common population variance. The summaries are: configuration A, \(n_1=2\), \(\bar{y}_1=5\), \(SS_1=6\); configuration B, \(n_2=4\), \(\bar{y}_2=8\), \(SS_2=12\); configuration C, \(n_3=3\), \(\bar{y}_3=7\), \(SS_3=9\). Construct the table and identify the group with no between-group contribution.
The sample size is \(N=2+4+3=9\). The weighted total is \(2(5)+4(8)+3(7)=10+32+21=63\), giving \(\bar{y}_{..}=63/9=7\).
The between-group contributions are \(2(5-7)^2=8\), \(4(8-7)^2=4\), and \(3(7-7)^2=0\). Thus \(SS_{\text{between}}=8+4+0=12\). Configuration C has no between-group contribution because its mean equals the grand mean. The within-group sum is \(6+12+9=27\), so \(SS_{\text{total}}=12+27=39\).
With \(k=3\), the degrees of freedom are \(2\), \(9-3=6\), and \(8\). The mean squares are \(12/2=6\) and \(27/6=4.5\), so \(F=6/4.5=4/3\approx1.3333\).
| Source | Sum of squares | df | Mean square | F |
|---|---|---|---|---|
| Between groups | 12 | 2 | 6 | 1.3333 |
| Within groups | 27 | 6 | 4.5 | |
| Total | 39 | 8 |
Check. The sums of squares satisfy \(12+27=39\), and the degrees of freedom satisfy \(2+6=8\). The table is consistent.
Worked Example: Unequal Group Sizes and an Arithmetic Trap
Hypothetical scenario. A research team compares a numerical response across three independently sampled settings, assuming normal populations with a common variance. The summaries are: setting A, \(n_1=2\), \(\bar{y}_1=20\), \(SS_1=5\); setting B, \(n_2=5\), \(\bar{y}_2=23\), \(SS_2=7\); setting C, \(n_3=3\), \(\bar{y}_3=26\), \(SS_3=6\). Build the ANOVA table. Use the weighted grand mean, and check the arithmetic in the between-group sum.
Here \(N=2+5+3=10\), and the weighted total is \(2(20)+5(23)+3(26)=40+115+78=233\). Therefore the weighted grand mean is \(233/10=23.3\).
The group contributions to \(SS_{\text{between}}\) are \(2(20-23.3)^2=2(10.89)=21.78\), \(5(23-23.3)^2=5(0.09)=0.45\), and \(3(26-23.3)^2=3(7.29)=21.87\). Their sum is \(21.78+0.45+21.87=44.10\), not \(61.8\). The within-group sum is \(5+7+6=18\), giving \(SS_{\text{total}}=44.1+18=62.1\).
The degrees of freedom are \(k-1=2\), \(N-k=7\), and \(N-1=9\). The mean squares are \(44.1/2=22.05\) and \(18/7\approx2.5714\). Thus \(F=22.05/(18/7)=154.35/18=8.575\).
| Source | Sum of squares | df | Mean square | F |
|---|---|---|---|---|
| Between groups | 44.1 | 2 | 22.05 | 8.575 |
| Within groups | 18 | 7 | \(18/7\approx2.5714\) | |
| Total | 62.1 | 9 |
Check. \(44.1+18=62.1\), and \(2+7=9\). The common mistake is to report a sum that does not equal the displayed group contributions. Re-adding the three terms catches it before it affects the mean square and F ratio. Values are shown to three or four decimal places where needed.
Interpreting and Checking the Completed Table
The ANOVA table is a structured calculation, not just a layout. Each entry should follow from the summaries and the model. A positive \(F\) statistic compares variation among group means, after accounting for group sizes, with the pooled within-group variation. The table alone does not determine a decision: a test decision or p-value also requires a significance level or a reference-distribution calculation. The F test’s usual justification depends on the independence, normality, and common-variance assumptions stated above.
Before using the table, perform both reconciliation checks. A mismatch in the sum-of-squares identity often indicates an arithmetic error, an omitted group, or inconsistent rounding in the supplied summaries. A mismatch in degrees of freedom usually indicates that \(N\) or \(k\) has been counted incorrectly. If only rounded group means are supplied, the computed sums of squares may differ slightly from a total calculated from unrounded raw data; state the precision limitation rather than forcing a false equality.
- Weight the grand mean. Use group sizes in the numerator; do not give unequal-sized groups equal influence.
- Use each group size in the between-group term. The contribution is \(n_i(\bar{y}_i-\bar{y}_{..})^2\), not just the squared deviation.
- Keep the sources distinct. Add the supplied within-group sums of squares for the error row; do not use group means to reconstruct within-group variation.
- Do not assign a mean square to the total row. The standard ANOVA table uses mean squares for between groups and within groups.
Check Your Understanding
For each problem, use the supplied summaries to construct the requested ANOVA quantities. Assume independent normal groups with a common variance where an F statistic is requested.
- Two groups have sizes \(3\) and \(4\), means \(2\) and \(5\), and within-group sums of squares \(4\) and \(8\). Find the weighted grand mean, all three sums of squares, the degrees of freedom, and \(F\). (Answer: \(\bar{y}_{..}=26/7\); \(SS_{\text{between}}=108/7\), \(SS_{\text{within}}=12\), \(SS_{\text{total}}=192/7\); df \(1,5,6\); \(F=45/7\approx6.4286\).)
- Three groups have sizes \(2,3,1\), means \(4,6,10\), and within-group sums of squares \(2,6,0\). Construct the table entries, including \(F\). (Answer: \(\bar{y}_{..}=6\); sums of squares \(SS_{\text{between}}=24\), \(SS_{\text{within}}=8\), \(SS_{\text{total}}=32\); df \(2,3,5\); mean squares \(12,8/3\); \(F=4.5\).)
- Three groups have sizes \(3,2,5\), means \(11,14,13\), and within-group sums of squares \(6,4,10\). Find the grand mean, sums of squares, degrees of freedom, and F statistic. (Answer: \(\bar{y}_{..}=12.6\); sums of squares \(12.4,20,32.4\); df \(2,7,9\); mean squares \(6.2,20/7\); \(F=2.17\).)
- Three groups have sizes \(1,3,4\) and means \(2,5,8\). A student uses the unweighted average of the group means as the grand mean. Find that incorrect average and the correct weighted grand mean. (Answer: The unweighted average is \(5\); the correct weighted grand mean is \([1(2)+3(5)+4(8)]/8=49/8=6.125\).)
- Four groups have total sample size \(N=18\), within-group sum of squares \(SS_{\text{within}}=28\), and between-group sum of squares \(SS_{\text{between}}=42\). Find total sum of squares and all three degrees of freedom. (Answer: \(SS_{\text{total}}=70\); between-group df \(3\), within-group df \(14\), total df \(17\), with \(3+14=17\).)