Understand the idea
Suppose you are comparing four fertilizers across a field, but the field has a fertility gradient: one end grows everything better regardless of fertilizer. If you ignore that gradient, it just adds noise that can hide real fertilizer differences. Blocking is the fix: divide the field into 'blocks' of similar ground (strips of similar soil), and make sure every fertilizer gets tried exactly once in every block. Comparisons happen WITHIN each block, where the soil is roughly the same, and the block-to-block differences cancel out of the comparison.
The analysis then splits the total variation into three pieces: how much is due to the treatment (what you actually care about), how much is due to the block (the nuisance you deliberately removed), and how much is unexplained noise. The treatment piece is what gets tested and reported; the block piece is not a hypothesis to chase: you block to remove its variation, not to prove blocks matter.
'Relative efficiency' answers a very practical question: was setting up the blocks worth the trouble? A relative efficiency of 1.5 means an ordinary (unblocked) design would have needed roughly 50% more experimental units to pin down the treatment differences this precisely: blocking bought real statistical power for free.
This block design analysis is a blocked ANOVA for a randomized complete block design, in which each block contains every treatment once, assigned at random.
A randomized complete block design is often shortened to RCBD.
Practitioner explanation
KernelStats fits the additive model y_ij = mu + tau_i + beta_j + e_ij via OLS with a Type II ANOVA decomposition (statsmodels), is built for the classic RCBD layout (one observation per treatment x block cell), and reports Tukey's HSD on the block-adjusted error term for all treatment pairs, holding the family-wise error rate at alpha (read it after a significant treatment F). It does not refuse other layouts: empty treatment x block cells produce a 'design is not complete' warning and the Type II OLS fit still runs, and unequal replication switches the comparisons to Tukey-Kramer. Relative efficiency versus a completely randomized design is reported as RE = [(b-1)*MS_block + b*(t-1)*MS_E] / [(bt-1)*MS_E]; RE > 1 means blocking increased precision, RE near 1 means it bought little.
The additive model assumes NO treatment-by-block interaction, which a single replicate per cell provides no degrees of freedom to estimate directly: the card checks residual normality (Shapiro-Wilk) and homogeneity of variance across treatments (Levene) as proxies, but genuine non-additivity (the treatment effect differing by block) is not separately tested here; the Learn More tab names Tukey's one-degree-of-freedom test for non-additivity as the formal check, which this function does not itself compute.
Partial eta-squared for the treatment effect is SS_treatment / (SS_treatment + SS_residual), deliberately excluding SS_block from the denominator, so the effect size reflects the treatment's share of the variation actually available to explain after blocking has already done its job, not diluted by the nuisance variation the design was built to remove.
When to use it
Consider it when
Several treatments were compared with experimental units grouped into blocks of similar units (field strips, batches, days), with every treatment appearing exactly once in every block, and a known nuisance source of variation needs to be removed from the treatment comparison.
Use caution when
An unbalanced layout with missing treatment x block cells (the card still runs but only warns; with holes in the layout a mixed model with random blocks is the sounder analysis), a design with more than one nuisance factor to control simultaneously (consider a Latin square or split-plot design), or residuals that badly fail normality (the Friedman test is the rank-based analogue).
Formulas and symbols
Treatment F-test
Mean square for treatment over the residual (error) mean square, from the two-way ANOVA of response on treatment plus block.
Relative efficiency of blocking
t treatments, b blocks. RE = 1.5 means a completely randomized design would need about 50% more replication to match this design's precision.
Partial eta-squared for treatment
Cohen's rough marks: 0.01 small, 0.06 medium, 0.14 large.
Assumptions and checks
- Homogeneity of variance (homoscedasticity). Unequal variance across treatments distorts the F-test's true Type I error rate, especially with unbalanced replication.
In KernelStats: Levene's test (median-centered) across treatment groups, computed when at least two treatment cells have 2+ observations; reported directly on the card.
- Normality (of residuals, not of the raw data). Non-normal residuals make the treatment and block F-tests approximate; the F-test is fairly robust for balanced designs but less so when the design is unbalanced or n is small.
In KernelStats: Shapiro-Wilk on the model residuals (for 3 to 5000 residuals), reported directly on the card.
- An RCBD model assumes treatment and block effects simply ADD, with no treatment-by-block interaction; if blocks respond differently to different treatments, the pooled error term absorbs that interaction and biases the F-tests.
In KernelStats: Not checked by KernelStats when there is one observation per treatment x block cell (the usual case), since there is then no residual degree of freedom left to test for non-additivity; the card states the assumption directly and names Tukey's one-degree-of-freedom test for non-additivity as the formal check it does not run.
Alternatives
- Friedman Test. Residuals clearly fail normality, or the response is ordinal rather than a continuous measurement: the rank-based nonparametric analogue of the RCBD.
- Split-Plot ANOVA. There are two treatment factors and one of them is hard to vary at a small scale (it must be applied to whole plots), rather than a single treatment factor compared within blocks.
- Linear Mixed-Effects Model. The design is unbalanced or has missing cells: fit block (and any hierarchy) as random effects via REML, which handles unbalanced and incomplete layouts more gracefully than the fixed-effects ANOVA.
Worked example
Scenario
Four wheat varieties (treatment) tested across three field blocks with a known fertility gradient, one observation per variety x block cell.
Result
Treatment F(3,6) = 8.42, p = .014; Tukey HSD finds variety D significantly outyields variety B; relative efficiency = 1.62 versus a completely randomized design.
Interpretation
Blocking was clearly worthwhile here (an unblocked design would have needed about 62% more plots to detect the same treatment differences this precisely), and variety D is the standout performer, distinguishable from B but not conclusively from A or C given this sample size.
Common misconceptions
Misconception
A significant block F-test is an important finding worth highlighting alongside the treatment result.
Correction
Blocks are a NUISANCE factor you controlled for, not a hypothesis under test. A large block F just confirms blocking was worth doing; a small one means it cost a little error degrees of freedom for little gain. Either way, you keep the design you ran: you never drop the block term after seeing its F-test, and the block result is not something to 'chase' or report as a finding in its own right.
Misconception
A non-significant treatment effect in an RCBD proves the treatments perform identically.
Correction
Absence of evidence is not evidence of absence: a non-significant result may simply reflect too little power (too few blocks, too much residual noise) to detect a real but modest treatment difference.
Read more: Misconception: a non-significant result proves there is no effect
References
- NIST/SEMATECH e-Handbook of Statistical Methods, §5.3.3.3 Randomized block designs, NIST/SEMATECH (2012), §5.3.3.3.
- Design and Analysis of Experiments, Montgomery, D. C. (2019).
