17
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

8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

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

Page 2: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

2

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”.

Page 3: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

3

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

where s is the standard deviation of the sample. And the 95% CI is:

MOE = E ≈ 2sn

X ±MOE

Page 4: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

4

 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., ). They would like to estimate µ with 95% confidence AND have the MOE no greater than 0.012.

σ = 0.1

Page 5: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

 The 95% CI for µ depends on the MOE which depends on s and the sample size n.

5

MOE = E ≈ 2sn

 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.

MOE = E ≈ 2σn

Page 6: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

 This client has asked that the MOE be no greater than 0.012, and we know .

 Solving for n gives…

6

σ = 0.1

MOE = 2σn

0.012 = 2(0.1)n

Page 7: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

7

To have a 95% confidence interval for µ with a MOE of 0.012, this company will have to sample 278 boxes.

0.012 = 2(0.1)n

(0.012)2 = (2(0.1)n)2

0.000144 = 0.04n

n = 277.78But we can’t sample a ‘part of a box’, so we need to round-up to n=278.

Page 8: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

8

What Sample Size?

 The sample size needed to be 95% confident that , the sample mean, will be within MOE of the population mean, µ.

n ≥ 2σMOE"

#$

%

&'2

X

Page 9: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

9

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

where is the sample proportion. And the 95% CI is:

MOE = E ≈ 2 p̂(1− p̂)n

p̂p̂±MOE

Page 10: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

10

 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.

Page 11: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

11

 At 95% confidence, the MOE depends on and the sample size n.

MOE = 2 p̂(1− p̂)n

It turns out that the margin of error is largest when = 0.5. So, since we don’t know before we collect our data, we’ll plug-in = 0.5 which gives us the widest possible MOE (i.e. we’re assuming worst case scenario for estimating p).

p̂ p̂p̂

Problem: we don’t know p̂

Page 12: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

MOE = 2 p̂(1− p̂)n

12

 After plugging-in =0.5, and the requested MOE from the client, this gives us 1 equation with 1 unknown:

n)5.01(5.0204.0 −

=

Now we can solve for n, the sample size needed for this specific MOE.

Replace each with 0.5 p̂

Page 13: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

13

n)5.01(5.0204.0 −

=

22 ))5.0(5.02()04.0(n

=

n)5.0(5.040016.0 =

0016.0)5.0(5.04=n

To have a 95% confidence interval for p with a MOE of 0.04, this company will have to sample 625 coats.

6250016.01

==n

Page 14: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

14

What Sample Size?

 The sample size needed to be 95% confident that , the sample proportion, will be within MOE of the population proportion, p.

n ≥ 1MOE 2

Page 15: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

15

Example 2:  Suppose we want to be 95% confident that

our sample proportion will be within 0.02 of the population proportion.

n ≥ 1MOE 2 ⇒ n ≥ 1

0.02( )2= 2,500

Then we need to sample 2,500 people.

Page 16: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

16

 The Gallop Poll often quotes a margin of error of +/- 3% at a confidence of 95%.  How many people did they ask*?

Example 3:

n ≥ 1MOE 2 =

1(0.03)2

=1

0.0009=1111.11

But we can’t sample a ‘part of a person’, so we need to round-up for n=1112.

Page 17: 8.2 & 8.3 Choosing a sample size - University of Iowahomepage.stat.uiowa.edu/~rdecook/stat1010/notes/Section_8.2_8.3_… · A manufacturer of cereal boxes wants to know the mean weight

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