Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
Blocking is a design-stage control, not a statistical fix applied after the data are in. When a nuisance source of variation is known in advance — a batch, a day, a site, a subject, a plot of land — blocking groups experimental units so that variation falls between blocks rather than inside them, before a single treatment is assigned. That is a different move from measuring a covariate and adjusting for it afterward in the model. This guide covers what blocking actually does, how the randomized complete block design (RCBD) restricts randomization to make it work, how it changes the analysis of variance, and when it genuinely improves power over simply randomizing treatments across all units.
What Is Blocking in Statistics? A Short Definition
Blocking in statistics means arranging experimental units that are similar to one another into groups called blocks, then assigning each treatment within every block. The grouping variable is the blocking factor (or blocking variable), a nuisance source such as batch, day, site or subject that is not the research question but could still move the outcome. Blocking removes that source from the treatment comparison.
The textbook illustration is a shoe-sole test: instead of giving some volunteers the new sole and others the regular sole, each volunteer wears one of each, with the two soles randomly assigned to the left and right shoe. Each person acts as their own control, which makes the comparison more sensitive than a completely randomized design, as Wikipedia’s article on blocking describes. Here the volunteer is the block and the sole type is the treatment.
| Question | Completely randomized design (CRD) | Randomized complete block design (RCBD) |
|---|---|---|
| How is treatment assigned? | At random across all units | At random within each block |
| Is a nuisance factor controlled? | No, it is left in the error term | Yes, it is taken out as a block effect |
| Typical analysis | One-way ANOVA | Two-way ANOVA with treatment and block, no interaction |
| Best when | Units are homogeneous | A known nuisance source varies between groups of units |
Blocking is the experimental-design counterpart of stratification: both group units on a known factor before assignment. For survey designs see sampling method techniques, and for stratified allocation in trials see the REDCap randomization and stratification guide. When two nuisance factors must be controlled at once, a Latin square design extends the same idea.
Blocking Vocabulary and the Three Basic Principles of Experimental Design
The NIST/SEMATECH e-Handbook of Statistical Methods defines nuisance factors as those that “may affect the measured result, but are not of primary interest,” and says a nuisance factor is used as a blocking factor if every level of the primary factor occurs the same number of times with each level of the nuisance factor. The aim is to create homogeneous blocks in which the nuisance factors are held constant and the factor of interest is allowed to vary. Blocking variables are chosen before data collection because they are expected to affect the outcome; they are not tested for their own sake.
| Term | Role in the design | Example |
|---|---|---|
| Factor | The variable whose effect you want to estimate | Fertilizer type |
| Treatment | One level of the factor, or a combination of levels | Fertilizer A, B or C |
| Block (blocking variable) | A nuisance variable, with each level forming a group of similar units | Field 1 to Field 4 |
| Experimental unit | The smallest unit independently assigned a treatment | One plot in one field |
Blocking is one of the three principles in Ronald Fisher’s methodology for designing experiments: randomization (assigning units to treatments at random, which tends to mitigate confounding), replication (replicating full experiments to help identify the sources of variation) and blocking (the non-random arrangement of experimental units into groups, which reduces known but irrelevant sources of variation). In practice you block on what you know and randomize within blocks against what you do not. Replication needs care: repeated measures on one unit are not independent replicates, see pseudoreplication and the experimental unit.
Blocking is also different from permuted block randomization in clinical trials, which uses blocks only to keep group sizes balanced during enrolment. If the nuisance source is the order in which one subject receives conditions, see counterbalancing.
Blocking Controls a Known Nuisance Variable — It Is Not a Covariate Adjustment
A nuisance variable is a source of variation in the response that isn’t of research interest but still affects the outcome — reagent lot, litter, day of testing, plot fertility, technician, instrument. If it goes unmanaged, it inflates the variance that treatment differences have to be detected against, which is exactly what confounding looks like when the nuisance source also happens to correlate with treatment assignment.
Blocking handles this at the design stage: experimental units are first sorted into blocks — groups that are as homogeneous as possible internally, on the nuisance factor specifically — and only then is treatment assigned within each block. The block itself is never randomized to; it is a grouping variable fixed by the known source of heterogeneity (four reagent lots, five testing days, six litters), and randomization operates only inside it.
This is a genuinely different move from the more familiar fix of measuring a covariate and adjusting for it statistically after the fact (as in ANCOVA). Covariate adjustment is a post-hoc correction applied to data that were collected under a design that didn’t control for the source in the first place — it can reduce residual variance and correct for imbalance that randomization didn’t fully erase, but it depends on the covariate being measured accurately, on the relationship between covariate and outcome being modeled correctly, and on there being no leftover confounding the model can’t see. Blocking removes the nuisance source from the comparison by construction: because every treatment is compared to every other treatment within the same block, block-to-block variation cancels out of the treatment comparison regardless of how well any statistical model happens to capture it. The trade-off is that blocking has to be planned before data collection — it isn’t available as a rescue once the study has already run without it.
The Randomized Complete Block Design (RCBD): How It Works
The randomized complete block design is the standard implementation of blocking, and it follows R. A. Fisher’s original design-of-experiments logic (formalized in agricultural field trials, where “block” meant a plot of land with locally uniform soil conditions, and generalized since to any field). Three requirements define it:
- Blocks are formed on the nuisance factor. Units within a block are chosen or grouped specifically because they are similar on the variable being controlled for — same reagent lot, same day, same litter, same site — and different blocks are expected to differ on it.
- Every treatment appears in every block — that’s what makes it “complete.” If an experiment has four treatments, each block contains all four; a design where some blocks are missing a treatment is an incomplete block design instead (see block sizing, below), which needs a different analysis.
- Randomization happens within blocks, not across the whole experiment. Inside each block, which unit gets which treatment is assigned at random. Across blocks, nothing is randomized — block membership is fixed by the known nuisance source. This is a restriction on randomization relative to a completely randomized design (CRD), where treatment assignment is randomized across every unit in the study with no grouping at all.
A worked illustration, using round numbers rather than a real dataset: an assay compares three treatment conditions, and the reagent is known to vary meaningfully between the four lots available. Complete randomization would assign all 12 runs to treatments at random and let lot-to-lot variation land wherever it happened to land — potentially concentrating one treatment in one lot by chance. An RCBD instead treats each of the four lots as a block, runs all three treatments once within each lot, and randomizes only which run-position gets which treatment inside that lot. Lot-to-lot differences in the reagent no longer contaminate the treatment comparison, because every treatment was tested against every lot equally.
Choosing Block Size: Why Blocks Have to Be Complete
A block has to be large enough to hold at least one experimental unit per treatment — block size equal to the number of treatments is the minimum for a single-replicate RCBD, and a multiple of that number if you want more than one observation per treatment per block. This is a real constraint, not a formality: a litter with three pups can’t host a four-treatment RCBD as a complete block. Two options exist when natural block size falls short of the treatment count:
- Reduce block size and use an incomplete block design (e.g., a balanced incomplete block design, BIBD), where each block holds only a subset of treatments and the analysis has to account for which treatments were and weren’t compared within each block. This is a materially more complex analysis than the RCBD’s, and worth it only when complete blocks genuinely aren’t available.
- Use a larger or differently defined blocking unit that can accommodate every treatment — combining smaller natural groupings into a bigger block, if that’s defensible on the nuisance factor itself.
A second, more common sizing decision is how many nuisance dimensions to block on at once. Blocking on a single factor (one blocking variable) is standard RCBD. When two independent nuisance factors both need controlling — row and column effects on a plate, for instance — a Latin square design blocks on both simultaneously with the same restricted-randomization logic, at the cost of requiring the number of blocks to match the number of treatments in both directions.
How Blocking Changes the Analysis of Variance
A completely randomized design with one treatment factor is analyzed with a one-way ANOVA: total variation splits into a treatment sum of squares and an error sum of squares, and the F-test compares treatment variation against whatever’s left in error. Adding blocking changes that partition. An RCBD is analyzed as a two-way ANOVA with treatment and block as the two factors, ordinarily without an interaction term (a single observation per treatment per block gives no way to estimate one) — see CASRAI’s two-way ANOVA and running ANOVA in R guides for the mechanics of fitting that model. Total variation now splits three ways: treatment, block, and error.
The reason this matters for power: whatever sum of squares is attributable to blocks is subtracted out of the error term rather than left inside it. If the block factor genuinely explains real variation in the outcome, the mean square error in the RCBD analysis is smaller than the mean square error a CRD analysis of the same data would have produced — and a smaller error term means a larger F-statistic and more power to detect a real treatment effect, for the same sample size. Blocking costs a few degrees of freedom (one per block minus one, taken from what would otherwise be error degrees of freedom in a CRD), but if the block effect is real, the variance it removes from the error term more than pays for the degrees of freedom it consumes.
Randomized Block Design Formula and Degrees of Freedom
The assumed model is: observation = overall mean + treatment effect + block effect + random error (NIST/SEMATECH e-Handbook, section 5.3.3.2). Written out, yij = μ + τi + βj + εij, where yij is the response for treatment i in block j, μ is the overall mean, τi is the effect of treatment i, βj is the effect of block j, and εij is random error. With t treatments and b blocks, the sums of squares partition as SStotal = SStreatment + SSblock + SSerror.
| Source | Degrees of freedom | Sum of squares |
|---|---|---|
| Treatments | t − 1 | b Σ (mean of treatment i − grand mean)² |
| Blocks | b − 1 | t Σ (mean of block j − grand mean)² |
| Error | (t − 1)(b − 1) | SStotal − SStreatment − SSblock |
| Total | tb − 1 | Σ (each observation − grand mean)² |
The treatment test is F = MStreatment / MSerror on t − 1 and (t − 1)(b − 1) degrees of freedom. These degree-of-freedom rules match the Tamil Nadu Agricultural University randomized block field guide and the University of Texas RCBD course notes.
Worked Example: Three Fertilizers in Four Fields
Illustrative data constructed for this page, not from a real trial. A researcher compares three fertilizers (A, B, C) on yield (units per plot). Soil differs between four fields, so each field is a block and each field receives all three fertilizers on randomly placed plots.
| Treatment | Field 1 | Field 2 | Field 3 | Field 4 | Treatment mean |
|---|---|---|---|---|---|
| A | 20 | 24 | 18 | 22 | 21.00 |
| B | 26 | 29 | 23 | 27 | 26.25 |
| C | 23 | 25 | 21 | 24 | 23.25 |
| Block mean | 23.00 | 26.00 | 20.67 | 24.33 | Grand mean 23.5 |
Here t = 3 and b = 4, so there are 12 observations.
- SStreatment = 4 × [(21 − 23.5)² + (26.25 − 23.5)² + (23.25 − 23.5)²] = 4 × (6.25 + 7.5625 + 0.0625) = 4 × 13.875 = 55.50
- SSblock = 3 × [(23 − 23.5)² + (26 − 23.5)² + (20.667 − 23.5)² + (24.333 − 23.5)²] = 3 × (0.25 + 6.25 + 8.0278 + 0.6944) = 45.67
- SStotal = Σ (y − 23.5)² = 103.00
- SSerror = 103.00 − 55.50 − 45.67 = 1.83
| Source | df | SS | MS | F |
|---|---|---|---|---|
| Fertilizer (treatment) | 2 | 55.50 | 27.75 | 90.82 |
| Field (block) | 3 | 45.67 | 15.22 | descriptive only (see below) |
| Error | 6 | 1.83 | 0.306 | |
| Total | 11 | 103.00 |
The critical F for 2 and 6 degrees of freedom at α = .05 is 5.14, and the observed F = 90.82 gives p < .001.
What blocking bought in this example
If the same data were analysed as a one-way design that ignores fields, the block variation (45.67) would stay in the error term: SSerror = 103.00 − 55.50 = 47.50 on 9 df, MSerror = 5.28, and F = 27.75 / 5.28 = 5.26, p = .031. The treatment sum of squares is identical in both analyses; blocking changed only the error term, which fell from 5.28 to 0.31. That is the practical case for blocking: a strong nuisance source otherwise hides the treatment effect.
How to read the output
| What you see | How to read it |
|---|---|
| Treatment F large, p small | Mean yield differs among fertilizers after removing field differences. Follow with a post hoc comparison to see which pairs differ. |
| Block mean square much larger than error mean square | Blocking removed real nuisance variation. In the example, 15.22 against 0.306. |
| Block mean square close to error mean square | Blocking did little; the design is still valid, but the blocks cost degrees of freedom for no gain. |
| Partial η² for treatment | SStreatment / (SStreatment + SSerror) = 55.50 / 57.33 = .968 in the example. |
When Blocking Beats Simple Randomization for Power — and When It Doesn’t
The condition for blocking to help is specific, not automatic: the blocking factor has to actually explain a meaningful share of the variance in the response. When it does, an RCBD is more powerful than a CRD run on the same units and the same total sample size, because the error term shrinks by more than the lost degrees of freedom cost. This is the standard justification for blocking on batch, site, day, litter, or subject whenever that factor is known ahead of time to move the outcome — multi-site studies blocking on site, lab assays blocking on reagent lot or run date, and within-subject designs blocking on subject are all the same underlying logic.
The reverse also holds, and it is the reason blocking isn’t a default to reach for on every factor available. If the chosen blocking variable turns out not to meaningfully affect the response, the RCBD analysis still spends degrees of freedom removing it from the error term for no real variance reduction in return — the design ends up less efficient than a CRD would have been with those degrees of freedom left in error, for no offsetting benefit. Relative efficiency — comparing the estimated error variance an RCBD achieved against what a CRD on the same units would have produced — is the formal way to check this after the fact; the practical version is to block only on a factor there’s real prior reason to expect matters, not on every available grouping variable.
Blocking is also distinct from randomization itself, not a replacement for it: an RCBD still relies on randomization to assign treatments within each block, which is what protects against unknown and unmeasured confounders the way randomization always does. Blocking adds control over one known nuisance source on top of that; it doesn’t substitute for randomizing the rest.
Assumptions and Common Mistakes in a Randomized Block Analysis
- Additivity. The model has no treatment-by-block interaction. With one observation per treatment-block cell, an interaction cannot be estimated, so check it with an interaction plot of the cell values: roughly parallel lines suggest no interaction.
- Do not over-read the block F-test. The University of Texas RCBD course notes point out that mean squares for blocks can be defined, but the analysis does not give a legitimate F-test for “no block effect”, because randomization happens within blocks and not across them. Use the block mean square as a descriptive check on whether blocking helped.
- Normal, constant-variance errors and independence of the residuals, as in other ANOVA designs; see assumptions of two-way ANOVA for the checks.
- Blocking on a variable you analyse as a factor of interest. If the question is about the effect of field, field is a factor, not a block.
- Blocks that are not homogeneous. Blocking pays only when units within a block are more alike than units between blocks.
How to Report a Randomized Block Design (APA Example)
Adapt this sentence to your own results: “A randomized complete block ANOVA, with field as the blocking factor, showed a significant effect of fertilizer on yield, F(2, 6) = 90.82, p < .001, partial η² = .97.” Report the blocking variable, how treatments were randomized within blocks, and the error degrees of freedom. Replace the example numbers with your own output.
How to Calculate a Randomized Block Design in R or Python
R
d <- data.frame(
yield = c(20,24,18,22, 26,29,23,27, 23,25,21,24),
trt = factor(rep(c("A","B","C"), each = 4)),
block = factor(rep(1:4, times = 3)))
summary(aov(yield ~ trt + block, data = d))
Python (statsmodels)
import pandas as pd, statsmodels.api as sm
from statsmodels.formula.api import ols
d = pd.DataFrame({"yield_": [20,24,18,22, 26,29,23,27, 23,25,21,24],
"trt": list("A"*4 + "B"*4 + "C"*4),
"block": [1,2,3,4]*3})
m = ols("yield_ ~ C(trt) + C(block)", data=d).fit()
print(sm.stats.anova_lm(m, typ=2))
Both fit the same two-way main-effects model as the table above (treatment F = 90.82 on 2 and 6 degrees of freedom).
Frequently Asked Questions
What is blocking in experimental design?
Blocking is grouping experimental units into blocks that are internally homogeneous on a known nuisance variable, before treatments are assigned, so that block-to-block variation is removed from the treatment comparison rather than left in the error term. Treatments are then randomized only within each block.
What’s the difference between blocking and randomization?
Randomization assigns treatments to units by chance to protect against unknown and unmeasured confounders. Blocking is a restriction placed on that randomization for one specific, known nuisance source: units are first grouped by that source, and randomization happens only within each group. An RCBD uses both — blocking for the known factor, randomization within blocks for everything else.
What’s a real example of a randomized complete block design?
A multi-site trial that runs every treatment arm at every site, randomizing which participants at each site get which treatment, is an RCBD with site as the block. A lab experiment that runs every treatment condition once per reagent lot, randomizing run order within each lot, is the same design applied to a bench-science nuisance factor.
When should blocking be skipped in favor of simple randomization?
When there’s no known nuisance factor worth controlling for, or when a candidate blocking factor isn’t expected to meaningfully affect the outcome. Blocking on a factor that doesn’t actually explain variance still costs degrees of freedom in the analysis without reducing the error term enough to pay for them, making the design less efficient than a straightforward CRD.
Is blocking the same as stratification?
They’re close relatives built on the same logic — grouping units on a known factor before assignment — but stratified randomization is the term generally used in survey sampling and clinical-trial allocation, while blocking and the RCBD are the classical experimental-design and ANOVA framing of the same idea. The mechanics and the justification (remove a known nuisance source from the comparison) are the same.
What are the three basic principles of experimental design?
Randomization, replication and blocking. Randomization protects against unknown influences, replication helps identify the sources of variation, and blocking removes variation from a known nuisance source.
How is a blocking variable different from a treatment factor?
A treatment factor is the variable you want to learn about. A blocking variable is a nuisance variable you control for; its effect is estimated only so it can be removed from the error.
Is there a blocking formula?
The model is y = μ + treatment effect + block effect + random error, analysed with the sums of squares and degrees of freedom shown in the formula section above.
Related CASRAI Resources
- Experimental Design — the manipulation/control/randomization taxonomy blocking sits inside.
- ANOVA (Analysis of Variance) and the full ANOVA guide — how the F-test blocking relies on actually works.
- Confounding Variable — the problem blocking is designed to prevent.
- Power Analysis and Sample Size Calculation and Statistical Power Analysis & G*Power — for sizing a blocked design in advance.
- Degrees of Freedom in Statistics — what blocking spends to buy its variance reduction.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, section 5.3.3.2, Randomized block designs (checked 2026-11-14)
- Wikipedia, Design of experiments, Fisher’s principles (checked 2026-11-14)
- University of Texas at Austin, Randomized complete block designs, course notes (checked 2026-11-14)
- Tamil Nadu Agricultural University, Randomised Block Design field guide (checked 2026-11-14)
- Worked-example statistics recomputed with scipy and statsmodels.







