Statohub Browse calculators
Experiments & Causality Practitioner guide

Blocking vs. Stratification: Assign Treatments or Select Samples?

Blocking vs stratification: learn when to block treatments inside an experiment versus stratify a sample, plus how an A/B conversion test applies each method.

By Statohub Editorial Team Published October 2026Reviewed October 202612 min read

Blocking is the technique you use inside experiments to assign treatments within homogeneous groups; stratification is what survey designers use to select representative samples. The diagnostic is simple: if you are assigning treatments, block; if you are selecting observations, stratify. When you run an experiment, block on strong pre-treatment predictors of the outcome.

Key takeaways

Point Details
Block to assign, stratify to select If you're assigning treatments, block; if you're selecting observations, stratify — the two techniques solve different problems even though both start by grouping similar units.
Choose covariates deliberately Pick one or two strong, pre-treatment predictors — especially baseline outcomes. Weak variables add little, and poorly chosen blocks can hurt precision in small samples.
Late covariates still have an answer When a covariate arrives after randomization, post-stratification or regression adjustment recovers nearly all of blocking's efficiency — except in small samples with too many strata.
Analyze the design you actually ran Include block indicators and use robust standard errors; unequal stratum sampling rates need inverse-probability weights, and stratified trials can still pool results across groups.

What do blocking, stratification, and post-stratification mean?

Both techniques start from the same idea: sort similar units into groups before chance enters the design. What you do with those groups next is what separates them. A randomized block design treats a nuisance factor as a blocking factor, so its contribution to experimental error can be removed from the comparison. Stratified sampling, by contrast, draws a sample from each group so that every subgroup is represented.

  • Blocking: you form homogeneous subsets of experimental units, then randomize treatments within each one.
  • Strata: the groups a population is divided into before you randomly select units from each of them.
  • Post-stratification: you group units after the data are collected and adjust the estimates accordingly.
  • Block size: the number of units per block. Blocks that are too small or too heterogeneous create estimation and attrition problems.
  • Matched pairs: a block of similar units, with one assigned to each arm.
  • Rerandomization: redrawing an assignment until covariate balance is acceptable.

How do blocking and stratification differ in practice?

The quickest way to tell them apart is to ask what happens after the grouping. Blocking and stratification both create homogeneous groups, but their analytical models differ: blocked experiments need estimators such as ANOVA or regression with block indicators, while stratified sampling relies on within-stratum sampling variance.

Blocks live inside an experiment; strata live in a sample drawn from a population. After grouping, blocking randomizes treatment assignment within each block, while stratification randomly selects units within each stratum. The purposes diverge the same way: blocking reduces variance in treatment comparisons, while stratification guarantees subgroup representation and reduces sampling variance in population estimates. The diagnostic checklist follows directly from that split — ask whether you control who receives a treatment, whether you control who enters the sample, or whether you do both, in which case you stratify the sample and then block the assignment within it.

Blocking and stratification compared
Dimension Blocking Stratification
Setting Lives inside an experiment Lives in a sample drawn from a population
Action after grouping Randomizes treatment assignment within each block Randomly selects units within each stratum
Purpose Reduces variance in treatment comparisons Guarantees subgroup representation and reduces sampling variance in population estimates
Analysis ANOVA or regression with block indicators Within-stratum sampling variance, inverse-probability weights when rates differ
Diagnostic question Do you control who receives the treatment? Do you control who enters the sample?

The two ideas are closely parallel in design, even though their error structures differ in analysis.

Block or stratify? A decision tree asks first whether you control who enters the sample, then whether you also control which units receive the treatment, to route the reader to blocking, stratification, both, or post-stratification. yes no yes no yes no Do you controlwho enters thesample? Do you alsocontrol whichunits receive thetreatment? Do you controlwhich unitsreceive thetreatment? Stratify thesample, thenblock theassignment Stratify: sampleunits from eachsubgroup Block: randomizetreatment withinhomogeneousgroups Neither — usepost-stratificationafter the dataare collected
Figure 1. The diagnostic that separates blocking from stratification: who controls treatment assignment versus who controls sample entry.

When should you block in an experiment?

Block when you can identify a pre-treatment variable that strongly predicts the outcome. Blocking works by grouping similar units and randomizing within groups, and standard Neyman-framework math shows the resulting efficiency gains. The payoff is largest in heterogeneous populations, where unblocked randomization could leave one arm with a lopsided mix of units by chance.

Blocking is most effective when the blocking variable is strongly prognostic of the outcome, and baseline measures of the outcome itself often deliver the best improvement in precision because they predict final results better than almost anything else.

Harvard CARES — 'To block or not to block, that is the question'

The same source offers a practical motto: block what you can and randomize what you cannot. Prioritize a few strong prognostic variables over many weak ones. A baseline test score in an education trial, or prior-period conversion in a product test, will usually beat a long list of demographic indicators. Blocking on relevant prognostic variables typically increases power, and in large samples it almost never harms precision. The real risk sits in small finite samples with poorly chosen blocks.

When should you stratify a sample?

Stratify when you control who enters the sample and you need every subgroup to appear in it. Survey designers use stratification for two reasons: to guarantee that subgroups are represented, and to lower the sampling variance of population estimates. Our guide to sampling methods covers the mechanics in detail.

  • Opinion polls: strata such as region or age band keep any one group from being under-sampled by chance.
  • Rare subgroups: a small group can be sampled at a higher rate so you get enough observations to say something about it.
  • Multistage surveys: strata are often defined first, with clusters then selected inside each.

Stratification changes how you estimate. When strata are sampled at different rates, each observation must be weighted by the inverse of its selection probability so the overall estimate reflects the population rather than the sample. Variance is then computed within strata and combined. A stratified trial, by the way, does not force separate subgroup reporting: the main analysis often pools across strata, since the goal is balanced assignment rather than mandatory subgroup tests.

What if you cannot block before randomizing?

Sometimes the covariate arrives late, or enrollment is rolling and blocks cannot be built in advance. Post-stratification is the usual fallback: you randomize as normal, then group units by the covariate and adjust the estimate afterward.

The catch is finite samples. With many strata, or strata chosen poorly, post-stratification can raise variance rather than lower it, a risk also noted in work on post-stratified treatment effect estimates. In practice: lean on post-stratification or regression adjustment when the sample is reasonably large and you have a handful of well-defined strata. With a small sample, keep the number of strata low or fall back on a simple covariate-adjusted regression. Rerandomization offers a third path when you can inspect balance before the experiment starts.

Which of the three fallbacks you reach for depends mostly on when the covariate became available and how many strata it would create. A covariate known only after enrollment closes rules out blocking outright, so the choice narrows to post-stratification versus a covariate-adjusted regression, and the sample size usually settles that call.

How do you implement blocking step by step?

Blocking implementation checklist

  1. Pick prognostic covariates Choose pre-treatment variables that predict the outcome. A baseline measure of the outcome is usually the strongest choice.
  2. Choose a block method Discrete strata work for categorical covariates. For continuous or several covariates, use matched pairs or a multivariate distance such as Mahalanobis distance. For very large experiments, threshold blocking and approximation algorithms build blocks efficiently and allow flexible block sizes. Set a minimum block size so every block can hold both treatment and control units, even after some attrition.
  3. Randomize within blocks Assign treatments separately inside each block. In blinded trials, avoid fixed block sizes: fixed-size blocks ensure balance but risk predictability, so use randomly mixed block sizes to protect allocation concealment.
  4. Pre-specify the analysis Write down the blocking variables, the block construction rule, and the estimator before data collection starts, and register them where your field expects it.

Pro Tip: If you must stratify a randomization, keep the number of stratifying variables small, since stratified randomization is commonly limited to two variables to preserve balance.

For background on randomization itself, see our guide to the randomized controlled trial.

Which estimator should you use after blocking?

You have three main options, and the right one depends on how much you want to squeeze out of the design.

  • Aggregated block differences: compute the treatment effect inside each block, then combine the estimates weighted by block size.
  • Regression with block indicators: include dummy variables for blocks so the model accounts for the block structure.
  • Lin (2013) estimator: interacts recentered covariates with treatment, and often improves power over the simpler options.
  • Attrition and empty blocks: a block that loses all of its treated or control units cannot contribute a within-block comparison, so plan for this before it happens.
  • Standard errors: never analyze a blocked experiment as if it were completely randomized, because the standard errors can be incorrect or misleading. Request robust standard errors, or use exact randomization inference when appropriate.

For related questions that arise after the main analysis, such as comparing several groups, see our guide to post-hoc tests.

A short worked example: blocking an A/B conversion test

Say you run a checkout test on a group of visitors, using illustrative numbers only. Each visitor has a baseline conversion-risk score from past behavior, which is strongly prognostic of whether they buy.

Blocking an A/B conversion test A five-step horizontal pipeline: form blocks by risk score, randomize inside blocks, estimate the within-block effect, compare precision to an unblocked design, then interpret the tighter confidence interval. 1 Form blocks Sort visitors by riskscore and group theminto blocks of similarvisitors. 2 Randomize insideblocks In every block, assignvisitors to the newcheckout or the old one. 3 Estimate Compute the differencein conversion withineach block, then averageacross blocks weightedby size. 4 Compare precision An unblocked designlumps high- and low-riskvisitors into one noisycomparison; the blockeddesign compares likewith like. 5 Interpret Report the effect with atighter confidenceinterval than anunblocked test wouldallow.
Figure 2. The five-step sequence for blocking an A/B conversion test on a baseline risk score.

A regression with block indicators gives a comparable answer to the aggregated, size-weighted estimate above. If the new checkout converts better within most blocks, you can report the effect with more confidence than an unblocked test would allow, because the standard error shrinks once the noisy variation from mixing high- and low-risk visitors is removed.

This is the same logic that makes blocking worth the setup cost in any experiment with a known, strongly prognostic covariate: the comparison inside each block is cleaner than the comparison across the whole sample, because the units being compared already resemble each other on the variable that would otherwise add noise. An unblocked design has to average over that noise; a blocked design removes it from the comparison before the randomization even happens.

What mistakes should you avoid?

  • Confusing assign and select. Reapply the diagnostic: blocking assigns, stratification selects.
  • Too many small blocks or strata. Finite-sample variance can inflate when blocks shrink toward a few units each.
  • Blocking on non-prognostic covariates, or building blocks so heterogeneous that units within them barely resemble each other.
  • Fixed, predictable block sizes in blinded studies, which let staff anticipate the next assignment.
  • Analysis errors: ignoring the blocks, mis-weighting block estimates, or failing to pre-specify the plan.

Our take: block thoughtfully, adjust when you cannot

Blocking earns its place when you have a strong prognostic variable and the discipline to commit to it before the data arrive. When you do not, post-stratification or regression adjustment recovers most of the benefit. Treat blocking as a design decision, not a statistical afterthought. Our checklist: pick one or two strong covariates, set a minimum block size, randomize within blocks, use mixed block sizes when blinded, pre-specify the estimator, and analyze with the block structure included. More worked cases live in our Applied Statistics hub.

Where to learn more on Statohub

Our Experiments & Causality hub pairs plain-English guides with applied examples, and our calculators let you check the numbers yourself. Try the probability calculator to see how chance imbalance shows up in small groups.

Sources

Sources

  1. To block or not to block, that is the question CARES, Harvard Graduate School of Education
  2. Stratified Randomized Experiments Kosuke Imai, Harvard University
  3. Experimental design matters for statistical analysis: how to handle blocking PubMed / National Library of Medicine
  4. 5.3.3.2. Randomized Block Designs NIST/SEMATECH e-Handbook of Statistical Methods
  5. Experimental and Sampling Structures: Parallels Diverging and Meeting (Fienberg & Tanur, 1987) International Statistical Review, via Carnegie Mellon University
  6. Agnostic notes on regression adjustments to experimental data: Reexamining Freedman's critique (Lin, 2013) Annals of Applied Statistics, via arXiv
  7. Stratification Clarification for Methods for Randomized Clinical Trials — Reply PubMed Central / National Library of Medicine

FAQ

Frequently asked questions

What is the main difference between blocking and stratification?
Blocking is used in experiments to assign treatments within groups of similar units. Stratification is used in sampling to select units from subgroups of a population. The grouping idea is shared, but the follow-up action differs.
Is post-stratification as good as blocking?
In large samples it comes close, with a variance difference on the order of 1/n². In small samples, many strata or poorly chosen strata can increase variance, so keep strata few and well defined.
Do you have to analyze a blocked experiment differently?
Yes. Include the block structure in the analysis, for example through regression with block indicators. Treating a blocked experiment as completely randomized can produce incorrect standard errors.
How do you keep blocked randomization unpredictable?
Use randomly mixed block sizes instead of one fixed size. Fixed blocks guarantee balance but let observers anticipate the next assignment, which can undermine allocation concealment.