Why Allocation Matters
A two-sample study need not place the same number of observations in each group. If one group is more variable than the other, assigning it more observations can improve the precision of the estimated difference in means. The benefit depends on both the total sample size and the allocation ratio; an unequal split is not automatically more efficient.
The calculations below concern a difference in two independent population means. They show how allocation affects standard error and power, and how to select an allocation when the variances are known or have reasonable planning estimates. These results are aligned with the SOA VEE Mathematical Statistics syllabus.
The group labels matter when interpreting \(r\): \(r=2\) means twice as many observations in group 2 as in group 1. For a fixed total \(N\), the corresponding sample sizes are \(n_1=N/(1+r)\) and \(n_2=Nr/(1+r)\). The standard error of the difference is the square root of its variance.
Allocation, Standard Error, and Power
For a two-sided test of \(H_0:\mu_1-\mu_2=0\) at significance level \(\alpha\), suppose observations are independent and normally distributed with known variances. The statistic \(Z=(\bar{X}_1-\bar{X}_2)/\sqrt{\sigma_1^2/n_1+\sigma_2^2/n_2}\) has a standard normal distribution under the null hypothesis. If the true difference is \(\Delta=\mu_1-\mu_2\), its distribution has mean \(\lambda=\Delta/\sqrt{\sigma_1^2/n_1+\sigma_2^2/n_2}\) and variance 1. Thus the allocation affects power by changing the standard error and therefore the noncentral mean \(\lambda\).
Here \(\Phi\) is the standard normal cumulative distribution function and \(z_q\) is its \(q\)-quantile. The expression adds the probabilities of falling below the lower critical value and above the upper critical value. For a positive \(\Delta\), the upper-tail probability is usually the larger one, but the lower-tail probability is part of the two-sided test and should not be omitted.
When the variances are unknown, a pooled two-sample \(t\) test has an exact noncentral-\(t\) power calculation under independent normal populations with a common variance. Its degrees of freedom are \(N-2\), and its noncentrality parameter is \(\Delta/[\sigma\sqrt{1/n_1+1/n_2}]\). That common-variance assumption is important: if the population variances differ, the pooled test is not generally justified. A Welch test or a normal planning approximation based on separate variance estimates may be more appropriate. The normal formula above is exact for known variances and normal observations; with estimated variances or nonnormal observations it is an approximation, whose adequacy depends on the model and sample sizes.
Worked Example: Comparing Balanced and Unequal Allocation
A hypothetical study compares mean processing times in two independent groups. Assume normal observations with known standard deviations \(\sigma_1=6\) minutes and \(\sigma_2=10\) minutes, a true mean difference \(\Delta=4\) minutes, and a total sample size \(N=100\). Use a two-sided known-variance \(Z\) test with \(\alpha=0.05\). There is no interest-rate or mortality assumption in this study. Compare equal allocation with the integer allocation \((n_1,n_2)=(38,62)\).
Method. Calculate the standard error and normal-approximation power for each allocation, using \(z_{0.975}=1.96\).
With equal allocation, \(n_1=n_2=50\). The variance of the difference is \(36/50+100/50=0.72+2=2.72\), so the standard error is \(\sqrt{2.72}=1.6492\) minutes. The noncentral mean is \(\lambda=4/1.6492=2.4254\). The power is \(\Phi(2.4254-1.96)+\Phi(-2.4254-1.96)=\Phi(0.4654)+\Phi(-4.3854)\), which is approximately \(0.6791\).
For \(n_1=38\) and \(n_2=62\), the variance is \(36/38+100/62=0.9474+1.6129=2.5603\). The standard error is \(\sqrt{2.5603}=1.6001\) minutes, and \(\lambda=4/1.6001=2.4999\). Power is \(\Phi(2.4999-1.96)+\Phi(-2.4999-1.96)=\Phi(0.5399)+\Phi(-4.4599)\), approximately \(0.7052\).
Check. Both designs use \(100\) observations. The unequal allocation gives the larger power because more observations are assigned to the more variable group. The common mistake is to assume that equal allocation must be best; here it is not. The variance-minimizing allocation is derived below.
The Variance-Minimizing Allocation
For a fixed total sample size and equal cost per observation, the allocation that minimizes the variance of the difference in means gives more observations to the group with the larger standard deviation. To see why, write the variance in terms of the ratio \(r=n_2/n_1\), using \(n_1=N/(1+r)\) and \(n_2=Nr/(1+r)\).
Expanding the expression gives \(V(r)=(\sigma_1^2+\sigma_1^2r+\sigma_2^2/r+\sigma_2^2)/N\), so \(V'(r)=(\sigma_1^2-\sigma_2^2/r^2)/N\).
Since \(N>0\), the stationary point satisfies \(\sigma_1^2-\sigma_2^2/r^2=0\). For \(r>0\), this gives \(r=\sigma_2/\sigma_1\).
\(V''(r)=2\sigma_2^2/(Nr^3)>0\) for \(r>0\). The stationary point therefore minimizes the variance.
The optimal ratio and the resulting minimum variance are \(n_2/n_1=\sigma_2/\sigma_1\) and \(\min V=(\sigma_1+\sigma_2)^2/N\). Equivalently, \(n_1/n_2=\sigma_1/\sigma_2\). The standard deviations, not the variances, determine the ratio. If \(\sigma_1=\sigma_2\), this result reduces to equal allocation.
Worked Example: Choosing the Ratio for Unequal Variances
A hypothetical comparison of two laboratory procedures has independent normal measurements with known standard deviations \(\sigma_1=4\) and \(\sigma_2=8\) units. The total sample size is \(N=90\), the true mean difference is \(\Delta=3\) units, and the test is two-sided at \(\alpha=0.05\). There is no interest-rate or mortality assumption. Compare a balanced design with a design using \(n_1=30,n_2=60\).
The optimal ratio is \(n_2/n_1=\sigma_2/\sigma_1=8/4=2\). The proposed allocation \(30,60\) has this ratio and uses all \(90\) observations.
For equal allocation, \(n_1=n_2=45\). The variance is \(16/45+64/45=80/45=1.7778\), and the standard error is \(\sqrt{1.7778}=1.3333\). Thus \(\lambda=3/1.3333=2.25\), and the power is \(\Phi(2.25-1.96)+\Phi(-2.25-1.96)=\Phi(0.29)+\Phi(-4.21)\), approximately \(0.6141\).
For the allocation \(30,60\), the variance is \(16/30+64/60=0.5333+1.0667=1.6000\), and the standard error is \(\sqrt{1.6000}=1.2649\). Then \(\lambda=3/1.2649=2.3717\), giving power \(\Phi(2.3717-1.96)+\Phi(-2.3717-1.96)=\Phi(0.4117)+\Phi(-4.3317)\), approximately \(0.6598\).
Check. The unequal allocation improves power while holding the total sample size fixed, because the group with standard deviation \(8\) receives twice as many observations. The optimum minimizes variance; it does not guarantee a particular power unless the effect size and test level are also specified.
Planning Total Sample Size
A common planning question specifies a target power \(1-\beta\), a two-sided significance level \(\alpha\), a meaningful difference \(|\Delta|\), and planning values for the standard deviations. Under the same independent, known-variance normal model, the optimal continuous allocation makes the standard error \((\sigma_1+\sigma_2)/\sqrt{N}\). A standard normal approximation chooses the noncentral mean to be about \(z_{1-\alpha/2}+z_{1-\beta}\). Solving for \(N\) gives the following planning formula.
To avoid ambiguity in using the formula, the optimal allocation is \(n_1:N\) and \(n_2:N\) in the proportions \(n_1/N=\sigma_1/(\sigma_1+\sigma_2)\) and \(n_2/N=\sigma_2/(\sigma_1+\sigma_2)\). The total from the planning formula is continuous, so round the total sample size up and choose integer group sizes near those proportions. Then recompute the standard error and power using the actual integers. The formula is an approximation; the final check is particularly important when the required sample size is small or the model calls for a \(t\) test instead.
Worked Example: Planning a Target Power
A hypothetical study compares the mean duration of two independent normal processes. Planning values are known standard deviations \(\sigma_1=5\) hours and \(\sigma_2=9\) hours, and the study aims to detect a difference of \(|\Delta|=3\) hours. Use a two-sided known-variance \(Z\) test with \(\alpha=0.05\) and target power \(0.80\). There is no interest-rate or mortality assumption.
Method. Apply the optimal-allocation normal approximation with \(z_{0.975}=1.96\) and \(z_{0.80}=0.8416\). The continuous total is \(N\approx[(5+9)(1.96+0.8416)/3]^2=[14(2.8016)/3]^2=(13.0741)^2=170.93\). Round up to \(N=171\).
The optimal proportions are \(n_1/N=5/14\) and \(n_2/N=9/14\). These give approximate sizes \(171(5/14)=61.07\) and \(171(9/14)=109.93\). Choose \(n_1=61\) and \(n_2=110\), which sum to \(171\).
Check the achieved approximate power. The variance is \(25/61+81/110=0.4098+0.7364=1.1462\), so the standard error is \(\sqrt{1.1462}=1.0706\). Then \(\lambda=3/1.0706=2.802\), and power is \(\Phi(2.802-1.96)+\Phi(-2.802-1.96)=\Phi(0.842)+\Phi(-4.762)\), approximately \(0.8001\).
Check. The selected design uses the rounded-up total and comes very slightly above the target. The common mistake is to round the continuous total down or to allocate the sample equally without checking the resulting standard error and power.
Interpretation and Exam Traps
The allocation result is about precision under a specified model, not a universal instruction to make group sizes unequal. With equal variances and equal costs, balance is optimal. When variances differ, the higher-variance group generally needs more observations to contribute a similar amount of uncertainty to the estimated difference.
A frequent error is to reverse the optimal ratio. For example, if \(\sigma_1=4\) and \(\sigma_2=8\), the optimal ratio is \(n_2/n_1=8/4=2\), not \(1/2\). Assigning twice as many observations to group 1 would instead give \(n_1=60,n_2=30\) at \(N=90\); its variance would be \(16/60+64/30=0.2667+2.1333=2.4000\), larger than the optimal allocation's variance of \(1.6000\). The correction is to match the group-size ratio to the ratio of standard deviations in the same group order.
Other assumptions and practical limits matter. The formulas presume independent observations and a meaningful total sample size. If observations are paired, the variance of a paired difference is the relevant quantity instead. If group costs differ, the equal-cost optimum may waste resources. If the standard deviations are estimated from prior information, they should be treated as planning values and sensitivity to plausible alternatives should be considered. Finally, when using a pooled \(t\) test, unequal population variances violate its common-variance assumption; changing the allocation does not repair that assumption.
Check Your Understanding
For each problem, assume independent normal observations and known group variances unless stated otherwise. Round probabilities to four decimals where needed.
- A design compares two means with standard deviations \(\sigma_1=3\) and \(\sigma_2=12\). What is the variance-minimizing ratio \(n_2/n_1\) when observation costs are equal? (Answer: \(4\))
- A total of \(N=100\) observations is available, with \(\sigma_1=5\) and \(\sigma_2=10\). Find the continuous optimal allocation and the minimized variance of the difference in sample means. (Answer: \(n_1=33.33,\ n_2=66.67;\ \min V=2.25\))
- For \(N=90\), \(\sigma_1=4\), \(\sigma_2=8\), \(\Delta=3\), and a two-sided test with \(\alpha=0.05\), compare approximate power for equal allocation \((45,45)\) and the optimal allocation \((30,60)\). (Answer: approximately \(0.6141\) and \(0.6598\), respectively)
- A two-sided known-variance test is planned for \(|\Delta|=2.5\), with \(\sigma_1=4\), \(\sigma_2=6\), \(\alpha=0.05\), and target power \(0.80\). Using the optimal-allocation normal approximation, give the rounded-up total sample size and a near-optimal integer allocation. (Answer: \(N=126;\ (n_1,n_2)=(50,76)\))