How to use the stratified sample allocation calculator
- List your groups (strata), one per line, as name, size, standard deviation. The size is how many units the group holds. The standard deviation is optional unless you choose Neyman allocation or want the standard error.
- Enter the Total sample size you can afford to survey in all groups together.
- Choose Allocation: proportional to size, Neyman (size times spread), or equal in every group.
- Read the table for the whole-number sample in each group. Use CSV or Copy to take it into your survey plan.
Formula
proportional: n_h = n x N_h / N
Neyman: n_h = n x N_h S_h / (sum over groups of N_k S_k)
equal: n_h = n / H
standard error of the mean = square root of the sum of (N_h / N)^2 (1 - n_h / N_h) S_h^2 / n_h
N_h is the size of group h, S_h its standard deviation, n the total sample and H the number of groups. A group cannot give more units than it holds, so a share above its size is capped and the rest is shared among the others. Whole numbers come from largest remainder rounding.
Four regions and a sample of 200
The regions hold 1,200, 800, 500 and 1,500 people, with standard deviations of 8.5, 12, 20 and 6. Proportional allocation gives 60, 40, 25 and 75 and a standard error of the mean of 0.7358. Neyman allocation puts more of the sample where the spread is large and gives 53, 49, 52 and 46, with a smaller standard error of 0.6648. Equal allocation gives 50 to each region.
Neyman allocation can ask for more than a group holds. With one group of 10 people and a spread of 100, and another of 1,000 people and a spread of 1, a sample of 50 would give each group the same share, 25. The small group holds only 10, so it is sampled completely and the other 40 units go to the large group.
When to stratify
Stratified sampling splits the population into groups that differ from one another, then samples inside each group. When the groups really differ on what you are measuring, the estimates are more precise than from one simple random sample of the same size, because the variation between groups no longer adds noise.
Proportional allocation keeps the sample a miniature of the population and is the usual default. Neyman allocation puts more of the sample where the group is large and varies a lot, which lowers the standard error for the same cost. Equal allocation suits cases where you want to compare groups with the same precision.
What this page does not decide
It does not choose the total sample size; the Sample Size Calculator does that for a target margin of error. It also assumes you can draw a random sample inside each group, that the standard deviations are good guesses from earlier surveys, and that non-response is handled separately. The Standard Error Calculator shows how precision grows with sample size.
More statistics tools
For score scales, runs, waiting times and agreement, try the Streak Probability Calculator, Exponential Distribution Calculator and Geometric and Negative Binomial Calculator.
Assumptions and limits
- Each group is known in advance and every unit belongs to exactly one group.
- Sampling inside each group is random and without replacement.
- The standard deviations you enter are estimates, so the standard error is only as good as those estimates.
- The standard error shown is for the estimated overall mean and includes the finite population correction in each group.
- The example regions and numbers are only an illustration. Replace them with your own.
Frequently asked questions
Why does Neyman allocation need standard deviations?
It sends more of the sample to groups that are both large and varied, because those groups contribute the most uncertainty. Without an estimate of the spread in each group it cannot tell which ones those are.
What if a group would get a sample of zero?
The page warns you. A group with no sample cannot be estimated at all, so raise the total, merge small groups or choose an allocation that guarantees every group at least a few units.
Does rounding change the total?
No. Each exact share is rounded down and the leftover units go to the groups with the largest fractional parts, so the whole numbers always add up to the sample size you entered.
Can I use this for a poll of people?
Yes, if you can list or reach people by group. The page only splits the sample. How you reach them, and how to correct for people who do not answer, is a separate question.