Preserved original teaching and transfer history, integrated with complete current on-site preparation. Independent human review/testing remain pending.
The observation, assignment and target units can differ
A service business wants to know whether a new appointment script reduces missed visits. Its database has one row per visit. That storage choice does not tell us what counts as an independent assignment. If the script is assigned to a branch for an entire week, all visits in that branch share the assignment and may share staffing, weather, customer mix and operating conditions. Counting every visit as if it received a separate random treatment creates an appearance of replication that the design did not produce. The number of rows answers a storage question; the assignment mechanism answers an inferential question.
Start by stating three units. The observation unit is what gets measured: perhaps a scheduled visit. The assignment unit is what receives the intervention: perhaps a branch. The target unit identifies the population about which a claim is intended: perhaps future visits in these branches, or branches throughout a region. They can coincide, but that must be established. A branch-randomized experiment does not become an individually randomized experiment when an analyst exports the visit table. Likewise, random assignment within six participating branches does not show that those branches were randomly sampled from the region. Assignment supports a treatment comparison under the actual design; population generalization needs an additional argument.
This chapter uses a small, fully enumerated randomization example to make the design visible. It is not a recommended sample-size plan. The small assignment space deliberately limits attainable evidence. In an operational study, define outcomes, exclusions, assignment restrictions, interference concerns and the analysis plan before seeing treatment results. Protect the assignment record rather than reconstructing it from final outcomes. If the intervention affects neighboring branches or customers move between branches, the simple no-interference interpretation also requires reconsideration.
An exact test follows the assignments that could have occurred
Suppose six branches have fixed observed scores 2, 3, 4, 7, 8 and 9. Three branches were randomly assigned to the new script, with all choices of three equally likely. The observed treated group has scores 7, 8 and 9; its mean is 8. The comparison mean is 3, so the treated-minus-comparison difference is 5. There are 20 possible assignments because six choose three equals 20. Under a sharp null of no effect on any branch, each branch's observed score would stay the same under every reassignment. We may therefore enumerate all 20 assignments and recompute the difference for each.
Only the allocation of 7, 8 and 9 to treatment produces a positive difference as large as 5. With the direction specified in advance, the one-sided randomization p-value is 1/20, or .05. For a two-sided absolute-difference statistic, the reversed allocation also has magnitude 5, making the result 2/20, or .10. These are different questions. Choosing the favorable direction after examining the result does not preserve the predeclared one-sided test. The supplied reproduction file enumerates rather than simulates the assignment space, so it has no Monte Carlo approximation error.
The interpretation is conditional on the sharp null, design and chosen statistic. It is not a .95 probability that the script works, a .05 probability that the null is true, or an estimate of the effect on every future customer. It also does not establish the mechanism. A deliberately small example makes another limit plain: three assigned branches per arm cannot generate an arbitrarily fine exact p-value. More visit rows within the same six assignments do not enlarge this assignment space. Different statistics, assignment restrictions and null hypotheses require their own analysis rather than reuse of these 20 numbers.
Weighting changes the question rather than repairing the answer
Imagine branch A has 10 visits and branch B has 100. Giving the two branch rates equal weight estimates a mean across branches. Pooling missed visits and scheduled visits estimates a visit-weighted rate across this observed set. Neither is automatically the universal correct answer. A decision about the average branch may reasonably use a branch target; a decision about total regional workload may emphasize visit volume. Explain which estimand the weighting addresses before computing a standard error. Unequal cluster size can matter especially when branch size is associated with outcomes or treatment response.
For a concrete descriptive contrast, branch A misses 4 of 10 visits and B misses 10 of 100. The unweighted mean of the two rates is (.40+.10)/2=.25. The pooled rate is 14/110, approximately .1273. Calling the first a calculation error would obscure its actual target. Calling the second the average branch rate would obscure its weighting. Neither calculation establishes a causal treatment effect because the example has not yet specified a comparison design. The task is to name the target, compute the corresponding quantity and preserve the distinction between a descriptive estimate and an inferential claim.
If randomization occurred within matched pairs, reassignment must respect those pairs. If a study assigned at branch level but analyzed visit-level outcomes, uncertainty estimation must address that structure. If assignment was not randomized, arbitrary relabeling is not justified by convenience. Regression adjustment can address specified measured differences under assumptions, but it cannot retroactively create a known randomization mechanism. A useful conclusion records what is learned under the design and what remains conditional, rather than transforming an attractive contrast into general proof.
Worked example
Six branches were completely randomized, three per arm. Scores are [2,3,4,7,8,9]; treatment received [7,8,9]. The preregistered statistic is the treated-minus-control mean. Enumerate the sharp no-effect null.
The total score is 33. For a treated-score sum S, the difference is S/3-(33-S)/3=(2S-33)/3. Observed S=24 gives 5. Only the largest three-score subset reaches S=24, so one of 20 assignments reaches a positive difference of at least 5. Reversing the groups yields -5; thus two of 20 reach absolute magnitude at least 5. Report .05 one-sided if that direction was specified before outcomes, and .10 for the absolute two-sided statistic. Neither number measures a posterior probability or demonstrates regional generalization. The downloadable script prints every allocation so the result can be audited.
Progressive independent practice
Write your analysis before opening each model. Then change the stated fact and revise the reasoning.
Foundation
A report says there were 600 independent random assignments because 600 visit rows were recorded. Assignment actually occurred once in each of six branches. Identify the mistaken unit.
Compare the model reasoning
There were six branch assignment units. Visit records are observations nested within assignments. Their dependence and shared treatment must be considered; no independence claim follows from the row count.
Changed conditions
Each visit was individually randomized, but the script given to one customer changed staff behavior toward later customers.
Compare the revised analysis
The assignment unit changes, but interference is now a separate concern. Individual randomization does not by itself guarantee that each outcome depends only on its own assignment.
Application
Recompute the exact one-sided and absolute two-sided values if the treated branches have scores 2, 3 and 9.
Compare the model reasoning
The treated sum is 14 and difference is -5/3. For the positive-direction one-sided test, 16 of 20 assignments have a sum at least 14, giving .80. For the two-sided statistic, sums at most 14 or at least 19 qualify: 7+7=14 allocations, .70. List the allocations before interpreting the result.
Changed conditions
The investigator now chooses a negative one-sided alternative after observing the negative difference.
Compare the revised analysis
That is a data-dependent change. The negative-tail count is 7/20=.35, but it cannot be described as the result of the original positive-direction plan. Preserve the original test and label any exploratory alternative.
Transfer
A regional manager requests a visit-weighted causal effect from a six-branch experiment whose planned analysis used equally weighted branch rates. Write a defensible response.
Compare the model reasoning
Explain that the requested target differs from the planned branch-average effect. Retain the planned estimate, specify a separate visit-weighted estimand and determine whether the actual assignment and recorded denominators support its estimation and uncertainty analysis. Describe branch recruitment limits and potential interference. Do not silently replace the original result with the more favorable weighting.
Changed conditions
A recovered record shows that the two largest branches were assigned deterministically to treatment.
Compare the revised analysis
The complete-randomization enumeration no longer represents the actual design. Reconstruct the assignment mechanism and any restrictions. The original 20-allocation exact p-values cannot be carried forward as valid design-based evidence.