8.2 & 8.3 choosing a sample size - university of...

Post on 13-Jul-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

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

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

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

 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

 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

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.

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

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

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.

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̂

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̂

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

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

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.

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.

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

top related