Tutorials › Statistical Theory II - Mathematical Statistics and Statistical Inference › Worked Optimal Allocation For A Two-Stratum Mean

Asymptotic Efficiency · Tutorial 873 of 970

Worked Optimal Allocation For A Two-Stratum Mean

Learn how to allocate a fixed sampling budget across two strata to minimize the variance of the estimated overall mean, and how that choice compares with equal and proportional allocations.

Advanced 11 min read

What You'll Learn

  • Write the two-stratum estimator and its variance under independent sampling.
  • Derive the minimum-variance allocation subject to a fixed cost budget.
  • Interpret how stratum weights, standard deviations, and per-observation costs affect sample sizes.
  • Compare optimal, equal-count, and population-proportional allocations at the same budget.
  • Check an integer allocation when the continuous optimum is not feasible.

Why Allocation Matters

A two-stratum estimate combines information from two groups, but collecting an observation from each group need not cost the same, and the groups need not be equally variable. With a fixed budget, spending more on one stratum means spending less on the other. The central question is how to divide that budget to estimate the overall mean as precisely as possible.

The result is not generally an equal sample size or a sample size proportional to the sizes of the strata. The optimal allocation balances each stratum’s contribution to the estimator’s variance against the cost of sampling there. The calculations below use independent sampling within strata and focus on minimizing the variance of the stratified mean.

Setup: There are two strata with known population weights \(W_1,W_2>0\), where \(W_1+W_2=1\). Stratum \(h\) has mean \(\mu_h\), variance \(\sigma_h^2>0\), sample size \(n_h\), and cost \(c_h>0\) per observation. Independent observations are sampled within and across strata, and \(\bar X_h\) is the sample mean in stratum \(h\). The estimator of the overall mean is \(\hat\mu=W_1\bar X_1+W_2\bar X_2\). We assume the strata are sampled independently, with finite variances; no finite-population correction is included.

Independence gives the variance directly:

$$ \operatorname{Var}(\hat\mu) = W_1^2\frac{\sigma_1^2}{n_1} + W_2^2\frac{\sigma_2^2}{n_2}. $$

This variance formula is exact under the stated sampling model. When the sample sizes grow, it is also the first-order variance governing the estimator’s sampling uncertainty. For a fixed total cost \(C\), feasible allocations satisfy \(c_1n_1+c_2n_2=C\). We first allow positive real-valued sample sizes to find the continuous optimum; actual sample sizes must be integers, so a practical design may need rounding.

The Optimal Allocation

The optimal allocation gives more observations to a stratum when its population weight or standard deviation is larger, and fewer when its per-observation cost is larger. The precise result follows from a lower bound on the variance.

Theorem: For positive \(W_h,\sigma_h,c_h\) and a fixed budget \(C>0\), the variance of \(\hat\mu\) over all positive real allocations satisfying \(c_1n_1+c_2n_2=C\) is minimized by $$ n_h^*=\frac{C W_h\sigma_h}{\sqrt{c_h}\left(W_1\sigma_1\sqrt{c_1}+W_2\sigma_2\sqrt{c_2}\right)},\qquad h=1,2. $$ Equivalently, \(n_1^*:n_2^*=W_1\sigma_1/\sqrt{c_1}:W_2\sigma_2/\sqrt{c_2}\). The minimum variance is $$ V_{\min}=\frac{\left(W_1\sigma_1\sqrt{c_1}+W_2\sigma_2\sqrt{c_2}\right)^2}{C}. $$

Proof. Set \(A_h=W_h^2\sigma_h^2\). By the Cauchy–Schwarz inequality,

$$ \left(\sqrt{A_1c_1}+\sqrt{A_2c_2}\right)^2 = \left( \sqrt{\frac{A_1}{n_1}}\sqrt{c_1n_1} + \sqrt{\frac{A_2}{n_2}}\sqrt{c_2n_2} \right)^2 \leq \left(\sum_{h=1}^2\frac{A_h}{n_h}\right) \left(\sum_{h=1}^2c_hn_h\right). $$

Since the cost sum is \(C\), every feasible allocation has variance at least \((\sum_h\sqrt{A_hc_h})^2/C\), which is the stated \(V_{\min}\). Equality in Cauchy–Schwarz holds when the two vectors with components \(\sqrt{A_h/n_h}\) and \(\sqrt{c_hn_h}\) are proportional. This condition is equivalent to \(n_h\) being proportional to \(\sqrt{A_h/c_h}=W_h\sigma_h/\sqrt{c_h}\). To meet the budget, write \(n_h=kW_h\sigma_h/\sqrt{c_h}\). Then

$$ C=\sum_{h=1}^2c_hn_h =k\left(W_1\sigma_1\sqrt{c_1}+W_2\sigma_2\sqrt{c_2}\right), $$

so \(k=C/(W_1\sigma_1\sqrt{c_1}+W_2\sigma_2\sqrt{c_2})\). Substitution gives the allocation in the theorem, which attains the lower bound. \(\square\)

The square root of cost in the denominator of the allocation ratio matters. If one stratum is twice as expensive per observation, its optimal sample size is reduced by a factor of \(\sqrt{2}\), all else equal—not by a factor of two. Its variability and population weight also matter: doubling \(W_h\sigma_h\) doubles its allocation relative to the other stratum.

Worked Example: Finding the Continuous Optimum

Suppose \(W_1=0.5\), \(W_2=0.5\), \(\sigma_1=2\), \(\sigma_2=5\), \(c_1=1\), \(c_2=4\), and the available budget is \(C=250\). Find the optimal allocation and its variance.

First calculate the terms in the allocation rule: \(W_1\sigma_1=0.5(2)=1\), and \(W_2\sigma_2=0.5(5)=2.5\). Thus the allocation ratio is

$$ n_1^*:n_2^*=\frac{1}{\sqrt{1}}:\frac{2.5}{\sqrt{4}} =1:1.25. $$

To obtain sample sizes that spend the budget, the denominator in the theorem is \(1\sqrt{1}+2.5\sqrt{4}=6\). Therefore

$$ n_1^*=\frac{250(1)}{6}=41.667,\qquad n_2^*=\frac{250(2.5)}{2(6)}=52.083. $$

The cost check is \(1(41.667)+4(52.083)=41.667+208.332\approx250\), with the small difference due to rounding the displayed values. The minimum variance is

$$ V_{\min}=\frac{(1+5)^2}{250}=\frac{36}{250}=0.144. $$

Although the second stratum costs four times as much per observation, it receives more observations because its standard deviation is substantially larger. The optimal ratio accounts for both features.

Comparing Allocations at the Same Budget

Equal and proportional allocations are useful benchmarks, but their comparison is meaningful only after specifying what is being held fixed. With unequal costs, setting the same sample size in both strata does not use the same budget as any arbitrary total sample size. A clean comparison fixes \(C\) and scales each proposed allocation to spend that budget.

Allocation comparison: Let \(q_1,q_2>0\) describe a proposed allocation ratio, so \(n_h=tq_h\). Spending the full budget requires \(t=C/(c_1q_1+c_2q_2)\). The resulting variance is $$ V(q_1,q_2)=\frac{c_1q_1+c_2q_2}{C} \left(\frac{W_1^2\sigma_1^2}{q_1}+\frac{W_2^2\sigma_2^2}{q_2}\right). $$

This expression follows by substituting \(n_h=Cq_h/(c_1q_1+c_2q_2)\) into the variance formula. Equal allocation uses \(q_1=q_2=1\), giving equal sample counts. Proportional allocation uses \(q_h=W_h\), giving sample counts proportional to stratum weights. These are distinct choices: proportional allocation does not account for differences in variance or cost. The optimal ratio accounts for all three ingredients.

Worked Example: Comparing Optimal, Equal, and Proportional Designs

Take \(W_1=0.7\), \(W_2=0.3\), \(\sigma_1=2\), \(\sigma_2=5\), \(c_1=1\), \(c_2=4\), and \(C=400\). Compare the three allocations at this common budget.

For the optimum, \(W_1\sigma_1=1.4\), \(W_2\sigma_2=1.5\), and the denominator is \(1.4\sqrt{1}+1.5\sqrt{4}=4.4\). Hence

$$ n_1^*=\frac{400(1.4)}{4.4}=127.273,\qquad n_2^*=\frac{400(1.5)}{2(4.4)}=68.182. $$

The cost is approximately \(127.273+4(68.182)=400\). The variance is \(4.4^2/400=0.0484\).

For equal allocation, set \(n_1=n_2=n\). The budget equation is \(n+4n=400\), so \(n=80\). Its variance is

$$ V_{\mathrm{equal}}=\frac{0.7^2(2^2)}{80}+\frac{0.3^2(5^2)}{80} =\frac{1.96+2.25}{80}=0.052625. $$

For proportional allocation, set \(n_1:n_2=0.7:0.3\), or \(n_h=tW_h\). The budget equation is \(t(0.7)+4t(0.3)=1.9t=400\), so \(t=210.526\). Thus \(n_1=147.368\) and \(n_2=63.158\). The cost check is \(147.368+4(63.158)\approx400\). Its variance is

$$ V_{\mathrm{prop}} =\frac{1.96}{147.368}+\frac{2.25}{63.158} \approx0.013300+0.035625=0.048925. $$

The optimal design has the smallest variance, as guaranteed by the theorem. Here proportional allocation is close to optimal, while equal allocation is less precise. The optimal allocation samples the smaller, more variable second stratum more heavily than proportional allocation does, but the higher cost prevents it from receiving a majority of the observations.

More generally, because the continuous optimum minimizes variance over every positive allocation with the same cost, its variance cannot exceed that of either equal or proportional allocation when those designs are scaled to the same budget. This comparison concerns variance, not necessarily every practical objective: integer constraints, minimum sample requirements, or other design considerations may change the final choice.

Integer Sample Sizes

The continuous solution is a target, not always a realizable design. Rounding both sample sizes independently can violate the budget. A safer approach is to identify nearby feasible integer allocations, calculate their variances, and choose the best one that meets the budget. A simple two-stratum case makes the check transparent.

Worked Example: Checking a Feasible Integer Allocation

Use the same weights, standard deviations, and costs as in the comparison example, but let the budget be \(C=40\). The continuous optimum is the \(C=40\) version of the ratio \(1.4/\sqrt{1}:1.5/\sqrt{4}=1.4:0.75\). From the allocation formula,

$$ n_1^*=\frac{40(1.4)}{4.4}=12.727,\qquad n_2^*=\frac{40(1.5)}{2(4.4)}=6.818. $$

If \(n_1,n_2\) must be positive integers and the full budget is spent, then \(n_1+4n_2=40\). The nearby feasible choices are \((n_1,n_2)=(16,6)\), \((12,7)\), and \((8,8)\). Their variances are

$$ V(16,6)=\frac{1.96}{16}+\frac{2.25}{6}=0.1225+0.375=0.4975, $$ $$ V(12,7)=\frac{1.96}{12}+\frac{2.25}{7} \approx0.163333+0.321429=0.484762, $$ $$ V(8,8)=\frac{1.96}{8}+\frac{2.25}{8}=0.245+0.28125=0.52625. $$

The continuous variance bound is \(4.4^2/40=0.484\), so no integer design can have smaller variance than \(0.484\). The feasible allocation \((12,7)\) is the best of the nearby choices and is close to that bound. Each option uses the full budget, and the calculation checks the rounding decision rather than assuming that rounded continuous sample sizes remain feasible.

Common Mistakes and Practical Meaning

  • Using a variance where the rule requires a standard deviation. The allocation ratio uses \(W_h\sigma_h/\sqrt{c_h}\), not \(W_h\sigma_h^2/c_h\). The variance \(\sigma_h^2\) appears in the estimator’s variance, but minimizing that expression leads to the standard deviation in the allocation rule.
  • Ignoring costs when comparing allocations. Equal sample counts do not generally use the same budget as proportional allocation. Scale each candidate to the same \(C\) before comparing its variance.
  • Assuming proportional allocation is optimal. Proportional allocation uses \(W_h\) alone. It matches the optimal ratio only under special relationships among the stratum variances and costs; it does not automatically account for either.
  • Rounding without checking the budget. Independently rounded counts may overspend or leave a meaningful portion of the budget unused. Check feasibility and calculate the resulting variance.

The allocation calculation is useful whenever sampling resources are limited and the goal is a precise estimate of the overall mean. The weights express how much each stratum contributes to that mean; the standard deviations express how variable observations are within each stratum; and the costs express how much sampling there consumes. The optimal design weighs these factors together rather than treating the strata as interchangeable.

Check Your Understanding

Use the definitions and variance calculations above to answer these questions.

  1. For the two-stratum mean, why does independence eliminate a covariance term from \(\operatorname{Var}(\hat\mu)\)?
  2. If \(W_h\) and \(\sigma_h\) are unchanged but \(c_h\) is multiplied by four, how does that change the stratum’s optimal sample size relative to the other stratum?
  3. Explain why the allocation ratio for the optimal design uses \(\sigma_h\), not \(\sigma_h^2\).
  4. At a fixed budget, how should you define and calculate an equal allocation when the stratum costs differ?
  5. Why is the continuous optimum a useful benchmark even when sample sizes must be integers?
Clinical Biostats