Why the realized allocation matters
A difference in sample means is often the main summary of a two-arm trial: it estimates how much the average outcome differs between treatments. Its precision depends not only on the total number of participants but also on how those participants are divided between the arms. With fewer participants in one arm, that arm’s sample mean is based on less information and is generally more variable.
This tutorial develops the fixed-allocation benchmark: the variance of a difference in means when the arm sizes are given. It then shows how an imbalanced realized allocation affects the standard error and the signal-to-noise ratio relevant to a test. The calculation is useful for understanding precision, but an allocation rule that uses previous outcomes can require inference that accounts for the assignment process as well.
Model and assumptions
Let \(n_1\) and \(n_0\) be the numbers of participants in treatment arms 1 and 0, with \(N=n_1+n_0\). Write \(\bar{x}_1\) and \(\bar{x}_0\) for the observed arm means, and let \(\Delta=\mu_1-\mu_0\) be the difference in the population means. The estimator is \(\hat{\Delta}=\bar{x}_1-\bar{x}_0\).
The variance formula describes sampling variability under these assumptions. It does not require normally distributed outcomes. Normality is needed for exact small-sample \(t\)-inference under the usual model; with sufficiently large samples, normal approximations may be useful under weaker conditions. A key assumption for the formula is independence between the two arm means. In a trial where assignment depends on earlier outcomes, that assumption and the fixed-allocation model may not describe the full assignment process.
Deriving the variance
Each arm mean averages independent observations. Therefore, \(\operatorname{Var}(\bar{x}_1)=\sigma_1^2/n_1\) and \(\operatorname{Var}(\bar{x}_0)=\sigma_0^2/n_0\). Since the two means are independent, the variance of their difference is the sum of their variances:
The estimator is unbiased under the model, because \(E(\hat{\Delta})=E(\bar{x}_1)-E(\bar{x}_0)=\mu_1-\mu_0=\Delta\). Its standard deviation across repeated samples is the standard error when the population variances are known. In practice, those variances are usually estimated from the observed data.
How imbalance changes precision when variances are equal
Suppose both arms have the same outcome variance, \(\sigma_1^2=\sigma_0^2=\sigma^2\), and the total sample size \(N\) is fixed. The variance becomes \(\sigma^2(1/n_1+1/n_0)\). Because \(n_0=N-n_1\), the product \(n_1n_0\) determines how much information the two means jointly provide.
For fixed \(N\), the product \(n_1n_0\) is largest when the arm sizes are as nearly equal as possible. To see this, write \(n_1=N/2+d\) and \(n_0=N/2-d\), where \(d=(n_1-n_0)/2\). Then \(n_1n_0=N^2/4-d^2\), which decreases as the absolute imbalance increases. If \(N\) is even, the allocation \(N/2\) per arm minimizes the variance among fixed allocations with a common variance.
The same relationship can be written directly in terms of the count difference \(D=n_1-n_0\):
This expression makes clear that the precision cost depends on the degree of imbalance, not on which arm happens to be larger. With the same total \(N\), an imbalanced allocation increases the standard error. For a fixed nonzero treatment effect, that usually reduces the signal-to-noise ratio and makes it harder for a test to distinguish the effect from sampling variation. This is the precision connection to power; it is not itself a complete power calculation.
Worked Example: Comparing a Balanced and Imbalanced Allocation
Suppose a hypothetical continuous-outcome trial has \(N=40\) participants and a common outcome standard deviation of 10 units in both arms. Compare allocations of 20 versus 20 and 30 versus 10.
For 20 participants in each arm, the variance of the difference in means is
For 30 participants in one arm and 10 in the other, it is
The imbalanced allocation has \(13.333/10=1.333\) times the variance, and its standard error is about \(3.651/3.162=1.155\) times as large. For illustration, if the true difference were 8 units, the effect divided by the standard error would be about \(8/3.162=2.53\) under the balanced allocation and \(8/3.651=2.19\) under the imbalanced one. Those ratios show the change in signal relative to noise, not the exact power of a specified test.
Estimating the standard error from data
The population variances are usually unknown, so observed standard deviations \(s_1\) and \(s_0\) are used. Without assuming equal population variances, the usual estimated standard error is the Welch standard error, \(\sqrt{s_1^2/n_1+s_0^2/n_0}\). If equal variances are scientifically and statistically reasonable, a pooled estimate can instead be used. The choice is about the variance model, not whether the allocation is balanced.
Worked Example: Standard Error With Unequal Arm Variability
In a hypothetical study, 18 participants in arm 1 have a sample mean of 54 units and a sample standard deviation of 12 units. The 22 participants in arm 0 have a sample mean of 50 units and a sample standard deviation of 9 units. Use the Welch standard error and calculate the observed difference divided by that standard error.
The estimated difference is \(54-50=4\) units. The estimated standard error is
Thus, the observed difference divided by its standard error is \(4/3.418=1.170\). This calculation quantifies the observed difference relative to its estimated sampling variability; by itself, it is not a \(p\)-value or a conclusion about statistical significance. The unequal counts and unequal sample standard deviations both enter the standard error.
When unequal allocation can be sensible
Equal allocation is variance-minimizing under the common-variance model, but that conclusion need not hold when arm variances differ. For a fixed total sample size, the variance is \(\sigma_1^2/n_1+\sigma_0^2/(N-n_1)\). If \(\sigma_1\) is substantially larger than \(\sigma_0\), assigning more participants to arm 1 can improve precision.
For a continuous allocation of participants, differentiate this variance with respect to \(n_1\). Setting the derivative to zero gives the variance-minimizing allocation ratio:
This is a planning result under the independent-samples model and known variances; actual arm sizes must be integers, and the variances may be uncertain. It illustrates why “imbalance always reduces precision” is too broad: imbalance costs precision relative to equal allocation when the variances are equal, but a suitably chosen unequal allocation can be efficient when they differ.
Worked Example: A Variance-Based Unequal Allocation
Suppose a hypothetical trial has \(N=36\) participants, with known outcome standard deviations of 12 units in arm 1 and 6 units in arm 0. The variance-minimizing ratio is \(n_1/n_0=12/6=2\). Together with \(n_1+n_0=36\), this gives \(n_1=24\) and \(n_0=12\).
For that allocation, the variance is
For comparison, an equal allocation of 18 participants per arm gives
Under the stated model and variances, the 24-to-12 allocation has lower variance despite being unequal. This comparison isolates precision only; other design considerations can matter when choosing arm sizes.
What the standard error assumes—and how to check it
For an equal-variance analysis, the pooled sample variance is \(s_p^2=((n_1-1)s_1^2+(n_0-1)s_0^2)/(n_1+n_0-2)\), and the pooled standard error is \(s_p\sqrt{1/n_1+1/n_0}\). It relies on a common population variance. Welch’s standard error avoids that equality assumption and is often a useful default when arm variances may differ. Neither formula repairs dependence or assignment-related selection that violates the independent-samples model.
Before interpreting a reported standard error, check the realized arm counts, the arm-specific spreads, and whether the analysis matches the design. In particular, a response-adaptive assignment rule can make later assignments depend on earlier outcomes. Conditional on the final arm sizes, the observed groups may then not behave like two independent samples drawn under fixed allocation. The formula in this tutorial remains a useful benchmark for seeing how counts affect precision, but a design-aware analysis may be needed for valid uncertainty estimates and tests.
A common mistake is to report only the total sample size and assume that two trials with the same \(N\) have the same precision. The correction is to use both arm counts and the relevant arm variances in the variance formula. Another mistake is to conclude that every unequal allocation is inefficient. That conclusion is justified only under assumptions such as equal variances; when variances differ, the relative allocation matters.
Check Your Understanding
Try each question, then compare your reasoning with the solutions.
- With common standard deviation 5 units, calculate the variance and standard error for arm sizes 12 and 12.
- For fixed \(N=30\) and equal arm variances, explain which has the smaller variance: an allocation of 15 and 15 or 20 and 10.
- A hypothetical study has \(n_1=16\), \(n_0=25\), \(s_1=8\), and \(s_0=10\). Calculate the Welch standard error in outcome units.
- Under the independent-samples model, suppose \(\sigma_1=9\) and \(\sigma_0=3\). What allocation ratio minimizes variance for a fixed total sample size? Explain what additional caution applies if allocation depends on previous outcomes.
Solutions. (1) The variance is \(5^2/12+5^2/12=25/6+25/6=8.333\text{ units}^2\); the standard error is \(\sqrt{8.333}=2.887\) units. (2) The products of the arm sizes are \(15(15)=225\) and \(20(10)=200\). Since the variance with equal arm variances is \(\sigma^2N/(n_1n_0)\), the 15-and-15 allocation has the smaller variance. (3) The Welch standard error is \(\sqrt{8^2/16+10^2/25}=\sqrt{4+4}=\sqrt{8}=2.828\) outcome units. (4) The minimizing ratio is \(n_1/n_0=\sigma_1/\sigma_0=9/3=3\), subject to integer arm sizes. If assignment depends on previous outcomes, the fixed-allocation independent-samples calculation may not fully describe the sampling process, so the uncertainty analysis must account for the design.