A researcher knows that the probability that a questionnaire will be reponded by mail is 40%. He wants to be 99% sure he will get at least 200 responded questionnaires back. How many questionnaires must he send by mail to be 99% sure he will get at least 200 answers?

  • $\begingroup$ Chris, are these questions (this and your previous binomial question) homework? We'll still help you answer them, we just won't give you the answer on a silver platter. $\endgroup$ – jbowman May 27 '12 at 20:13
  • $\begingroup$ This is not a homework, I'm making some exercises on the binomial distrubiution and some of them are really hard for me. $\endgroup$ – chris May 27 '12 at 20:50
  • 2
    $\begingroup$ Actually, this is homework in the sense described in the homework Wiki. $\endgroup$ – whuber May 28 '12 at 19:07

Using R and the function pbinom(k, ..., lower.tail=FALSE) which gives the probability that the observed number of success is larger than $k$ (the complement of the cumulative probability of $k$), you can do it this way:

# The size has to be at least 200.
size <- 200
# Increase size until threshold is hit.
while(pbinom(200, size, prob=.4, lower.tail=F) < .99) {
   size = size+1

The above solution should do, if you are genuinely interested in the solution and how to get a practical answer. If this is homework though, I cannot guarantee that this will be sufficient ;-)

  • 1
    $\begingroup$ It's not homework :d. i don't understand your response, are these functions of a statistical computer program? I thought it had to be solved by transforming it to a normal distribution, but that did'nt work out well. Thanks for the reply $\endgroup$ – chris May 27 '12 at 21:00
  • $\begingroup$ (+1) Happy to know that it's not homework :D Anyway, as @jbowman said we are here to help. This is done using R, which is a standard statistical software (cran.r-project.org). You can download it, start it and copy-paste the code in the window that appears. To display the answer you can type print(size), which gives the right answer. You can also use the Gaussian approximation as you suggest. The mean number of success is $.4 \times n$ and the variance is $.4 \times .6 \times n$. By knowing that a Gaussian has 99% chance of being higher than mean - 2.32 * sd you can get $n$. $\endgroup$ – gui11aume May 27 '12 at 21:15
  • $\begingroup$ I tried to put it in a formula ( n = ... ) but i can't find the right one. With the way you suggest i still have to try and fit several numbers, right? $\endgroup$ – chris May 27 '12 at 21:45
  • $\begingroup$ $.4 \times n - 2.32 \sqrt{.4 \times .6 \times n} > .99$ gives you only one parameter to fit. $\endgroup$ – gui11aume May 27 '12 at 21:51
  • $\begingroup$ I mean that i kinda have to guess n and by error adjusting it, by increasing n or decreasing n.. $\endgroup$ – chris May 27 '12 at 21:55

The exact binomial confidence intervals are obtained by a method involving an integral that was described in a paper by Clopper and Pearson around 1934. That is why it is often called the Clopper-Pearson method. For any $n >200$ in your case you can use that method to compute a one-sided 99% confidence interval for the number of responses. Keep increasing $n$ until this upper bound exceeds $200$. Now since $n$ is going to be large the normal approximate confidence interval can be used as a good approximation. That is what you would do if you didn't know that $p=0.40$ and estimated it from data. So instead of a confidence interval you can compute the exact point at which $99\%$ of the binomial distribution falls below. Using the normal approximate distribution approximates this probability interval. That is what gui11aume did using R.

  • $\begingroup$ (+1) Such a culture!! By the way, the R script gives the exact answer, the comments aimed to help @chris through the Gaussian approximation. $\endgroup$ – gui11aume May 27 '12 at 23:35
  • $\begingroup$ Okay it is just that the R code looked like it was using the cumulative normal to approximate the binomial because I misread pbinomial as probnormal. $\endgroup$ – Michael R. Chernick May 27 '12 at 23:43
  • $\begingroup$ The Clopper-Pearson method is often called exact, but it is not exact in the normal sense of being exactly correct. Instead, it is exact because it is based on the binomial distribution rather than an approximation to it. For most purposes the Clopper-Pearson method is at least arguably overly conservative rather than exact. $\endgroup$ – Michael Lew May 28 '12 at 2:05
  • $\begingroup$ @MichaelLew The Clopper-Pearson method is exact because it constructs confidence intervals based on the binomial distribution rather than an approximate distribution like the normal. That is the meaning of exact. Because the distribution is discrete and the definition of significance level a 95% exact confidence interval for a binomial proportion can for some sample sizes have greater than 95% coverage. That may look conservative but any shortening of the interval drops the coverage below 95%. Exact methods for discrete random variables also leads to a sawtoothed power function. $\endgroup$ – Michael R. Chernick May 28 '12 at 11:20
  • $\begingroup$ @MichaelChernick I understand all of that, see my answer here: stats.stackexchange.com/questions/8844/…. What concerns me is that the specialized useage of 'exact' that we apply to Clopper-Pearson serves at least subliminally as a disincentive to use other methods which have better properties for most circumstances where the experimenter wants to know about the situation pertaining to the case of the experiment actually done. Clopper-Pearson intervals are rarely a good choice, 'exact' or not. $\endgroup$ – Michael Lew May 28 '12 at 21:38

How many trials before getting 200 successes, that's actually the definition of the negative binomial. In R you calculate this with:

200 + qnbinom(0.99, 200, 0.4)
[1] 567

A negative binomial density (R: dnbinom) gives you the prob that a certain number x of failures will be necessary to obtain 200 successes. Sum that up to get the CDF (R: pnbinom), i.e., the probability that at most x failures will get you the 200 successes. Conversely, the quantile function tells you that with probability 99%, 367 failures will suffice to get you the 200 successes. Said otherwise, there's (roughly) 1% chance that more than 367 failures (i.e., 567 trials) will be necessary to get your 200 successes.


  • $\begingroup$ A negative binomial tells you how many trials until you get 200 successes, not how many trials until you're $99\%$ sure there are at least 200 successes, which is what the question asked for. $\endgroup$ – Macro Jun 14 '12 at 2:20
  • $\begingroup$ Oh, right. Clever (+1) $\endgroup$ – Macro Jun 14 '12 at 3:09
  • $\begingroup$ A negative binomial density (R: dnbinom) gives you the prob that a certain number x of failures will be necessary to obtain 200 successes. Sum that up to get the CDF (R: pnbinom), i.e., the probability that at most x failures will get you the 200 successes. Conversely, the quantile function tells you that with probability 99%, 367 failures will get you the 200 successes. $\endgroup$ – Chap Jun 14 '12 at 3:13
  • $\begingroup$ Perhaps you can add that information to your answer? $\endgroup$ – Macro Jun 14 '12 at 3:18
  • 1
    $\begingroup$ Done, Cheers ! Chap $\endgroup$ – Chap Jun 14 '12 at 12:10

Let $X$ denote the number of letters replied to and $n$ the number of letters sent. This problem is mathematically equivalent to solving for the minimal $n$ such that $$P(X \leq 200) \leq .01$$

To get a closed form (approximation) solution, we can use the normal approximation to the binomial, which says that $X$ is approximately $N(\mu, \sigma^2)$ distributed where $\mu = np = .4n$ and $\sigma^2 = np(1-p) = .24n$. As Michael Chernick pointed out in his answer, this sample size is large enough for this approximation to be reasonable.

Using this approximation, we can reduce the problem to solving for the minimal $n$ such that

$$ P(X \leq 200) = \Phi \left( \frac{ 200 - .4n }{\sqrt{.24n}} \right) \leq .01 $$

where $\Phi(\cdot)$ is the normal CDF. This is equivalent to finding the minimal $n$ such that

$$ 200 \leq \sqrt{.24n} \cdot \Phi^{-1}(.01) + .4n $$

Since this is a monotonic function, to find the minimal $n$ it suffices to check where exact equality occurs; if we substitute $ x= \sqrt{n} $ we have a simple quadratic equation on this transformed scale:

$$ .4x^2 + .24 \cdot \Phi^{-1}(.01) x - 200 = 0 $$

which can be readily solved using the quadratic formula with

$$ a = .4 $$

$$ b = \sqrt{.24} \Phi^{-1}(.01) $$

$$ c = -200 $$

which yield the solutions

$$ x = \frac{ -b \pm \sqrt{b^2 -4ac} }{2a} = \{-20.98142, 23.83061 \}$$

We must take the positive solution, since $\sqrt{n}$ clearly must be positive. Also we must round up, since the result must be an integer. Squaring this and rounding up gives the minimal sample size: $$ n = \lceil 23.83061^2 \rceil = \lceil 567.898 \rceil = 568 $$.

Note that this closely agrees with the exact calculation using the Binomial distribution (I got $n = 567$).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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