The sample size needed to estimate the difference between two population proportions to within a margin of error E with a confidence level of 1 – a can be found as follows. In the expression
Replace n1 and n2 by n (assuming that both samples have the same size) and replace each of a p1 , q2, p2 and by 0.5 (because their values are not known). Then solve for n.
Use this approach to find the size of each sample if you want to estimate the difference between the proportions of men and women who own cars. Assume that you want 95% confidence that your error is no more than 0.03