Monday, May 24, 2010

Sample size question?

several surveys have been done in area towns to estimate the % of people who vote in favor of a tax levy to suport schools. the fraction who say they would vote yes has been estimated at .4 calculate the sample size needed to obtain a 95% confidence interval with a margin of error of plus or minus .04.

Sample size question?
Confidence intervals are used to find a region in which we are 100 * ( 1 - α )% confident the true value of the parameter is in the interval.





For large sample confidence intervals about the population proportion you have:





pHat ± z * sqrt(phat * (1- phat) / n)





where phat is the sample proportion


z is the zscore for having α% of the data in the tails, i.e., P( |Z| %26gt; z) = α


n is the sample size





To find the sample size needed for a confidence interval of a given size we need only to concern ourselves with the error term and the width of the interval.


We know that the interval is centered at phat so we need to find the value of n such that





z * sqrt(phat * (1-phat) / n) = width.





The z-score for a 0.95 confidence interval is the value of z such that 0.025 is in each tail of the distribution.


z= 1.959964





The equation we need to solve is: z * sqrt(phat * (1-phat) / n) = width





n = phat * (1 - phat) * (width / z) ^ -2.





If we don't know anything about phat and are still asked to find the sample size we let phat = 0.5. This maximizes the value of the error term and if n is sufficient for phat = 0.5, the n will be sufficient for all other values of phat.





n = 0.4 * ( 1 - 0.4 ) * ( 0.04 / 1.959964 ) ^ -2





n = 576.2188





n must be integer valued. Always take the ceiling of n so that the size of the interval will be correct.





n = 577


No comments:

Post a Comment