Unit 8, lesson 57

Factorial Designs, Blocking and Interactions

How a factorial design crosses factors, how cell means give simple effects, main effects and interactions, why genuine replication is needed, and how a randomized block design compares treatments within blocks.

  • Video 57
  • Comparing Several Means

A learning task can be changed in two ways, by rewriting its instructions and by offering hints. Testing each change in a separate experiment cannot reveal whether hints help more with one kind of instructions than with the other. A factorial design tries every combination, so one experiment shows both how much each change matters on average and whether the effect of one change depends on the other. This lesson builds those effects from cell means, explains why the design needs replicated experimental units, and shows how blocking keeps a known source of variation out of the treatment comparisons.

Key terms

Factor and factorial design

Definition A factor is an explanatory variable that an experiment varies deliberately, or uses to define its groups, and its levels are the particular values chosen for it. A treatment, or treatment combination, fixes one level of every factor. A full factorial design uses every combination of the levels, so a factor A with aa levels and a factor B with bb levels give abab treatment combinations, and when the experimenter sets both factors, the experimental units are randomly assigned to them. The design is balanced when every combination receives the same number of units.

In plain words List the settings of each factor and try all of their combinations. Every unit then contributes information about both factors at once, and the effect of one factor can be compared across the levels of the other.

Example Factor A is the instruction format, with level A0A_0 for the current text and A1A_1 for a new worked-example format. Factor B is hints, with B0B_0 for no hints and B1B_1 for hints. The full 2×22 \times 2 design has the four combinations A0B0A_0B_0, A0B1A_0B_1, A1B0A_1B_0 and A1B1A_1B_1. In the constructed experiment, eight learners are randomly assigned, two to each combination, so the design is balanced.

Cell mean and replication

Definition A cell is one treatment combination, and its cell mean is the mean response of the units that received it. Write μij\mu_{ij} for the population cell mean at level ii of A and level jj of B, estimated by the sample cell mean yˉij\bar{y}_{ij}. Replication means assigning each treatment combination to more than one experimental unit, the entity to which a treatment is assigned. Replicates count experimental units, so repeated measurements of one unit, such as several questions answered by one learner, are not replicates. In the ordinary model for an a×ba \times b design that includes the interaction, the residual sum of squares adds the squared deviations of the observations from their cell means and has N−abN - ab degrees of freedom, where NN is the number of experimental units. With a single unit in every cell this number is 00, and the error variance cannot be estimated in this way.

In plain words The cell means are the summaries every effect is built from. Replication shows how much units treated alike differ from each other, and that is the yardstick for judging whether differences between cell means are larger than noise.

Example The constructed scores are below, with the cell mean after each pair.

FormatNo hints B0B_0Hints B1B_1
Current A0A_09 and 11, mean 1011 and 13, mean 12
New A1A_113 and 15, mean 1419 and 21, mean 20

In every cell the two learners score one point below and one point above the cell mean, so each cell contributes (−1)2+12=2(-1)^2 + 1^2 = 2 and the residual sum of squares is 88. Eight observations and four fitted cell means leave 8−4=48 - 4 = 4 residual degrees of freedom, so the residual mean square is MSE=8/4=2\text{MS}_E = 8/4 = 2, the pooled within-cell variance. If each learner had also answered ten questions, the experiment would still have two replicates per cell, not twenty.

Simple effect

Definition A simple effect of a factor compares its levels at one fixed level of the other factor. In a 2×22 \times 2 design the simple effects of B are

ΔB(A0)=μ01−μ00,ΔB(A1)=μ11−μ10,\begin{gathered} \Delta_B(A_0) = \mu_{01} - \mu_{00}, \\[0.4em] \Delta_B(A_1) = \mu_{11} - \mu_{10}, \end{gathered}

and the simple effects of A are μ10−μ00\mu_{10} - \mu_{00} at B0B_0 and μ11−μ01\mu_{11} - \mu_{01} at B1B_1. They are estimated by the same differences of sample cell means.

In plain words A simple effect answers what changing one factor does while the other is held at a particular setting. It describes the effect under specified conditions, not on average.

Example Turning hints on raises the mean score from 1010 to 1212 with the current format, a simple effect of 22 points, and from 1414 to 2020 with the new format, a simple effect of 66 points. The simple effects of the format are 14−10=414 - 10 = 4 points without hints and 20−12=820 - 12 = 8 points with hints.

Main effect

Definition A main effect of a factor compares its levels after averaging the cell means over the levels of the other factor with stated weights. In a 2×22 \times 2 design with equal weights, the main effect of A is

ΔA=μ10+μ112−μ00+μ012,\begin{aligned} \Delta_A &= \frac{\mu_{10} + \mu_{11}}{2} \\[0.4em] &\quad - \frac{\mu_{00} + \mu_{01}}{2}, \end{aligned}

which is the average of the two simple effects of A, and the main effect of B is defined in the same way. In an unbalanced or incomplete design, averaging over the other factor can mean different things, for example equal weights for its levels or weights proportional to the cell sizes, and these can give different answers, so the weights have to be stated.

In plain words When the same weights are used at every level of the factor, a main effect is an average of its simple effects. It summarizes a factor well when the simple effects are similar. When they differ, the average can differ from the effect under every one of the conditions, and reporting it alone hides that the effect depends on the other factor.

Example With equal weights, the current format averages (10+12)/2=11(10 + 12)/2 = 11 and the new format (14+20)/2=17(14 + 20)/2 = 17, a main effect of 66 points for A. For hints, (10+14)/2=12(10 + 14)/2 = 12 and (12+20)/2=16(12 + 20)/2 = 16 give a main effect of 44 points for B. That 44 lies between the simple effects 22 and 66, so it does not mean that hints add 44 points under either format.

Interaction

Definition Two factors interact when the simple effects of one differ across the levels of the other. In a 2×22 \times 2 design the interaction contrast is the difference of differences

ΔAB=(μ11−μ10)−(μ01−μ00),\begin{aligned} \Delta_{AB} &= (\mu_{11} - \mu_{10}) \\[0.4em] &\quad - (\mu_{01} - \mu_{00}), \end{aligned}

and rearranging shows that it also equals (μ11−μ01)−(μ10−μ00)(\mu_{11} - \mu_{01}) - (\mu_{10} - \mu_{00}), the difference of the simple effects of A. So the same interaction is found from either factor, as long as the subtractions keep the same direction. More generally, there is no interaction in an a×ba \times b design exactly when there are constants with μij=μ+αi+βj\mu_{ij} = \mu + \alpha_i + \beta_j for every cell, so that the effects add. Interaction depends on the scale on which the response is measured or modeled, and effects that add on one scale can interact on another. The estimated interaction varies from sample to sample, and the ordinary F test for it assumes independent normal errors with a common variance.

In plain words Interaction means that the effect of one factor depends on the level of the other, so a question such as how much hints help has no single answer. In a plot of the cell means with one line for each level of A, no interaction gives parallel lines. Interaction gives lines with different slopes, which may or may not cross.

Example For the scores,

ΔAB=(20−14)−(12−10)=6−2=4.\begin{aligned} \Delta_{AB} &= (20 - 14) \\[0.4em] &\quad - (12 - 10) \\[0.4em] &= 6 - 2 = 4 . \end{aligned}

Starting from the format instead gives (20−12)−(14−10)=8−4=4(20 - 12) - (14 - 10) = 8 - 4 = 4 as well. With the contrasts in hand, the ANOVA table for the balanced two-factor model is below.

SourceSSdfMSF
A72721172723636
B32321132321616
Interaction88118844
Residual884422
Total12012077

Under the ordinary model the interaction F of 44 with 11 and 44 degrees of freedom has p-value about 0.1160.116. With only four residual degrees of freedom, the estimated interaction of 44 points is not strong evidence of an interaction in the population, and it is not evidence of its absence either. To see the role of the scale, take cell means 1010, 2020, 2020 and 4040 for A0B0A_0B_0, A0B1A_0B_1, A1B0A_1B_0 and A1B1A_1B_1. Hints add 1010 points with A0A_0 and 2020 with A1A_1, an interaction of 1010 points, yet they double the mean under both formats, so the logarithms of these cell means show no interaction.

Randomized block design

Definition A block is a group of experimental units that are similar in a characteristic, known before treatment, that is expected to affect the response. In a randomized block design the treatments are randomly assigned separately within each block, and in a complete block design every treatment appears in every block. Treatments are compared within blocks, and the analysis includes the blocks, for example as an additive block term in the model. Randomizing within blocks restricts which assignments could have occurred, so a randomization test has to rearrange treatment labels only within blocks, as the design did. Blocking does not replace randomization, which still balances the characteristics not used to form the blocks, on average over the possible assignments.

In plain words First group similar units, then let chance assign the treatments inside each group. Each comparison is then made among comparable units, and the known differences between the groups are not counted as noise.

Example Suppose the eight learners form two blocks of four by prior experience, measured before assignment, and each block receives each of the four combinations once, at random. The constructed scores are below.

BlockA0B0A_0B_0A0B1A_0B_1A1B0A_1B_0A1B1A_1B_1
Less experience7101116
More experience13141724

The cell means are again 1010, 1212, 1414 and 2020, and the block means are 1111 and 1717. An analysis that ignores the blocks treats each cell’s two scores as replicates that differ only by noise. Its residual sum of squares is 7676 with 44 degrees of freedom, a residual mean square of 1919. With an additive block term, the blocks account for 7272 of that, with 11 degree of freedom, leaving a residual sum of squares of 44 with 33 degrees of freedom and a residual mean square of 4/3≈1.334/3 \approx 1.33. The treatment comparisons are then judged against far less noise. Those three residual degrees of freedom measure how the treatment differences vary between the blocks, so using them as error assumes that the treatment effects are the same in both blocks apart from noise.

Check yourself

  1. In the original scores, change only the A1B1A_1B_1 cell mean from 2020 to 1616. Find the simple effects of B, the interaction contrast and the main effects of A and B with equal weights.
Show the answer

The simple effects of B are 12−10=212 - 10 = 2 with A0A_0 and 16−14=216 - 14 = 2 with A1A_1, so the interaction contrast is 2−2=02 - 2 = 0 and the lines in the interaction plot are parallel. The format means are (10+12)/2=11(10 + 12)/2 = 11 and (14+16)/2=15(14 + 16)/2 = 15, a main effect of 44 points for A. The hint means are (10+14)/2=12(10 + 14)/2 = 12 and (12+16)/2=14(12 + 16)/2 = 14, a main effect of 22 points for B, which now equals both simple effects.

The absence of interaction is a statement about the score scale. As ratios, hints multiply the mean by 12/10=1.212/10 = 1.2 with A0A_0 and by 16/14≈1.1416/14 \approx 1.14 with A1A_1, which differ.

  1. A researcher assigns each of the four combinations to a single learner, records that learner’s scores on ten questions, and analyzes the 4040 question scores as a 2×22 \times 2 design with ten replicates per cell and 3636 residual degrees of freedom. What is wrong?
Show the answer

The treatment combinations were assigned to learners, so the learner is the experimental unit, and each cell has one replicate, not ten. The 3636 degrees of freedom measure how one learner’s question scores vary around that learner’s own mean, which says nothing about how different learners given the same treatment would differ. Treating the questions as replicates is pseudoreplication, and it usually makes the uncertainty look much smaller than it is.

At the level of learners, the model with interaction fits the four learner means exactly and leaves 00 residual degrees of freedom, so any difference between cells could simply reflect which learner happened to receive which combination. The remedy is to assign several learners to each combination. Dropping the interaction to free one degree of freedom would need a scientific justification stated in advance.

  1. For the two-block design in the last card, someone proposes a randomization test that shuffles all eight treatment labels freely among the learners, keeping two learners per combination. How many assignments did the design allow, how many does free shuffling use, and why does the difference matter?
Show the answer

Within each block the four combinations can be arranged among the four learners in 4!=244! = 24 ways, and the two blocks are randomized separately, so the design allowed 24⋅24=57624 \cdot 24 = 576 equally likely assignments. Free shuffling uses

8!2! 2! 2! 2!=2520\frac{8!}{2!\,2!\,2!\,2!} = 2520

assignments, most of which the design could never produce, such as assigning A1B1A_1B_1 to two learners from the more experienced block. Those assignments mix the large block difference into the reference distribution, so the test no longer matches how the treatments were actually assigned. A valid randomization test rearranges the labels within each block and uses only the 576576 assignments the design allowed.

How this lesson connects