From a Design Specification to Assignments
A doubly adaptive biased coin design (DBCD) has two changing inputs: an estimated target allocation and the allocation counts accumulated so far. A complete design therefore needs more than a target such as “allocate 60% to arm 1.” It must state how responses produce the estimated target, how the current allocation proportions enter the coin rule, how the rule is initialized, and how each random assignment is made.
This workshop uses a two-arm design and a fixed bias parameter \(\gamma=2\). The response estimator and target function below are chosen for illustration; they are hypothetical design choices, not recommendations for a particular trial. The calculations show how to move consistently from response data to a target, from the target and allocation counts to a randomization probability, and from that probability to an assignment.
Assumptions and Inputs Before the Coin Rule
For the calculations below, both arms are available for assignment, and each participant receives exactly one assignment. At the point of randomization, the response data used by the estimator and the allocation counts are known. The estimator and target map are applied according to their prespecified definitions; no response is silently dropped or substituted. Random draws are made according to the stated conditional probability, rather than by deterministic rounding.
The illustrative responses are binary, with \(Y=1\) denoting a response and \(Y=0\) a nonresponse. In arm \(j\), let \(S_j\) be the number of responses among \(N_j\) observed participants. Use the smoothed estimator \(\hat\theta_j=(S_j+1)/(N_j+2)\), and define the target map as \(\hat\rho_1=\hat\theta_2/(\hat\theta_1+\hat\theta_2)\), with \(\hat\rho_2=1-\hat\rho_1\). The smoothing keeps each estimated response rate strictly between 0 and 1 for finite counts. The target is also strictly between 0 and 1 because both estimated rates are positive.
This target map gives a larger target share to arm 1 when its estimated response rate is lower than arm 2’s; it is an illustrative rule, not a universal clinical objective. Other target functions encode other design goals. In an actual specification, the target function, response definition, estimator, any smoothing, and timing of response updates must all be stated before the trial begins.
The allocation proportions in the DBCD formula are computed from assignment counts, not from responses. For the displayed formula to be directly defined, both arms must have positive counts before the next allocation. A design must therefore specify an initialization that assigns at least one participant to each arm, or explicitly define a separate start-up rule before using the ordinary DBCD formula.
Why the Allocation-Ratio Correction Has This Form
The DBCD weight for arm \(j\) is proportional to its estimated target share multiplied by a power of the ratio between target share and current allocation share: \(\hat\rho_{n,j}(\hat\rho_{n,j}/\pi_{n,j})^\gamma\). Combining powers gives \(\hat\rho_{n,j}^{\gamma+1}/\pi_{n,j}^{\gamma}\). Dividing each weight by the sum of both weights produces probabilities that add to one. This algebra also explains the direction of the correction.
If an arm’s current allocation proportion is below its target, then \(\hat\rho_{n,j}/\pi_{n,j}>1\), so the correction increases its weight relative to the uncorrected target share. If it is above target, the ratio is below one and its weight is reduced. When \(\gamma=0\), the correction disappears and \(p_{n+1,j}=\hat\rho_{n,j}\). Increasing \(\gamma\) strengthens the response to a mismatch in this one-step rule; it does not make the target share equal to the next participant’s assignment probability.
Worked Example: Compute the First Allocation Probability
Suppose a hypothetical initialization has three assignments: two to arm 1 and one to arm 2. Their binary responses are \(1,0\) in arm 1 and \(1\) in arm 2. Use the specified smoothed estimator, target map, and \(\gamma=2\) to calculate the probability of assigning the fourth participant to arm 1.
The response estimates are \(\hat\theta_1=(1+1)/(2+2)=0.5000\) and \(\hat\theta_2=(1+1)/(1+2)=0.6667\). Thus \(\hat\rho_1=0.6667/(0.5000+0.6667)=4/7\), and \(\hat\rho_2=3/7\). The allocation proportions are \(\pi_1=2/3\) and \(\pi_2=1/3\). Both arms have positive counts, and the response information needed for the estimator is available.
With \(\gamma=2\), the two weights are \(w_1=(4/7)^3/(2/3)^2=144/343=0.4198\) and \(w_2=(3/7)^3/(1/3)^2=243/343=0.7085\). Therefore \(p_{4,1}=0.4198/(0.4198+0.7085)=144/387=0.3721\), and \(p_{4,2}=0.6279\). Arm 1’s target share is \(0.5714\), but its current allocation share is \(0.6667\); being over its target helps explain why its next-assignment probability is below its target share.
Worked Sequence: Recompute After Each Response
A DBCD is sequential: after an assignment and an observed response, the next probability is calculated from the updated state. The following hypothetical sequence starts from the same three-person initialization. Use independent uniform draws for the randomization step, assigning to arm 1 when \(U\leq p_{n+1,1}\) and to arm 2 otherwise. The draws and subsequent responses are stipulated for illustration.
From the previous example, \(p_{4,1}=0.3721\). Let the hypothetical draw be \(U_4=0.30\). Since \(0.30\leq0.3721\), assign participant 4 to arm 1. Suppose the observed response is \(Y_4=0\).
Now \(N_1=3,S_1=1\), while \(N_2=1,S_2=1\). The estimates are \(\hat\theta_1=(1+1)/(3+2)=0.4000\) and \(\hat\theta_2=2/3\). Hence \(\hat\rho_1=(2/3)/(0.4000+2/3)=5/8=0.6250\). The allocation proportions are \(\pi_1=3/4\) and \(\pi_2=1/4\).
The weights are \(w_1=(5/8)^3/(3/4)^2=125/288=0.4340\) and \(w_2=(3/8)^3/(1/4)^2=27/32=0.8438\). Thus \(p_{5,1}=125/(125+243)=125/368=0.3397\). Let \(U_5=0.80\). Because \(0.80>0.3397\), assign participant 5 to arm 2; suppose the response is \(Y_5=1\).
Before participant 6, \(N_1=3,S_1=1\) and \(N_2=2,S_2=2\). Then \(\hat\theta_1=2/5=0.4000\), \(\hat\theta_2=3/4=0.7500\), and \(\hat\rho_1=15/23=0.6522\). The allocation proportions are \(3/5\) and \(2/5\). The weights are \(w_1=(15/23)^3/(3/5)^2=9375/12167=0.7702\) and \(w_2=(8/23)^3/(2/5)^2=3200/12167=0.2630\), giving \(p_{6,1}=9375/(9375+3200)=0.7455\). With hypothetical \(U_6=0.60\), assign participant 6 to arm 1.
The direction of the probabilities changes across this sequence because both the response-based target and the observed allocation proportions change. In particular, the fourth participant’s assignment probability is not reused for participant 5: the response and assignment counts have changed. A reproducible implementation records the inputs and intermediate values at each step, not just the final arm assignment.
Worked Example: Audit a Supplied Target and a Coin Rule
Suppose at some later step a supplied target is \((0.6,0.4)\), the current allocation proportions are \((2/3,1/3)\), and \(\gamma=2\). Check the probability calculation and determine which arm is under its target share.
The weights are \(w_1=0.6^3/(2/3)^2=0.216/(4/9)=0.4860\) and \(w_2=0.4^3/(1/3)^2=0.064/(1/9)=0.5760\). Therefore \(p_1=0.4860/(0.4860+0.5760)=0.4576\), and \(p_2=0.5424\). The current share of arm 1, \(0.6667\), exceeds its target \(0.6\), whereas arm 2’s current share, \(0.3333\), is below its target \(0.4\). The computed probability is below 0.6 for arm 1 and above 0.4 for arm 2, consistent with the correction’s direction.
A quick audit catches an arithmetic error if the arm 2 weight is recorded as \(0.1920\): \(0.4^3/(1/3)^2=0.064/(1/9)=0.5760\), not \(0.1920\). Using the wrong denominator calculation would produce a misleading probability and contradict the stated allocation-ratio correction.
Implementation Checks and Failure Modes
Before using a DBCD, check that each update follows the intended order: identify the data available before the assignment, calculate the estimator and target from those data, combine them with the current allocation counts, draw an assignment, and only then incorporate the new participant’s response when it is observed. If responses are delayed, the specification must say how the estimator is computed using the responses actually available at that time.
- Initialization failure. If an arm has zero assignments, its allocation proportion is zero and the displayed formula divides by zero when \(\gamma>0\). Specify a start-up allocation that gives each arm a positive count, or define a separate initial rule.
- Target boundary. If a target share is zero, its weight is zero for positive \(\gamma\). If the design requires continued assignment to both arms, a boundary target conflicts with that requirement. Do not silently clip targets; define any permitted bounds as part of the design specification.
- Wrong state variable. The denominator uses the proportion assigned to each arm, not a response rate, the estimated target, or the number of responses. Keep these quantities distinct in the implementation.
- Stale or mis-timed response data. Reusing an old estimate after a response has become available, or using information not available at randomization, implements a different procedure from the stated update rule.
- Deterministic assignment. Rounding \(p_{n+1,1}\) to an integer or always assigning to the arm with the larger probability removes the randomization specified by the coin rule.
- Sign or exponent error. The correction is \((\hat\rho_j/\pi_j)^\gamma\). Reversing this ratio favors an arm already overrepresented rather than correcting the imbalance. The equivalent weight uses target exponent \(\gamma+1\) and allocation exponent \(\gamma\).
A practical diagnostic is to log, for each participant, the available response counts, estimated rates, target shares, allocation counts and proportions, arm weights, normalized probability, random draw, and resulting assignment. Check that both probabilities are in \([0,1]\), sum to one, and that a draw below the arm 1 probability selects arm 1 under the declared convention. A discrepancy between hand calculations and logged values can reveal an indexing, update-order, or arithmetic bug.
How This Workshop Relates to Alternatives
The DBCD is one way to combine a target with current allocation imbalance. With \(\gamma=0\), assignments are drawn directly according to the current estimated target shares, without a correction based on allocation counts. With \(\gamma>0\), the allocation-ratio term modifies the next-assignment probabilities. A fixed-probability design instead uses probabilities that do not change with updated response estimates or allocation counts. These choices answer different design needs; no one-step calculation alone establishes which design is preferable for a particular study.
The DBCD also differs from deterministic balancing: its probability is used to randomize the next assignment, rather than to guarantee an exact target count at each step. Its limitations include dependence on the chosen target map and response estimator, sensitivity to how initialization and delayed outcomes are handled, and possible instability of an estimated target when data are sparse. The arithmetic workshop verifies what a specified design does; it does not establish long-run convergence, inferential validity, or clinical benefit.
Common Mistake
Wrong reasoning: “The target for arm 1 is 60%, so the next participant must have a 60% chance of assignment to arm 1.” This ignores the current allocation proportions and the bias parameter. Correction: Calculate both arm weights using the target-to-current-share ratios, then normalize them. In the audit example, the arm 1 target is 0.6, but its current share is \(2/3\); with \(\gamma=2\), the correct next-assignment probability is about 0.4576, not 0.6.
Check Your Understanding
Try each question, then compare with the solutions below.
- For target shares \((0.5,0.5)\), current allocation proportions \((0.75,0.25)\), and \(\gamma=2\), calculate \(p_1\).
- Why must a start-up rule be specified before using the ordinary DBCD formula when one arm has no assignments?
- With target \((0.6,0.4)\) and current shares \((0.5,0.5)\), which arm is under its target share? State the direction of the correction for that arm when \(\gamma>0\).
- A program assigns arm 1 whenever \(p_1\geq0.5\) and arm 2 otherwise. What is wrong with this procedure?
Solutions. (1) \(w_1=0.5^3/0.75^2=0.2222\), and \(w_2=0.5^3/0.25^2=2.000\). Thus \(p_1=0.2222/(0.2222+2.000)=0.1000\). (2) A zero allocation proportion appears in the denominator raised to a positive power, so the displayed formula is undefined; the design needs a positive-count initialization or a separately defined start-up rule. (3) Arm 1 is under its target because \(0.5<0.6\). Its target-to-current ratio exceeds one, increasing its weight relative to the uncorrected share. (4) It replaces randomization by deterministic selection of the more probable arm. The specified coin rule requires a random draw using \(p_1\), not thresholding at 0.5.