Why the Executed Assignment Mechanism Matters
In a response-adaptive trial, each assignment may depend on information available at that point, such as earlier responses and the current algorithm state. A randomization test therefore relies not just on the allocation rule written in the protocol, but on the probability law that actually generated the assignments. If a probability was changed without being recorded, a randomization distribution calculated from the protocol may not describe the trial that occurred.
A deviation does not automatically make randomization-based inference impossible. If the executed rule and its relevant history can be reconstructed, the reference distribution can be based on that rule. The difficulty is that an unrecorded or unreconstructable change leaves the assignment probabilities uncertain. In that case, using the planned probabilities as if they were the actual ones does not repair the problem.
For binary assignments, the conditional probability of a complete assignment path \(z=(z_1,\ldots,z_n)\), under the executed mechanism, is
Here each \(\pi_i\) must be evaluated using the history that would arise on the path being considered. In an adaptive design, it is generally not correct to hold later probabilities at their observed values while changing earlier assignments. The algorithm must be replayed on each candidate path, using the stipulated information available at each step.
When a Deviation Changes the Reference Distribution
A randomization-based test specifies a statistic \(T(Z,Y)\), where \(Y\) denotes the outcomes, and compares its observed value with values generated by the assignment mechanism under the null hypothesis. Under a sharp null of no effect for any participant, the potential outcomes are fixed and do not depend on assignment. The reference distribution is then obtained by varying assignments according to the mechanism that actually operated, while retaining the fixed outcomes and replaying any adaptive rule.
This procedure requires that the assignment law used for the replay is the true law conditional on the information being held fixed. In practice, that means knowing the relevant decision history and how each assignment was generated. A probability recorded in the protocol is not a substitute for a probability that changed during operation. Nor does a log of final treatment labels alone usually reveal whether a label came from a random draw, an override, or a skipped step.
A short justification explains why the law matters. Under the sharp null, hold the outcomes fixed and let \(Z\) be generated from the correct executed distribution. For an upper-tail test, define \(p(Z)=P\{T(Z',Y)\geq T(Z,Y)\mid Y\}\), where \(Z'\) is a fresh draw from that same distribution. Ordering possible statistic values from largest to smallest, the probability mass assigned to outcomes with a tail probability at most a given threshold cannot exceed that threshold; ties make the usual nonrandomized p-value conservative. Thus the reference p-value is valid under the null. If the calculation instead draws \(Z'\) from a different, planned distribution, this argument no longer applies.
Adaptive use of recorded prior responses is not, by itself, a deviation that invalidates inference. Those responses belong in the history, and the algorithm’s response to them belongs in the replay. In contrast, an unrecorded decision based on information unavailable to the stated randomization rule may make the actual assignment probabilities unknowable. If assignment depended on a clinician’s unrecorded prognosis, for example, the recorded protocol probabilities need not describe assignment conditional on the information that drove it.
Worked Example: A Changed Probability Alters the Tail Area
Suppose three participants have fixed outcomes \(Y=(0,1,2)\) under the sharp null. The protocol planned a treatment probability of \(0.5\) for every participant. During execution, a documented system change made the probabilities \((0.5,0.8,0.8)\). The observed assignments were \(Z=(0,1,1)\). Use the statistic \(T(Z,Y)=\sum_i Z_iY_i\) and calculate the upper-tail randomization p-value under each mechanism.
The observed statistic is \(T=0(0)+1(1)+1(2)=3\). Under the executed mechanism, \(T\geq3\) exactly when participants 2 and 3 are both assigned treatment. Participant 1’s assignment does not affect this condition. The executed-mechanism tail probability is therefore
Under the planned mechanism, the same tail event has probability \(0.5(0.5)=0.25\). The two calculations give different p-values because they use different assignment laws. The protocol-based value of 0.25 is not justified for this trial merely because it was the original plan. For example, at significance level \(\alpha=0.30\), that value would lead to rejection, while the executed-mechanism value of 0.64 would not.
Known Adaptive Updates and Documented Overrides
A deviation can still permit valid randomization inference when its operation is sufficiently recorded. If the assignment probability changes according to a known rule using recorded information, include that information in the assignment history and apply the rule on every simulated path. If an override is deterministic once a recorded pre-assignment condition is met, the reference distribution must respect that condition; it must not create assignments that the executed rule could not produce.
The next example isolates an adaptive update. It is not a claim that every mid-trial change is acceptable: the rule and the information that triggered it must be known well enough to reproduce the assignment law.
Worked Example: Replaying a Recorded Adaptive Update
Two participants are assigned in order. The first receives treatment with probability \(0.5\). A response of 1 from the first participant sets the second participant’s treatment probability to \(0.75\); a response of 0 sets it to \(0.25\). Suppose the first response is 1, the observed assignments are \(Z=(1,1)\), and the sharp null holds. Use \(T=Z_1+Z_2\) and find the upper-tail p-value.
Under the sharp null, the first response remains 1 for every candidate assignment path. Therefore, the replayed probability for the second assignment is \(0.75\) on every path. The path probabilities are
They sum to 1. The observed statistic is \(T=2\), and the event \(T\geq2\) occurs only for path \((1,1)\). Thus the upper-tail p-value is 0.375. Treating both assignments as fair coins would give 0.25, but would ignore the recorded response-driven update. This replay is valid only because the response, update rule, and assignment order are known.
Worked Example: A Prespecified Manual Override
Suppose participants 1 and 3 are assigned by independent fair randomizations, while participant 2 has a recorded pre-assignment override flag that deterministically assigns control. Under the sharp null, let \(Y=(2,10,3)\), and suppose the observed assignments are \(Z=(1,0,1)\). With \(T=\sum_i Z_iY_i\), find the upper-tail p-value under the executed rule, then compare it with a calculation that incorrectly treats all three assignments as fair coins.
The observed statistic is \(T=1(2)+0(10)+1(3)=5\). Under the executed rule, participant 2 is always assigned control, so only participants 1 and 3 vary. The four possible assignment pairs for those participants have probability \(0.25\) each. Only the pair \((1,1)\) gives \(T\geq5\), so the correct tail probability is \(0.25\).
If all three assignments are incorrectly treated as fair coins, then whenever \(Z_2=1\), the statistic is at least 10. This contributes probability \(0.5\) to the upper tail. When \(Z_2=0\), the statistic is at least 5 only if \(Z_1=Z_3=1\), contributing \(0.5(0.25)=0.125\). The incorrect tail probability is \(0.5+0.125=0.625\). The difference arises because the all-random calculation assigns positive probability to treatment assignments that the recorded override made impossible.
Records, Diagnostics, and Limits
A usable assignment record should make it possible to reconstruct both what happened and the information available at each decision. Depending on the design, this includes:
- participant eligibility, assignment order, timestamps, and the final assigned treatment;
- the planned and executed conditional probabilities, or enough information to reproduce them;
- the algorithm version, state, inputs, and randomization output at each step;
- the prior responses and covariates used to update allocation probabilities;
- skipped steps, manual overrides, treatment switches, reasons, and when each decision occurred.
Diagnose problems by comparing the assignment log against the algorithm’s expected transitions. Check that each probability is attached to the correct decision and history, that the recorded assignment is consistent with the draw or documented override, and that candidate-path probabilities sum to 1. Investigate unexplained changes, missing timestamps, duplicated or out-of-order records, and deviations whose triggers were not recorded. A mismatch is a signal to establish the actual mechanism, not a reason to silently substitute planned probabilities.
The inference target also matters. Randomization inference based on \(Z_i\) concerns the randomized assignment. If a participant assigned to treatment instead received control, an analysis of assigned treatment and an analysis of treatment received answer different questions. Replacing \(Z_i\) with treatment received does not preserve the original randomization distribution; inference about receipt requires additional assumptions and a method appropriate to that target.
When a deviation rule is documented, one can often condition on recorded pre-assignment information and replay the resulting mechanism. When an override is based on unrecorded information, or when the assignment law cannot be reconstructed, the intended design alone does not identify the correct randomization reference distribution. Sensitivity analyses under explicitly stated plausible mechanisms may show how conclusions vary, but they do not turn an unknown assignment law into a known one. Randomization-based inference is also limited to the null and statistic being tested; a valid sharp-null test does not automatically supply inference for a different, weaker treatment-effect null.
Common Mistake
Wrong reasoning: “The protocol used probability 0.5, so I can generate the randomization distribution using fair coins, even though some assignments were overridden.” This confuses the intended procedure with the procedure that generated the data. Correction: use the executed conditional probabilities and documented decision rules, replaying adaptive updates on each candidate path. If the executed rule cannot be reconstructed, state that limitation; do not present a protocol-based reference distribution as if it were the trial’s actual one.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A known response-driven update changes the next participant’s assignment probability. What must a randomization replay do with that update?
- Why can the sequence of final treatment labels alone be insufficient to reconstruct a valid reference distribution?
- A documented pre-assignment rule deterministically assigns some participants to control. Should simulated reference assignments allow those participants to receive treatment?
- What is the consequence of using planned probabilities when the executed probabilities are known to differ?
Solutions: (1) Include the recorded response and update rule in each candidate-path history, and recompute the probability along that path. (2) The labels do not reveal the conditional probabilities, algorithm state, random draw, decision timing, or whether an override or skipped step occurred. (3) No. The simulated assignments must follow the documented executed rule, including its deterministic assignments. (4) The reference distribution is generated from the wrong assignment law, so the resulting p-value is not justified by the randomization-test validity argument for the executed trial.