Why Costs Change the Allocation Target
When the two treatment arms have different outcome variability, allocating more participants to the arm with the larger standard deviation can improve precision for a difference in means. When participant costs also differ, however, the same number of participants does not consume the same budget in each arm. The allocation that minimizes variance under a fixed number of participants need not be the one that minimizes variance under a fixed budget.
This tutorial derives the two-arm cost-adjusted ratio from the constrained optimization problem. The objective is precision for the difference between two population means, not an ethical or patient-benefit objective. The resulting ratio is a planning target under stated assumptions; it does not by itself determine how an adaptive trial should update assignments over time.
Model and Optimization Problem
The variance formula follows from the variance of each sample mean, \(\sigma_i^2/n_i\), and the fact that the two arm-specific sample means are independent. The optimization treats the sample sizes as positive continuous quantities. Thus it gives a continuous target, and the exact budget constraint assumes that all costs being optimized are proportional to the number of participants. Fixed overhead that is identical across allocations can be subtracted from the available budget before applying the calculation.
For the derivation, regard the standard deviations and costs as known planning quantities. The result also applies when they are specified as plausible values for planning, but then the optimality claim is conditional on those values. Positive standard deviations and costs give an interior solution: sending either sample size toward zero makes the variance diverge, while a feasible allocation with both sample sizes positive exists.
Deriving the Cost-Adjusted Ratio
The budget constraint fixes how many dollars are spent, not how many participants are enrolled. A useful way to derive the optimum is to apply the Cauchy–Schwarz inequality to the variance and cost expressions:
To see the inequality, take the two vectors with components \(\sigma_i/\sqrt{n_i}\) and \(\sqrt{c_i n_i}\), for \(i=1,0\). Their squared lengths are the variance and the total cost, respectively; their inner product is \(\sigma_1\sqrt{c_1}+\sigma_0\sqrt{c_0}\). Since the budget is \(B\), dividing the inequality by \(B\) gives a lower bound on the variance for every feasible allocation. Equality in Cauchy–Schwarz holds exactly when the two vectors are proportional. This requires
The ratio is therefore the standard-deviation ratio multiplied by the square root of the other arm’s cost divided by the arm’s own cost. Equivalently, the minimizing sample sizes and the minimum achievable variance are
These expressions satisfy the budget because multiplying each \(n_i\) by its cost and summing gives \(B\). The inequality above also establishes global optimality: no other feasible positive allocation can have a smaller variance. With positive variances, equality fixes the ratio, and the budget then fixes both sample sizes.
Worked Example: Computing Targets Under a Fixed Budget
Consider a hypothetical two-arm trial with \(\sigma_1=15\) outcome units, \(\sigma_0=10\) outcome units, \(c_1=\$400\) per participant, \(c_0=\$100\) per participant, and a budget of \(B=\$160{,}000\). Assume independent outcomes, positive standard deviations as specified, and no other allocation-dependent costs.
The cost-adjusted ratio is
For the individual targets, the denominator in the budget formula is \(\sigma_1\sqrt{c_1}+\sigma_0\sqrt{c_0} =15(20)+10(10)=400\), in outcome units times the square root of dollars. Therefore,
The ratio is \(300/400=0.75\), as derived. The budget check is \(300(\$400)+400(\$100)=\$120{,}000+\$40{,}000=\$160{,}000\). The variance of the difference in sample means at these targets is \(15^2/300+10^2/400=225/300+100/400=0.75+0.25=1.00\) outcome-units squared. The corresponding standard error is \(1.00\) outcome unit. These targets are exact continuous values, so no rounding adjustment is needed.
How Variability and Cost Combine
The ratio gives a compact way to study how assumptions affect allocation. Doubling \(\sigma_1\), with the other quantities fixed, doubles \(n_1/n_0\). Multiplying \(c_1\) by four, with the other quantities fixed, halves \(n_1/n_0\), because the cost enters through a square root in the denominator. Thus cost matters, but it does not offset variability dollar for dollar.
A useful check is to ask what happens when the costs are equal. If \(c_1=c_0\), their ratio is one and the formula reduces to \(n_1/n_0=\sigma_1/\sigma_0\), the unequal-variance Neyman ratio under a fixed total sample size. If both costs and standard deviations are equal, the ratio is one and the targets are equal. These are consistency checks on the cost-adjusted expression, not additional assumptions needed to derive it.
Worked Example: Variability and Cost Exactly Offset
Suppose, hypothetically, that arm 1 has standard deviation \(12\) outcome units and costs \(\$225\) per participant, while arm 0 has standard deviation \(8\) outcome units and costs \(\$100\) per participant. Let the available budget be \(\$65{,}000\). Assume independent outcomes and that these per-participant costs fully describe the allocation-dependent spending.
The allocation ratio is
Thus the two arms have equal target sample sizes even though neither their standard deviations nor their costs are equal. To find the targets, the denominator is \(12\sqrt{225}+8\sqrt{100}=12(15)+8(10)=260\). Hence
The budget check is \(200(\$225)+200(\$100)=\$45{,}000+\$20{,}000=\$65{,}000\). The variance is \(12^2/200+8^2/200=144/200+64/200=0.72+0.32=1.04\) outcome-units squared, giving a standard error of \(\sqrt{1.04}\approx1.020\) outcome units. The equal sample sizes arise because arm 1’s greater variability is exactly offset in the ratio by its higher cost.
Comparison With Equal Allocation
Equal allocation gives the same number of participants in each arm, but it is not generally the variance-minimizing choice under a budget when costs or standard deviations differ. A fair comparison must hold the budget constant and calculate the variance at each allocation. Comparing allocations at different budgets would not isolate the effect of the allocation ratio.
For contrast, the fixed-participant Neyman allocation uses the ratio \(\sigma_1/\sigma_0\), because its constraint is \(n_1+n_0=N\), rather than a cost constraint. The cost-adjusted ratio applies when the resource being held fixed is budget. If costs are equal, the two ratios agree; when costs differ, they generally do not. Neither target accounts for additional design requirements such as minimum arm sizes.
Worked Example: Cost-Adjusted Targets Versus Equal Allocation
A hypothetical trial has \(\sigma_1=\sigma_0=10\) outcome units, costs \(c_1=\$400\) and \(c_0=\$100\) per participant, and a budget of \(\$100{,}000\). Assume independent outcomes and no allocation-dependent costs beyond those stated. The cost-adjusted ratio is
The denominator in the target formula is \(10(20)+10(10)=300\). Thus the continuous targets are
Using these unrounded targets, their costs are \(\$400(500/3)=\$200{,}000/3\) and \(\$100(1{,}000/3)=\$100{,}000/3\), which sum exactly to \(\$100{,}000\). Their variance is \(100/(500/3)+100/(1{,}000/3)=0.6+0.3=0.9\) outcome-units squared.
For equal allocation under the same budget, \(400n+100n=100{,}000\), so \(n=200\) per arm. Its variance is \(100/200+100/200=1.00\) outcome-units squared. In this example, the cost-adjusted allocation lowers the variance from \(1.00\) to \(0.90\) outcome-units squared, a 10% reduction relative to equal allocation. The comparison is specifically about variance at a common budget; it does not imply that unequal allocation is preferable for every trial objective.
Assumptions, Diagnostics, and Limitations
Before using the ratio, check the assumptions that make the objective and constraint appropriate:
- The target is precision for the difference in population means, and the variance of each arm’s sample mean is \(\sigma_i^2/n_i\).
- Outcomes in the two arms are independent, so the variance of the difference is the sum of the two arm-specific variances.
- The standard deviations and per-participant costs are positive and are suitable planning inputs.
- The budget is fixed, and the modeled variable costs are proportional to the number enrolled in each arm.
- The allocation is allowed to vary continuously during the optimization, with no additional arm-size constraints included.
A practical diagnostic is to calculate the ratio in two ways: from \((\sigma_1/\sigma_0)\sqrt{c_0/c_1}\), and from the computed target sample sizes. Then substitute those targets into the budget and variance formulas. A mismatch usually indicates a reversed cost ratio, a transposed arm label, or an arithmetic error. The ratio should decrease when the cost of its numerator arm increases and should increase when that arm’s standard deviation increases.
The target is sensitive to the planning standard deviations and costs. If those inputs are uncertain, the calculated ratio is optimal only for the values supplied; it is not a guarantee of minimum variance under every possible data-generating process. Also, the derivation minimizes variance alone. It does not include ethical preferences, recruitment feasibility, inferential procedures, or other objectives. Finally, a continuous target may not be an integer. Rounding changes both the ratio and possibly the budget, so the final design must check its actual integer sample sizes and total cost rather than treating rounded targets as exact.
Common Mistake
Check Your Understanding
Use the assumptions and formulas above. The solutions are included so that each result can be checked against its calculation.
- If \(\sigma_1=18\), \(\sigma_0=12\), and \(c_1=c_0\), what is the cost-adjusted ratio \(n_1/n_0\)?
- If \(\sigma_1=\sigma_0\), \(c_1=9c_0\), what is \(n_1/n_0\), and which arm receives fewer participants?
- For \(\sigma_1=10\), \(\sigma_0=10\), \(c_1=\$100\), \(c_0=\$400\), and \(B=\$50{,}000\), calculate the continuous targets and verify the budget.
- Explain why a ratio derived under a fixed participant count is not generally the cost-adjusted ratio when per-participant costs differ.
Solutions. (1) \(n_1/n_0=(18/12)\sqrt{1}=1.5\). (2) \(n_1/n_0=1\sqrt{1/9}=1/3\), so arm 1, which costs more, receives fewer participants. (3) The denominator is \(10\sqrt{100}+10\sqrt{400}=100+200=300\). Therefore \(n_1=50{,}000(10/10)/300=500/3\) and \(n_0=50{,}000(10/20)/300=250/3\). Their costs are \(\$100(500/3)=\$50{,}000/3\) and \(\$400(250/3)=\$100{,}000/3\), which sum to \(\$50{,}000\); the ratio is \(2\), also matching \(\sqrt{400/100}=2\). (4) A fixed-participant constraint holds \(n_1+n_0\) constant, whereas a budget constraint holds \(c_1n_1+c_0n_0\) constant. When costs differ, these constraints describe different feasible allocations and lead to different optimal ratios.