Section 11.9

Blocking

Definition

Blocking is an experimental design technique. Before any outcome is measured, the runs are grouped into blocks that share one value, or level, of a known nuisance factor (a factor that affects the outcome but is not being studied), such as the same board or the same day. Every condition is run inside each block and compared there, so whatever the block adds equally to all its measurements cancels. A block is chosen for the comparison; a cluster is a group of observations that share a source of variation.

The idea

Two boards are available to compare an old and a new software version. Board A answers in about 10 milliseconds (ms) and board B in about 100 ms, because their hardware differs, and the new version adds 2 ms. If board A runs the old version and board B the new one, the comparison gives 102−10=92102 - 10 = 92 ms: the difference between the boards is credited to the software. If a coin decides which board runs which version, the result is either 92 ms or 12−100=−8812 - 100 = -88 ms, each with probability one half. The average of the two possible results, (92−88)/2=2(92 - 88)/2 = 2 ms, is right, but every single experiment is wrong by about 90 ms.

Blocking runs both versions on each board and subtracts inside the board: 12−10=212 - 10 = 2 ms on A and 102−100=2102 - 100 = 2 ms on B. The 90 ms between the boards never enters a comparison. A classic textbook illustration compares two materials for shoe soles: each child wears one sole of each material, on the left or the right foot as a coin decides, so differences in how much the children run about cancel. The picture stops being exact where a block stops being uniform: a child’s two feet differ, and two runs on one board happen at different moments. Randomizing inside the block keeps such differences from favoring one condition systematically, though one particular draw can still favor one by chance. A paired design §11.7 is the simplest case of blocking, with blocks of two.

How it works

  1. List the nuisance factors expected to move the outcome, using only knowledge available before any outcome is seen: the board, the day, the workload. Choose the largest one, or a combination, as the blocking factor.

  2. Form blocks that can each hold every condition. A block that holds only one condition offers no comparison inside it. A design in which every block contains every condition is called a complete block design.

  3. Randomize inside each block: which run gets which condition, or in which order the conditions run. Blocking removes the factor that defines the block; randomization §11.8 protects against the factors that still vary inside it.

  4. Compute one contrast per block: the treatment value (the changed condition) minus the baseline value (the reference condition).

  5. Combine the block contrasts with weights that match the question. Equal weights give the average effect over the blocks, each block counting once; weights proportional to each block’s share of a target population give the average effect in that population.

  6. Estimate the uncertainty from the variation between the block contrasts. The number of independent pieces of evidence is the number of blocks, not the number of measurements.

Blocks and clusters are easy to confuse. A block is a decision about how to compare. A cluster is a fact about the data: observations in one cluster share a source of variation, such as one board or one boot session, so they are not independent of each other. The same board can be both. Runs of both versions on one board form a block because the comparison is made there; the 50 measurements of one version on that board form a cluster because they share the board’s peculiarities. A cluster must be kept whole when estimating uncertainty, as the cluster bootstrap §11.21 does by resampling whole clusters. Counting its members as independent is pseudoreplication §11.6.

Worked example

Take an idealized model without measurement noise. The overall level is 10 ms, board A adds 0 ms, board B adds 90 ms, and the treatment adds 2 ms.

The board offsets of 0 and 90 ms cancel, and both blocks report the effect, 2 ms.

Now let the treatment add 8 ms on board B. Board B’s treatment value becomes 10+90+8=10810 + 90 + 8 = 108 ms and its contrast 108−100=8108 - 100 = 8 ms. The equal-weight average of the two contrasts is (2+8)/2=5(2 + 8)/2 = 5 ms. That number correctly answers the question of the average effect over these two boards, but no single effect describes both boards. An effect that differs from block to block is called an interaction between treatment and block. It is a finding to report, not noise to average away, and the blocked design reveals it because it measured the effect on each board separately.

Stated precisely

Write Yij=μ+αi+τZij+εij,Y_{ij} = \mu + \alpha_i + \tau Z_{ij} + \varepsilon_{ij}, where YijY_{ij} is the outcome of run jj in block ii, μ\mu (mu) is the overall level, αi\alpha_i (alpha) is the amount that block ii adds, ZijZ_{ij} is 1 if the run receives the treatment and 0 if it receives the baseline, τ\tau (tau) is the treatment effect, and εij\varepsilon_{ij} (epsilon) is the remaining variation of that run. In the first worked case μ=10\mu = 10, αA=0\alpha_A = 0, αB=90\alpha_B = 90, τ=2\tau = 2 and every εij=0\varepsilon_{ij} = 0, all in ms.

For a treatment run tt and a baseline run bb in block ii, the contrast is Yit−Yib=τ+(εit−εib).Y_{it} - Y_{ib} = \tau + (\varepsilon_{it} - \varepsilon_{ib}). The block term αi\alpha_i has canceled. Suppose the ε\varepsilon values are independent, each with variance §11.14 σ2\sigma^2 (sigma squared), where variance is the average squared distance of a quantity from its mean; then the contrast has variance 2σ22\sigma^2. A treatment run in block ii compared with a baseline run in another block kk also carries αi−αk\alpha_i - \alpha_k. If the block terms vary from block to block with variance σα2\sigma_\alpha^2, independently of each other and of the ε\varepsilon values, that comparison has variance 2σα2+2σ22\sigma_\alpha^2 + 2\sigma^2. Blocking removes the term 2σα22\sigma_\alpha^2.

The block term drops out only under three assumptions. Additivity: αi\alpha_i is the same under both conditions in block ii, so there is no interaction between treatment and block. Stability: the block’s level does not change between its runs. No carryover: an earlier run does not change the outcome of a later run.

Limits and common mistakes

A block with only one condition compares nothing. The condition and the block are then confounded, and only an assumption about the blocks, not the data, can separate them.

Blocks must be formed from information that exists before the treatment. Grouping runs by something the treatment can change, such as the temperature measured during the run, can create a difference that was not there.

Blocking does not remove carryover. If the first run in a block warms up the board, the second run differs for that reason too. Randomize or alternate the order inside blocks, and leave time between runs.

The analysis must follow the design. In a balanced design, where every block holds every condition equally often, ignoring the blocks leaves the estimate unchanged but puts the variation between blocks back into the uncertainty, which wastes the design. Treating many runs inside one block as independent overstates the evidence.

Blocking on a factor that does not affect the outcome has a small cost: each block’s level is estimated from the data, which leaves less information for estimating the noise.

When a block cannot hold every condition, an incomplete block design gives each block a subset of the conditions, often so that every pair of conditions appears together in the same number of blocks.

Blocking controls only the factor that defines the blocks. Nuisance factors that vary inside a block are balanced only by randomization.

Questions answered

Which factor should define a block and which should define a cluster?

A block should be defined by a known nuisance factor (one that affects the outcome but is not being studied) that is fixed before the experiment, is expected to shift the outcome strongly, and allows every condition to be run inside each of its levels: the board, the day or the workload. A cluster should be defined by whatever actually makes observations share variation in the data collected: all measurements from one board, one boot session or one radio connection. The block decides how to compare: inside each block, so that the block’s level cancels. The cluster decides how to count the evidence: each cluster is one independent piece, so uncertainty comes from the variation between clusters. One factor can be both: a board is a block when both versions run on it, and its many measurements form a cluster. Both choices must appear in the analysis, with contrasts formed inside blocks and uncertainty estimated from whole clusters, never from individual measurements.

Related entries: Paired design (§11.7), Cluster bootstrap (§11.21), Confounding (§11.10), Randomization (§11.8), Pseudoreplication (§11.6).