Blocking, Stratification, and Pairing
Complete randomization can produce chance imbalance on variables that strongly predict the outcome. Blocking assigns units within prespecified groups so treatment and control are compared among similar units. It changes the assignment mechanism; it does not merely tidy the baseline table.
Prerequisites
Complete Randomization and Allocation. Use only information measured before assignment.
Learning goals
- Choose a small number of prognostic blocking variables before allocation.
- Distinguish blocking, stratification, matched pairs, and post-hoc adjustment.
- Carry the restricted assignment structure into the analysis.
Three related designs
Blocking partitions units into groups and randomizes within each group. Stratified randomization is the same core idea, often using categorical baseline strata. Matched-pair randomization forms pairs of similar units and randomizes one member of each pair to treatment. These designs guarantee arm counts within the chosen groups, not balance on every variable.
In Study Sprint, prior score band and tutorial section might predict the final score. Blocking by both can improve precision if every block has enough students. Adding many weak variables creates tiny or unique blocks, complicates implementation, and can make assignment impossible.
A deterministic comparison
This small simulation repeatedly allocates eight students. Complete randomization can separate low- and high-preparedness students; randomization within four matched pairs forces equal representation.
import random
scores = [50, 50, 55, 55, 65, 65, 70, 70]
pairs = [(0, 1), (2, 3), (4, 5), (6, 7)]
rng = random.Random(3620)
order = list(range(8))
rng.shuffle(order)
unblocked_treatment = set(order[:4])
blocked_rng = random.Random(3620)
blocked_treatment = {pair[blocked_rng.randrange(2)] for pair in pairs}
def imbalance(treated):
treatment = [value for i, value in enumerate(scores) if i in treated]
control = [value for i, value in enumerate(scores) if i not in treated]
return abs(sum(treatment) / len(treatment) - sum(control) / len(control))
print(f"unblocked imbalance={imbalance(unblocked_treatment):.1f}")
print(f"blocked imbalance={imbalance(blocked_treatment):.1f}")
This one draw illustrates the mechanism, not a universal performance guarantee. Blocking a strong outcome predictor usually improves precision; blocking a weak variable may add little. Pairing can be inefficient if pairs are poor or outcomes are analyzed as though the pair did not exist.
Design and analysis must agree
Record block definitions before assignment, the within-block allocation ratios, and how incomplete final blocks are handled. In analysis, compare within blocks or include block indicators using a prespecified method. For matched pairs, use paired differences or an equivalent model. Standard errors and randomization tests must respect the restricted assignment.
Blocking by a variable is different from adjusting for it after complete randomization. Both can improve precision, but only blocking changes which assignments were possible. Never construct blocks from post-treatment measurements.
Operational trade-offs
Central randomization can maintain concealment while allocating within strata. When enrollment is sequential, fixed small blocks can make future assignments predictable; varying block sizes may reduce that risk. Sparse strata, delayed baseline data, or misclassification should have a prespecified resolution rather than an analyst improvisation after seeing outcomes.
Common mistakes
- Blocking on many convenient variables instead of a few strong predictors.
- Forming pairs after outcomes are known.
- Ignoring blocks or pairs in the analysis.
- Assuming stratification fixes an unmeasured confounder or treatment-version problem.
- Reporting the illustrative draw as the expected precision gain.
Practice
Choose at most two pre-treatment variables for Study Sprint blocking. Justify their prognostic value, define the block boundaries, state the allocation within each block, and describe the matching analysis. Then explain what happens when a block has an odd number of students.
Next steps
Power, Minimum Effect, and Sample Size makes the design assumptions and decision threshold quantitative.
Primary sources
Checked 2026-10-15: NIST/SEMATECH, randomized block designs, NIST/SEMATECH, choosing an experimental design, and Fisher, The Design of Experiments.