Why the Contrast Determines the Allocation
An allocation that is efficient for one treatment comparison need not be efficient for another. If the scientific objective is a specified weighted contrast of several arm means, the precision of that particular contrast—not the precision of every arm mean separately—is the quantity to optimize. The contrast coefficients matter alongside the outcome variances: an arm with a larger absolute coefficient contributes more to the contrast and, all else equal, merits more observations.
This tutorial derives the continuous allocation target for a fixed total sample size. It is an allocation calculation for a specified estimand and assumed arm variances. It does not by itself prescribe a response-adaptive assignment rule or account for the additional issues that can arise when allocation probabilities change during a trial.
Suppose arm \(j\) has \(n_j\) participants and outcome variance \(\sigma_j^2\). Under independent observations within and across arms, with finite variances and fixed sample sizes, the arm sample means are independent and have variances \(\sigma_j^2/n_j\). The usual estimator is \(\hat{\tau}=\sum_{j=1}^K c_j\bar{x}_j\), where \(\bar{x}_j\) is the sample mean in arm \(j\). Thus
The target allocation minimizes this variance subject to \(\sum_{j=1}^K n_j=N\), where \(N\) is the fixed total sample size. For the basic result, take \(N>0\), assume the variances are known planning inputs, and allow continuous nonnegative \(n_j\). Assume \(\sigma_j>0\) for every arm with \(c_j\ne 0\). Integer sample sizes, uncertain variances, costs, and additional minimum-enrollment requirements can require modifications to the continuous target.
Deriving the Contrast-Specific Target
Define \(a_j=|c_j|\sigma_j\). This quantity combines the absolute contrast weight with the arm’s standard deviation. Since \(c_j^2\sigma_j^2=a_j^2\), the variance to minimize is \(\sum_j a_j^2/n_j\). For the moment, suppose every \(a_j\) is positive, so every arm contributes to the contrast.
A direct justification follows from the Cauchy–Schwarz inequality. Apply it to the two vectors with entries \(a_j/\sqrt{n_j}\) and \(\sqrt{n_j}\):
Therefore no feasible allocation can have variance below \((\sum_j a_j)^2/N\). Equality in Cauchy–Schwarz requires the two vectors to be proportional. For some common positive constant \(q\), this means \(a_j/\sqrt{n_j}=q\sqrt{n_j}\), or \(n_j=a_j/q\). Enforcing the total \(N\) gives \(q=(\sum_j a_j)/N\), and hence the stated target. Substitution gives the minimum variance \((\sum_j a_j)^2/N\).
The sign of \(c_j\) does not affect the target because variance depends on the squared coefficient. The magnitude does matter: doubling \(|c_j|\), with other inputs unchanged, doubles that arm’s allocation weight. Likewise, doubling \(\sigma_j\) doubles its weight. The direction of the contrast affects the estimand, but not this variance-minimizing allocation.
Worked Example: A Three-Arm Weighted Contrast
Consider a hypothetical three-arm trial with \(\tau=\mu_1-\tfrac{1}{2}\mu_2-\tfrac{1}{2}\mu_3\), total sample size \(N=300\), and planning standard deviations \(\sigma_1=2\), \(\sigma_2=4\), and \(\sigma_3=3\) outcome units. Assume independent observations and these variances are treated as known for planning. Find the continuous target.
The coefficients are \((1,-0.5,-0.5)\), so the allocation weights are \(a_1=1(2)=2\), \(a_2=0.5(4)=2\), and \(a_3=0.5(3)=1.5\). Their sum is \(5.5\). Thus
The targets sum to \(300.0\), up to rounding. The minimum variance is \((5.5)^2/300=30.25/300=0.1008\) outcome-units squared. Checking directly using the unrounded targets, \(\operatorname{Var}(\hat{\tau})=4/109.0909+4/109.0909+2.25/81.8182\approx0.03667+0.03667+0.02750=0.1008\).
The first two arms receive the same target because their products \(|c_j|\sigma_j\) are both \(2\), not because their standard deviations are equal. Arm 3 has a smaller product and receives fewer participants under this contrast-specific objective.
Zero Coefficients and Required Enrollment
If \(c_j=0\), arm \(j\) does not enter the estimand or its variance, so \(a_j=0\). Under a nonnegative allocation, the variance-minimizing target for that arm is \(n_j^*=0\); the total sample is allocated among the arms with nonzero coefficients using their \(|c_j|\sigma_j\) weights. The theorem’s positive-target formula applies to the active arms, meaning those with nonzero coefficients.
This distinction matters if a protocol requires every arm to enroll participants. A zero target for an irrelevant arm is not compatible with a rule that every arm must have a positive minimum. In that setting the required lower bounds must be included in the optimization, and the unconstrained target is not generally the answer. Similarly, if an active arm has zero outcome variance, the assumptions used for the simple positive-weight derivation fail; that boundary case is not covered by the theorem above.
Worked Example: An Arm With Zero Contrast Weight
Suppose a hypothetical three-arm study has contrast \(\tau=\mu_1-\mu_2\), total \(N=120\), and standard deviations \(\sigma_1=1\), \(\sigma_2=3\), and \(\sigma_3=5\). Assume independent observations and no requirement to enroll in every arm. The coefficients are \((1,-1,0)\), giving weights \((1,3,0)\).
The active-arm weights sum to \(4\), so the continuous targets are \(120(1/4)=30\) in arm 1 and \(120(3/4)=90\) in arm 2; arm 3 has target \(0\). The resulting variance is \(1^2(1^2)/30+(-1)^2(3^2)/90=1/30+9/90=0.03333+0.1000=0.1333\) outcome-units squared.
If the protocol instead required 12 participants in arm 3, that same target would be infeasible. Merely assigning 12 to arm 3 and keeping 30 and 90 in the other arms would also violate the total \(N=120\). The problem would have to be re-solved with the required enrollment constraint. The zero-coefficient arm contributes no direct variance to this contrast, but its required participants reduce the sample available to the active arms.
Why Standard-Deviation-Only Allocation Can Miss the Target
A common alternative is to allocate in proportion to \(\sigma_j\), without considering the contrast coefficients. That is Neyman allocation for objectives in which the relevant coefficient magnitudes are equal across the arms being compared. For a general specified contrast, the appropriate weight is \(|c_j|\sigma_j\). Standard-deviation-only allocation is optimal here only when the coefficient magnitudes are equal among the active arms.
Worked Example: Comparing the Weighted Target With a Standard-Deviation Target
For a hypothetical three-arm trial, estimate \(\tau=\tfrac{1}{2}\mu_1+\tfrac{1}{2}\mu_2-\mu_3\), with \(N=240\) and planning standard deviations \((2,10,6)\) outcome units. Assume independent observations and positive variances. The contrast weights are \((0.5,0.5,-1)\), so the allocation weights \(|c_j|\sigma_j\) are \((1,5,6)\). The contrast-specific target is therefore
Its variance is \(0.25(2^2)/20+0.25(10^2)/100+1(6^2)/120=1/20+25/100+36/120=0.0500+0.2500+0.3000=0.6000\) outcome-units squared. This agrees with the lower bound \((1+5+6)^2/240=144/240=0.6000\).
For comparison, standard-deviation-proportional allocation uses weights \((2,10,6)\), which sum to \(18\). At total \(240\), it gives \((240(2/18),240(10/18),240(6/18))=(80/3,400/3,80)\), or approximately \((26.67,133.3,80.00)\). Its contrast variance is \(1/(80/3)+25/(400/3)+36/80=3/80+75/400+0.4500=0.03750+0.1875+0.4500=0.6750\). This is larger than \(0.6000\), because the standard-deviation-only target ignores the unequal contrast coefficients.
Practical Checks, Alternatives, and Limitations
Before using a target, check that it addresses the intended estimand and that the inputs are defensible. In particular, verify the signs and magnitudes of the contrast coefficients, the standard-deviation units, and the assumption that the arm means are independent with variances \(\sigma_j^2/n_j\). Under independent arm sampling, those conditions justify the variance expression; dependence, clustering, or a different estimator can change it.
- Check the total: the continuous targets must sum to \(N\). Small discrepancies from rounded values are rounding effects, not a different optimum.
- Check the weights: each active arm’s target must be proportional to \(|c_j|\sigma_j\), not just to \(\sigma_j\) unless coefficient magnitudes are equal.
- Check the variance: substitute the targets into \(\sum_j c_j^2\sigma_j^2/n_j\). For positive active weights, it should equal \((\sum_j|c_j|\sigma_j)^2/N\).
- Check feasibility: continuous targets may not be integers and may conflict with protocol requirements. Rounding or constraints can change the achieved variance and may require a separate optimization.
Equal allocation is simple and can be useful when the variances are similar, the coefficients have equal magnitudes, or operational considerations dominate small precision gains. It is not generally variance-minimizing for a specified contrast. Standard-deviation-proportional allocation is another useful comparison, but it neglects unequal contrast weights. Cost-adjusted allocation addresses a different objective in which arms have unequal per-participant costs; it should not be substituted for this fixed-total, equal-cost result without changing the optimization.
The targets are only as reliable as the planning variances. If those inputs are uncertain, the calculated allocation may not minimize the variance under the true variances. Also, the result optimizes one contrast: an allocation that is best for \(\tau\) need not be best for another contrast or for simultaneous precision across all arm means. Finally, the formula supplies continuous targets. A trial’s integer allocation and any required arm minimums must be respected in implementation, and the resulting variance should be checked rather than assumed to equal the continuous optimum.
Check Your Understanding
Try each problem, then compare your work with the solutions below.
- A two-arm contrast is \(\mu_1-\mu_2\), with \(N=200\), \(\sigma_1=2\), and \(\sigma_2=6\). Find the continuous targets and minimum variance.
- For \(N=180\), \(\tau=2\mu_1-\mu_2-\mu_3\), and standard deviations \((1,2,4)\), find the allocation weights and targets.
- Explain why changing a contrast coefficient from \(-1\) to \(+1\) does not change that arm’s target when its standard deviation is unchanged.
- For the contrast \(\mu_1-\mu_2\), a protocol requires at least 10 participants in a third arm whose coefficient is zero. Can the unconstrained contrast-specific target be used unchanged? Explain.
Solutions. (1) The weights are \(2\) and \(6\), summing to \(8\), so the targets are \(200(2/8)=50\) and \(200(6/8)=150\). The minimum variance is \(8^2/200=0.3200\) outcome-units squared. (2) The absolute-coefficient weights are \((2,2,4)\), which sum to \(8\). The targets are \(180(2/8)=45\), \(45\), and \(180(4/8)=90\). (3) The variance uses \(c_j^2\sigma_j^2/n_j\), so the allocation weight uses \(|c_j|\sigma_j\); both \(+1\) and \(-1\) have absolute value \(1\). (4) No. The unconstrained target assigns zero to the third arm, but the protocol requires at least 10 there. The total available for the active arms is consequently reduced, and the constrained allocation must account for that requirement.