The sample size needed to estimate the difference between two population proportions to
within a margin of error with a significance level of can be found
as follows. In the expression
we replace both and by
(assuming that both samples have the same size) and
replace each of and by
(because their values are not known). Then we solve for n, and get
Finally, increase the value of to the next larger integer number.
Use the above formula and Table C to find the size of each sample needed to estimate the difference between the proportions of boys and girls under 10 years old who are afraid of spiders. Assume that we want a % confidence level and that the error is smaller than