Interaction contrast 2026-10-07
An interaction contrast compares a treatment difference across levels of another factor. A nonzero difference of differences shows that an additive representation of those cell means is inadequate. Its standard error must use the error stratum in which that interaction term is randomized.
Interaction (statistics) 2026-10-07
A statistical interaction means that the effect of one predictor depends on another on the chosen response scale. In a linear regression, an interaction term changes the slope in to . Whether interaction is present depends on the comparison scale; additive effects and multiplicative effects use different null contrasts. Comparing subgroup effects requires an interaction contrast, rather than contrasting their separate significance labels.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 2 Solution Created 2026-10-03 Updated 2026-10-07
A regression factor is a categorical predictor represented by level indicators and contrasts. Treating year as a regression factor permits arbitrary differences between the three yearly means, reflecting conditions such as weather, rather than imposing a linear time trend.
Let be the yield for seed variety , fertiliser level , and year . A treatment-coded two-factor normal linear model with additive year effects iswith independent errors. The unrestricted coefficients are : six parameters for twelve observations. Equivalently use baseline-zero variety, fertiliser, and interaction arrays. There are no year-treatment interactions in this fit.
Dividing each sum of squares by its statistical degrees of freedom gives the completed analysis of variance:In particular, the missing interaction statistic is . Its null hypothesis is , against : the change in mean yield from high fertiliser is the same for both varieties. Under the null hypothesis and the independent homoscedastic normal linear model, this nested-model F-test has distribution . The printed -value 0.001137 strongly rejects no interaction.
Do not drop fertiliser just because its main-effect ANOVA row has . In this balanced factorial design that row measures a fertiliser effect averaged over varieties; large opposite effects can cancel. The strongly supported interaction requires retaining its associated main effects by regression model hierarchy. Seed and year also have evidence of effects in their ANOVA rows, so this table alone gives no compelling simplification of the fitted terms.
The interaction contrast is , with standard error 0.7946. The fitted high-minus-low fertiliser effect is for variety 1 but for variety 2. The fitted variety-2-minus-variety-1 contrast is under low fertiliser and under high fertiliser. Thus variety 2 performs best under low fertiliser, while high fertiliser benefits variety 1 and reduces variety 2's fitted yield. The marginal fertiliser effect is only .
The four fitted means in the baseline year are for respectively. Add in 2005 and in 2006 to every fitted mean. The 2005 coefficient has under a test of a zero contrast with 2004; the analogous 2006 contrast has . The latter is lack of evidence for a difference, not proof that the yearly means coincide. Standard errors for the combined contrasts require the coefficient covariance matrix. The experiment is small: residual standard error is 0.6882 on only six statistical degrees of freedom. If the same fields were reused, possible within-field dependence and field allocation would need checking before treating the fitted error independence as established.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 35 4 f iii Solution Created 2026-10-03 Updated 2026-10-07
This produces a split-plot design: assign spray to whole orchards, with six sprayed and six unsprayed, then independently randomize ten trees to each pruning method inside every orchard. Orchards remain experimental units for spray; individual trees become experimental units for pruning. Pruning contrasts and the spray-by-pruning interaction term now lie in the within-block ANOVA stratum, while spray is tested between orchards.
The between-orchard ANOVA stratum has eleven statistical degrees of freedom, split into one for spray and ten for error. The within-orchard ANOVA stratum has 348, split into two for pruning, two for the interaction term and 344 for error. This pooling of within-orchard error is appropriate under the stated compound-symmetry covariance model; additional orchard-specific pruning variation would need its own variance component rather than this simplified error model.
The shared orchard effect cancels in a pruning difference within an orchard. Its variance is , so averaging across twelve orchards givesThe spray contrast still compares means of six orchards per group, each based on 30 trees, so its estimated variance remains . For a difference of pruning differences between the two spray groups, each group's pruning difference has estimated variance , and the resulting interaction contrast has estimated variance , compared with in the original allocation.
Splitting pruning within orchards improves pruning and interaction precision without extra trees, and gives spray a less sparse error estimate; it does not reduce the spray contrast's variance. This option requires tree-level pruning to be practical without interference between neighboring trees. The numerical gains, like those in the other options, assume the current variance components remain applicable next year.