Optimal Allocation 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.
 A: 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.
