From a Latin-Square Layout to an Analysis
A Latin square controls two sources of variation by arranging each treatment once in every row and once in every column. A complete analysis uses that structure to separate treatment variation from row and column variation, leaving an error term for the treatment test. The arithmetic is compact, but each total and degree of freedom depends on the square being correctly balanced.
We will analyze a hypothetical experiment comparing four treatments, A through D. Rows and columns represent two blocking factors. The response is measured in arbitrary response units; a larger value means a larger response. The treatment layout and observations are:
| Column 1 | Column 2 | Column 3 | Column 4 | Row total | |
|---|---|---|---|---|---|
| Row 1 | A: 10 | B: 14 | C: 13 | D: 16 | 53 |
| Row 2 | B: 13 | C: 15 | D: 19 | A: 14 | 61 |
| Row 3 | C: 11 | D: 13 | A: 11 | B: 17 | 52 |
| Row 4 | D: 14 | A: 16 | B: 17 | C: 20 | 67 |
| Column total | 48 | 58 | 60 | 67 | Grand total: 233 |
Each treatment occurs four times, once in each row and once in each column. The treatment totals are \(T_A=51\), \(T_B=61\), \(T_C=59\), and \(T_D=62\). We use the additive Latin-square model
where \(Y_{ij}\) is the response in row \(i\), column \(j\), and \(t(i,j)\) identifies the treatment assigned to that cell. The parameters \(\rho_i\), \(\gamma_j\), and \(\tau_k\) are row, column, and treatment effects, conventionally constrained to sum to zero within each factor. The errors \(\epsilon_{ij}\) are assumed independent, normally distributed with mean zero and common variance \(\sigma^2\). The model also assumes additivity: it does not include treatment-by-row or treatment-by-column interaction terms. The treatments must have been assigned according to a valid randomized Latin-square design.
These assumptions describe the basis for the calculations, not something the observed table can prove. In a real analysis, the design would support the randomization and balance claims; residual plots could help assess unusual patterns or unequal spread. With only one observation per cell, the data cannot separately estimate interactions and pure error.
Calculate the ANOVA Components
For a square of order \(p\), there are \(p^2\) observations. Let \(G\) be the grand total and \(N=p^2\). The correction factor is \(CF=G^2/N\). The total sum of squares is the sum of squared observations minus this correction factor. The row, column, and treatment sums of squares use their respective totals, each divided by \(p\), and then subtract the same correction factor. The residual sum of squares is what remains after those three sources are removed from the total.
The treatment formula works because the treatments are balanced across rows and columns: each treatment appears once in each block level. The Latin-square decomposition therefore separates the four sources of variation without overlap in their sums of squares.
Worked Example: The Correction Factor and Total Variation
For the hypothetical data above, \(p=4\), \(N=16\), and \(G=233\). Thus
The sum of squared observations, calculated row by row, is
Therefore,
This is the total variation among the 16 observed responses around their grand mean, before separating out rows, columns, and treatments. The grand mean is \(233/16=14.5625\) response units.
Worked Example: Row, Column, Treatment, and Error Sums of Squares
The row totals are 53, 61, 52, and 67. The column totals are 48, 58, 60, and 67. Using \(p=4\), the row sum of squares is
Similarly, for columns,
The treatment totals are 51, 61, 59, and 62, so
Finally, subtract the three explained components from the total:
The arithmetic gives a nonnegative residual sum of squares, as required. A negative value would signal a calculation or data-organization error.
Degrees of Freedom, the ANOVA Table, and the Treatment Test
There are \(p^2-1\) total degrees of freedom. Each of the three factors—rows, columns, and treatments—uses \(p-1\) degrees of freedom. Subtracting these from the total leaves \((p-1)(p-2)\) error degrees of freedom. For \(p=4\), the degrees of freedom are 15 total, 3 each for rows, columns, and treatments, and 6 for error.
The error mean square estimates \(\sigma^2\) under the model. To test whether all treatment effects are equal, the hypotheses are \(H_0:\tau_A=\tau_B=\tau_C=\tau_D=0\) against \(H_a:\) at least one treatment effect differs from the others. Under \(H_0\) and the stated model assumptions, the treatment F statistic follows an \(F\) distribution with the specified numerator and denominator degrees of freedom.
Worked Example: Treatment F Test and ANOVA Table
For the treatment source, \(SS_{\text{Treatments}}=18.6875\) and \(df=3\), so \(MS_{\text{Treatments}}=18.6875/3=6.2292\). For error, \(SS_E=17.375\) and \(df=6\), so \(MS_E=17.375/6=2.8958\). The treatment statistic is
The resulting ANOVA table is:
| Source | df | SS | MS | F |
|---|---|---|---|---|
| Rows | 3 | 37.6875 | 12.5625 | 4.336 |
| Columns | 3 | 46.1875 | 15.3958 | 5.317 |
| Treatments | 3 | 18.6875 | 6.2292 | 2.151 |
| Error | 6 | 17.375 | 2.8958 | |
| Total | 15 | 119.9375 |
For the treatment test, \(F=2.151\) with \(df=(3,6)\), giving an upper-tail p-value of approximately 0.196. At \(\alpha=0.05\), this is not statistically significant: the data do not provide sufficient evidence that the mean responses differ among the four treatments, after accounting for rows and columns. This conclusion does not establish that the treatments have identical effects.
Estimated Treatment Means and Differences
Because every treatment occurs equally often in every row and column, the treatment means are estimated by dividing each treatment total by \(p\). This balance makes the treatment comparisons independent of the particular row and column averages in the fitted additive model. These are adjusted estimates in the sense that the blocking structure has been accounted for; the pairwise differences between them estimate treatment-effect differences.
For comparing two treatment means, the standard error is \(\sqrt{2MS_E/p}\). A confidence interval for a difference uses a \(t\) critical value with the error degrees of freedom. Such an interval describes uncertainty in the estimated difference in mean response units, under the model assumptions.
Worked Example: Estimating a Treatment Difference
The estimated treatment means are
For treatment A minus treatment B, the estimated difference is \(12.75-15.25=-2.50\) response units. Its standard error is
With 6 error degrees of freedom, the 95% critical value is approximately 2.447. The confidence interval is
The point estimate suggests that A's mean response is 2.50 units lower than B's. However, the interval includes zero and is wide enough to include differences in either direction. It does not show a clear difference between these two treatments. The overall F test and this interval address related but distinct questions: the F test concerns all treatment means jointly, while this interval concerns one specified pair.
Why the Structure and Assumptions Matter
Blocking is useful when row and column differences contribute variation that is not the treatment effect of interest. The analysis removes the variation attributed to those two factors before estimating error and testing treatments. The error degrees of freedom are consequently limited: for a four-treatment square there are only 6, so estimates and tests may be imprecise. The treatment test is meaningful only when the square is correctly laid out, the response is measured consistently, and the additive model and error assumptions are reasonable for the experiment.
A frequent mistake is to treat the 16 observations as if they came from a one-way experiment and compare treatment means while ignoring rows and columns. That ignores the design and uses the wrong error calculation. The correction is to verify the Latin-square structure, calculate row, column, and treatment sums of squares, and use the remaining error mean square with its Latin-square degrees of freedom.
Check Your Understanding
Use the definitions and worked calculations above to answer these questions.
- In a Latin square of order 5, how many observations are present, and how many error degrees of freedom are available?
- Why must each treatment occur once in every row and column for the standard Latin-square sums-of-squares formulas to apply?
- If the treatment sum of squares is 24 with 3 degrees of freedom, and the error sum of squares is 18 with 6 degrees of freedom, calculate the treatment F statistic.
- For the worked data, explain in context what the estimated A-minus-B difference of \(-2.50\) response units means.
- Why does the 95% interval for A minus B not establish that the two treatments have equal mean responses?