8.2 & 8.3 Choosing a sample size What sample size n do we need for a given level of confidence about our estimate. Larger n coincides with better estimates and more confidence (all else being equal). Sample size calculations can be done for estimating both µ and p. 1 Can we choose a level of confidence AND have a certain Margin of Error (MOE)? If a client wants a smaller MOE for her 95% confidence interval (i.e. a smaller range or window for which we think the parameter lies), she’ll have to take a larger sample. “We don’t get something for nothing”. 2 Sample Size for Population Mean µ. Recall: 95% Confidence Interval (CI) for a Population Mean µ The margin of error (MOE) for the 95% CI for µ is 2s MOE = E ≈ n where s is the standard deviation of the sample. And the 95% CI is: X ± MOE 3 Example 1: A manufacturer of cereal boxes wants to know the mean weight of the boxes it produces. Previous studies have shown the population standard deviation of the weights of the boxes to be 0.1 ounces (i.e., σ = 0.1 ). They would like to estimate µ with 95% confidence AND have the MOE no greater than 0.012. 4 The 95% CI for µ depends on the MOE which depends on s and the sample size n. 2s MOE = E ≈ n The sample standard deviation s is an estimate for the population standard deviation σ. If we happen to know σ, we will use it instead of s for our MOE. 2σ MOE = E ≈ n 5 This client has asked that the MOE be no greater than 0.012, and we know σ = 0.1 . 2σ MOE = n 2(0.1) 0.012 = n Solving for n gives… 6 2(0.1) 0.012 = n 2(0.1) 2 2 (0.012) = ( ) n 0.04 0.000144 = n n = 277.78 To have a 95% confidence interval for µ with a MOE of 0.012, this company will have to sample 278 boxes. But we can’t sample a ‘part of a box’, so we need to round-up to n=278. 7 What Sample Size? The sample size needed to be 95% confident that X , the sample mean, will be within MOE of the population mean, µ. " 2σ % n ≥$ ' # MOE & 2 8 Sample Size for Population Proportion p. Recall: 95% Confidence Interval (CI) for a Population Proportion p The margin of error (MOE) for the 95% CI for p is ˆ ˆ p(1− p) MOE = E ≈ 2 n where pˆ is the sample proportion. And the 95% CI is: pˆ ± MOE 9 Example 1: A manufacturer of coats wants to know the proportion of coats, p, it is producing with defective zippers. They would like to estimate p with 95% confidence AND have the MOE no greater than 0.04. 10 At 95% confidence, the MOE depends on pˆ and the sample size n. ˆ ˆ p(1− p) MOE = 2 n Problem: we ˆ don’t know p It turns out that the margin of error is largest ˆ = 0.5. So, since we don’t know pˆ when p before we collect our data, we’ll plug-in p ˆ = 0.5 which gives us the widest possible MOE (i.e. we’re assuming worst case scenario for estimating p). 11 plugging-in pˆ =0.5, and the requested MOE from the client, this gives us 1 equation with 1 unknown: After ˆ ˆ p(1− p) MOE = 2 n Replace each pˆ with 0.5 0.5(1 − 0.5) 0.04 = 2 n Now we can solve for n, the sample size needed for this specific MOE. 12 0.5(1 − 0.5) 0.04 = 2 n 0.5(0.5) 2 2 (0.04) = (2 ) n 0.5(0.5) 0.0016 = 4 n 0.5(0.5) n=4 0.0016 1 n= = 625 0.0016 To have a 95% confidence interval for p with a MOE of 0.04, this company will have to sample 625 coats. 13 What Sample Size? The sample size needed to be 95% confident ˆ , the sample proportion, will be within that p MOE of the population proportion, p. 1 n≥ 2 MOE 14 Example 2: Suppose we want to be 95% confident that our sample proportion will be within 0.02 of the population proportion. 1 1 n≥ ⇒n≥ = 2, 500 2 2 MOE (0.02) Then we need to sample 2,500 people. 15 Example 3: The Gallop Poll often quotes a margin of error of +/- 3% at a confidence of 95%. How many people did they ask*? 1 1 1 n≥ = = = 1111.11 2 2 MOE (0.03) 0.0009 But we can’t sample a ‘part of a person’, so we need to round-up for n=1112. 16 Example 4: USA today http://www.usatoday.com/news/polls/tables/live/ 2007-02-12-poll.htm “Results are based on telephone interviews with 1,006 National Adults, aged 18+, conducted February 9-11, 2007. For results based on the total sample of National Adults, one can say with 95% confidence that the margin of sampling error is ±3 percentage points.” Technically, a MOE of 0.03154 coincides with a sample of size n=1006 based on the formulas presented here. 17
© Copyright 2024