A campus population of size N=9000 is to be surveyed by a stratified sample for the prevalence of a certain disease based upon three strata of respective sizes $N_h$ = 1000, 3000, and 5000 for h = 1, 2, 3. The costs of sampling individuals from theses strata are estimated to be respectively 40, 20, and 10 dollars per person. The campus health authorities believe that roughly 1% of stratum 1, 5% of stratum 2, and 12% of stratum 3 will test positive for the disease.

What is the optimal number of individuals to sample in each stratum if the total budget for the data collection in the survey is $2000?

$n_1$ = c*$\frac{(N_1*S_1)/\sqrt{c_1}}{\Sigma (N_h*S_h)/\sqrt{c_h}}$

$n_1$ = 2000*$\frac{(1000*\sqrt{.0099})/\sqrt{40}}{(1000*\sqrt{.0099})/\sqrt{40}+(3000*\sqrt{.0475})/\sqrt{20}+(5000*\sqrt{.1056})/\sqrt{10}}$ = 46.562449

The correct answer is 3.620154, so I'd like to know where I went wrong.

  • $\begingroup$ Neither answer can possibly be correct, because individuals cannot be divided for sampling: any reasonable sample size must be a whole non-negative number. Any meaningful answer must consist of three whole numbers giving the numbers of individuals to sample within each stratum. The "correct" answer cannot be close to right because even sampling four individuals per stratum will cost only $280, which is far less than the budget. $\endgroup$
    – whuber
    Jul 20, 2014 at 19:33
  • 1
    $\begingroup$ Sorry I only mentioned stratum 1. The correct answers for each stratum are 4(3.620154), 33(33.642827), 118(118.233730) for strata 1, 2, and 3, respectively. I'm just trying to figure out where I went wrong in stratum 1. $\endgroup$
    – Andrew
    Jul 20, 2014 at 23:37
  • 2
    $\begingroup$ Look at the dimensional analysis: Your formula comes out in dollars. $\endgroup$
    – Dennis
    Jul 21, 2014 at 2:46

1 Answer 1


Modified 2014-07-22: Your formula for $n_h$ is incorrect; the values are in the right proportions, but, as Dennis pointed out, you applied the proportions to the total cost. The formula would be correct if you had substituted the sample size $n$ for $c$, but of course you can't know that in advance.

Here is the solution presented by Cochran, 1977, pp 97-98, who derives formula 1:

$$ \frac{n_h}{n} = \frac{N_h S_h /\sqrt{c_h}}{\sum_h (N_h S_h/\sqrt{c_h})} \quad \quad (1) $$

(Cochran, 1977, p. 98, Eq. 5.23)

so that

$$ n_h = n \frac{N_h S_h /\sqrt{c_h}}{\sum_h (N_h S_h/\sqrt{c_h})} \quad \quad $$

We still don't know what $n$ is, so substitute the $n_h$ above in the cost equation:

\begin{equation} c = \sum_{h} c_h n_h \end{equation} (Cochran, p. 97, Eq. 5.17)

to get (Corrected 2014-07-22): $$ n = c \times \frac{\sum_h (N_h S_h /\sqrt{c_h})}{\sum_h (N_h S_h \sqrt{c_h})} $$ (Cochran, p. 98, Eq. 5.24)

Note that $c$ is the variable cost. A real total would include a fixed cost.

Now multiply Eq. 1 by $n$ to get the $n_h$.

A much simpler solution

If you think this is overly complicated, I agree. Here's a simpler method. The key to the simplification is realizing, from Equation 1, that

\begin{equation} n_h \propto {N_h S_h /\sqrt{c_h}} \quad \quad (2) \end{equation}

In other words, the $n_h$ are proportional to the RHS of Equation 2.

We create preliminary guesses for the $n_h$, call them $n_h'$, that are also proportional to the RHS of Equation 2. Then we find the total cost $c'$ for the $n_h'$, compare to the target cost $c$ (=\$2,000) and correct by their ratio.

The simplest assignment for $n_h'$ is just the RHS of Equation 2:

\begin{equation} n_h' = {N_h S_h /\sqrt{c_h}} \end{equation}

These are: $n_1' = 15.732$, $n_2' = 146.202$, and $n_3' = 518.809$. Applying the costs $c_1 = 40$, $c_2 = 20$, and $c_3 = 10$ to these give the preliminary total cost:

$$ c' = \$8,691.417 $$

This is too high, compared to $c = \$2,000$, so the $n_h'$ are too big. To get the final values of the $n_h$, deflate the preliminary values by $c/c' = 0.230112$. Multiplying each by $c/c'$ yields $n_1 = 3.620$; $n_2 = 33.643$; and $n_3 = 118.233$. Rounding to the nearest whole number yields a total cost of \$2,020, still too high, so round $n_2$ down to get final values of $n_1 =4$, $n_2 = 33$, and $n_3 = 118$. A check shows that the final cost is \$2,000, as required.

  • $\begingroup$ +1 Why did you adjust $n_2$ in order to obtain the final answer? Why not adjust $n_3$ or even $n_1$ in order to meet the $2000$ budget? (It turns out your solution really is best, but how you obtained it seems arbitrary.) $\endgroup$
    – whuber
    Jul 21, 2014 at 14:14
  • $\begingroup$ It was just lucky that the simplest solution also was optimum. The other solution I tried, $n_3$ = 116 instead of $n_3$ = 118, gave practically the same standard error: 0.02160451 instead of .02160316, differing only in the sixth decimal place. This is the common experience: the standard error is insensitive to small departures from optimal allocation. No adjustment to $n_1$ would have reduced the cost from \$2020 to \$2000, because the cost of each stratum 1 unit was \$40. $\endgroup$ Jul 22, 2014 at 12:21
  • $\begingroup$ (+1: Thank you for a thoughtful reply.) In circumstances where one of the $n_i$ is small I have found that sometimes the optimum $(n_i)$ is far from the rounded values found by the standard formula, although it is true that the SE is insensitive (it must be, because it's a quadratic function of the variables). One could also consider rounding $n_1$ down and adjusting both $n_2$ and $n_3$ simultaneously to compensate. Although in practice these issues are minor, only such considerations can adequately justify the rounding that is done, which otherwise appears mysterious and arbitrary. $\endgroup$
    – whuber
    Jul 22, 2014 at 13:07
  • 1
    $\begingroup$ I should have said "No adjustment to n1 alone". The computations for the first stratum are dubious anyway in my opinion. Under the assumption that P1 = 0.01, there's a 96% chance that none of the four observations would be diseased ($0.99^4=0.961$). I would have estimated the number of cases in Stratum 1 from others' expert knowledge and combined this number with the estimates in Strata 2 & 3. I believe Deming has an example of this kind of calculation for a two-phase prevalence survey in his book Sampling Design in Business Research, Wiley, 1960. $\endgroup$ Jul 23, 2014 at 1:46
  • $\begingroup$ I just made a correction to the equation for n in the outline of Cochran's method and gave the proper equation reference from Cochran's book. $\endgroup$ Jul 23, 2014 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.