How this calculation works
Allocate a bounded integer survey budget across strata to minimize the finite-population variance of an overall mean, with a continuous cost-adjusted lower bound.
min Σh Wh² Sh²(1/nh−1/Nh), subject to Σh ch nh≤B and min(2,Nh)≤nh≤Nh; continuous nh∝NhSh/√ch before clipping.A worked example
For populations [40,60,100], standard deviations [10,20,15], costs [1,2,3] and budget 100, the exact allocation [8,19,18] costs 100 and gives variance≈4.257237.
Good to know
2–12 strata, populations 1–200, nonnegative anticipated standard deviations, integer unit costs 1–100 and integer budget≤5000. Minimum sample min(2,N), upper bound N. Exact budget DP with 18000000-operation cap; no optimum claimed on cap failure. Independent within-stratum SRS without replacement; no overhead, clustering, nonresponse or multi-outcome allocation.
Reference: optimall authors: optimum stratified allocation (opens in a new tab) ↗
Allocate before sampling
Cost-adjusted Neyman allocation is a survey design problem: distribute a limited sampling budget across known strata to reduce the variance of an overall mean. The input rows provide each stratum's population size, anticipated outcome standard deviation and sampling cost per unit. They describe the planning universe, not a table of observations already collected.
Within each stratum the model assumes simple random sampling without replacement, independently of the other strata. Standard deviations may come from a pilot study or defensible prior information. A cost is measured in declared integer budget units, such as a common smallest accounting unit; converting currencies or overhead charges is outside this optimization.
Compare this with the Stratified survey mean calculator with finite population correction. Allocate a future survey sample across strata under a budget, rather than estimate a mean from already collected samples.
Write the finite-population objective
The overall mean weights stratum means by their population shares. Its planning variance adds squared population shares times standard-deviation squared, multiplied by one over sample size minus one over population size. The second term is a fixed finite-population correction, so optimizing allocations only requires minimizing the sample-size-dependent first term.
The constraints still matter after that simplification. A stratum sample cannot exceed its population, and this interface requires at least two sampled units unless the whole stratum contains only one unit. A zero anticipated standard deviation contributes no planning variance, but its minimum sampling requirement remains part of the budget constraint rather than disappearing silently.
Distinguish continuous and integer answers
Ignoring integer restrictions gives a cost-adjusted allocation proportional to population times standard deviation divided by the square root of unit cost. A multiplier is adjusted until the available budget is met, while clipping allocations to their lower and population upper bounds. These clipped conditions are solved together, not by blindly rounding an unconstrained formula.
Real surveys cannot sample fractional people or units. Independently rounding the continuous allocations may overspend, violate a minimum or miss the best feasible allocation. The integer result here comes from a bounded dynamic program over total cost. Each state compares the possible sample counts for the next stratum, and reconstruction returns one complete allocation achieving the minimum variance.
Inspect the three-stratum example
The default populations are 40, 60 and 100, with standard deviations 10, 20 and 15. Unit costs are 1, 2 and 3, and the budget is 100. The exact integer allocation is 8, 19 and 18 units. Its cost is 8 plus 38 plus 54, exactly exhausting the supplied budget.
Those choices give planning variance approximately 4.257237 and standard error approximately 2.063307 for the population mean. The continuous allocation is approximately 8.5195, 18.0725 and 18.4452, with a slightly smaller relaxed variance approximately 4.248567. The difference is an integrality gap, not an error caused by the finite-population correction.
Check the optimality certificate
The output lists each selected sample count, the reconstructed total cost, unused budget and number of evaluated states. The cost must equal the sum of unit cost times sample size, and every sample must satisfy its stratum bounds. The continuous relaxed objective supplies an additional lower-bound check on the integer variance.
Exact refers to exhaustive optimization of this finite stated budget problem using floating-point objective values. It does not mean that the anticipated standard deviations are known perfectly or that every conceivable fieldwork cost has been modeled. The tool stops rather than claiming an optimum when its state-operation budget is exceeded, and small numerical ties may return one of several allocations.
Revise uncertain planning assumptions
Changing an anticipated standard deviation changes which stratum benefits most from additional units. Increasing a unit cost usually shifts effort toward other strata, but integer constraints can make the response occur in steps. Comparing a few plausible input scenarios is more informative than interpreting a single allocation as stable under all pilot-study uncertainty.
Nonresponse, clustering, minimum subgroup precision and several competing survey outcomes can require a different objective or constraints. A unit cost that includes only travel while omitting interviewing time may distort the result. This page optimizes one declared overall mean; it does not automatically protect every domain estimate, repair biased pilot variances or model unequal inclusion probabilities within strata.
Respect the bounded budget interface
Use two to twelve strata, populations from one to two hundred, nonnegative standard deviations, positive integer costs up to one hundred and a budget up to five thousand units. A budget below the minimum required sampling cost is infeasible and rejected. A budget beyond a census need not be spent merely to make the accounting total match.
The finite-population variance is a design-planning quantity under the entered outcome spread. Report the cost unit, minimum sample convention and assumed standard deviations with the recommended counts. After collecting a survey, estimation should use the actual sampling design and observed stratum variances; it is a separate step from this prospective allocation calculation.
A few questions, answered
Why is the integer result different from rounded Neyman counts?
Independent rounding can overspend or choose a suboptimal feasible allocation. The budget dynamic program compares all bounded integer counts under the stated constraints.
Can a budget be left unused?
Yes. Integer costs, population caps or zero planning variances may make extra spending unnecessary or infeasible. The remaining budget is reported explicitly.
What do zero standard deviations imply?
That stratum contributes zero planning variance under the entered assumptions, but its minimum sample constraint remains. Pilot uncertainty is not automatically modeled.
Can I use decimal unit costs?
Convert all costs and budget to a common integer accounting unit. The bounded exact search is defined in integer cost units and does not round costs silently.