Randomized Assignment and Blocking
Start with a customer file sorted by spend
Suppose higher-spend accounts tend to spend more next month even without an offer. Sending the offer to the upper half of this file confounds the offer with baseline spend. The experiment enrolls every account in the file. Random sampling would support generalization to a defined population. Random assignment supports estimating the effect of assignment among these enrolled accounts.
| Account | Spend band | Baseline spend |
|---|
| Rule | What is fixed before assignment? |
|---|---|
| Sorted split | Give the offer to the upper half of the file. Assignment follows baseline spend. |
| Independent coin flips | Draw independently for each account with a 50% offer probability. Total arm counts can vary. |
| Fixed-count shuffle | Shuffle 18 control and 18 offer labels across the file. Overall counts are fixed. |
| Shuffle within spend bands | Shuffle six offer and six control labels inside each of the three baseline bands. Counts are fixed by band. |
A chance baseline difference can move the realized estimate even in a valid randomization. For independent arms, the approximate variance is σ²offer/noffer + σ²control/ncontrol. With equal variances and comparable costs, 50/50 minimizes variance at a fixed total. Relative to 50/50, the variance is about 1.01 times as large at 44/56 and 1.56 times as large at 20/80.
Try all four rules in Blocks and balance.
Draw an assignment and audit it before outcomes
Use the same 36 IDs. Inspect the assignment ledger, group counts, spend distributions and signed standardized mean differences (SMDs). Repeat draws reveal only the distribution of estimated contrasts under an illustrative outcome schedule in which every offer adds 8 units.
How assignment changes the spread of estimated effects
Keep three checks distinct
- Reconcile distinct randomized IDs against the ledger. Check for duplicate IDs, missing records, and the stage where each discrepancy arose.
- Check counts. For independent assignment, a sample ratio mismatch (SRM) goodness-of-fit test compares recorded counts with the planned probabilities. A suitable exact binomial test handles sparse counts in two arms. For fixed quotas, reconcile observed counts directly to the ledger, overall and within each band.
- Check composition using pre-treatment summaries and SMDs. Here SMD divides the offer-minus-control mean by the square root of the average of the two sample variances. For simple randomization its approximate reference spread is √(1/noffer + 1/ncontrol), about 0.14 at 100 per arm. For blocking, simulate the actual allocation. Treat 0.1 as descriptive. With zero variance in both arms, the SMD is undefined. A small baseline p-value is a cue to trace eligibility, assignment and logging. Qualify or defer a causal conclusion if a material discrepancy is unexplained.
In a trial, known randomization provides the comparison and balance checks help diagnose implementation. In matching, balance checks assess the measured covariates after constructing a comparison group. See the matching balance diagnostics.
Plan and analyze blocks
Set boundaries using pre-treatment data. Keep tied spend values together or use a prespecified tie-breaker. Combine tiny bands when needed so both arms can be estimated. For an odd band under equal allocation, randomly decide who gets the extra slot using the planned rounding rule. Conceal the upcoming list during sequential enrollment, including with varying permuted block sizes. Equal counts by band still allow different average spend inside a band.
Randomize within each block. Prognostic blocks can improve precision, with no guaranteed reduction in a single realized interval. Equal allocation fractions across bands make the crude and block fixed-effect contrasts coincide when the planned fractions are realized exactly. With an intercept, omit a reference block indicator.
When allocation fractions differ, target the enrolled ITT by weighting each within-block difference by that block’s share of enrollment and using stratified uncertainty. A common-slope fixed-effect coefficient weights each block by Nbeb(1 − eb), its size times the within-block variance of the offer indicator, where eb is its offer fraction. Heterogeneous effects can make the averages differ.
Compare effects across a second factor
A prognostic block predicts the outcome. An interaction answers whether the effect of the offer changes across levels of a second factor on a stated scale. Here the scale is an average outcome in units, with a known within-cell SD of 20 and independent units.
| Group and offer status | Mean | n | Interval |
|---|
Compare the interaction contrast directly. One subgroup reaching significance while another falls short is insufficient evidence of heterogeneity. The equal-weight marginal effect still answers a population question when those weights describe the population. Continue to Uplift Modeling segments for targeting based on effect variation, or to Difference-in-Differences for a before/after comparison that relies on parallel trends.
Encouragement and uptake
In this separate synthetic trial, random assignment offers an encouragement, actual receipt is recorded for each unit, and follow-up is complete. Let Z be assigned encouragement, D be actual receipt and Y be the outcome. The intention-to-treat effect (ITT) compares outcomes by assignment. The first stage compares receipt by assignment.
Inspect the linked receipt and outcome records by compliance type
Compliance types are defined by potential receipt under both assignments. Always-takers receive in either arm, never-takers receive in neither, and compliers receive only when encouraged. The simulation assumes no defiers. In a trial, only one potential receipt is observed for each unit, so the types are latent.
Randomization identifies the assignment ITT given consistency, appropriate follow-up and no relevant interference. The Wald ratio divides outcome ITT by the first stage. A local average treatment effect (LATE) among compliers also requires relevance, exclusion of a direct encouragement effect, and monotonicity. In this unadjusted binary-instrument example the ratio equals just-identified two-stage least squares. Neither a baseline balance check nor a large first-stage F statistic establishes exclusion.
The displayed approximate Anderson–Rubin set collects receipt-effect values β that remain compatible with tests of the assignment effect on Y − βD, using the covariance of the linked records and independent arms. Blocking or clustering requires design-appropriate variance. An F threshold such as 10 gives no assurance about ordinary interval coverage. Weak instruments can produce unbounded sets.
Return to Threats to the estimate in the offer experiment to compare the offer assignment with the opening of that particular offer.