Determining Required Sample Size

164 Views Asked by At

Suppose 55% of a large population of voters actually favor candidate A. How large a random sample must be taken for there to be a 99% chance that the majority of voters in the sample will favor candidate A?

99% is within 3 standard deviations of the "mean".

Majority means > 50%

So proportion of success must be: $0.55 \pm \frac{3}{2\sqrt{n}} > 0.5$

Solving for "n" gives one solution of $n > 900$

But the answer is:

$n\ge537$

1

There are 1 best solutions below

0
On

The number $X$ of voters in a random sample of size $n$ in favor of Candidate A has $X \sim \mathsf{Binom}(n, .55).$ You seek $n$ such that $$P(X \le n/2) = P\left(\frac{X - np}{\sqrt{np(1-p)}} \le \frac{.5n - .55n}{\sqrt{n(.55)(.45)}}\right) = .01.$$ Thus you need $n$ such that $\frac{.5n - .55n}{\sqrt{n(.55)(.45)}} = -2.326.$ Because the normal approximation to the binomial is often slightly inaccurate, you should not expect to get exactly the right answer with this method. (You might try checking a few values of $n$ in the vicinity of 537, using a continuity correction.)

With software one can search for exactly the right answer. From R statistical software (where pbinom is a binomial CDF) it seems that the exact answer is 539, not 537. (There could be a typo in your answer book or the difference may be that the answer book is using a normal approximation.)

# search
n = 100:1000
pr = pbinom(n/2, n, .55)
min(n[pr < .01])
## 539

# check
pbinom(539/2, 539, .55)
## 0.009941358
pbinom(538/2, 538, .55)
## 0.01120778