simple random sampling - naval postgraduate...

27
Simple Random Sampling Professor Ron Fricker Naval Postgraduate School Monterey, California 3/26/13 1 Reading: Scheaffer et al. chapter 4

Upload: vuphuc

Post on 08-Sep-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Simple Random Sampling!

Professor Ron Fricker!Naval Postgraduate School!

Monterey, California!

3/26/13 1

Reading:!Scheaffer et al. chapter 4!

Page 2: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Goals for this Lecture!

•  Define simple random sampling (SRS) and discuss how to draw one!

•  Horvitz-Thompson estimation and SRS!–  The finite population correction (fpc)!

•  Defining estimators for means, totals, and proportions!

•  Sample size calculations!

3/26/13 2

Page 3: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Definition!

•  Simple random sampling (SRS) occurs when every sample of size n (from a population of size N) has an equal chance of being selected!–  This is not how we will actually draw such a

sample, just how it’s defined!•  Note it is not defined as each element having

an equal chance of being selected!–  That can occur with more complex designs,

particularly stratified designs!•  An example…!3/26/13 3

Page 4: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Example!

•  Consider a population consisting of 90 men and 10 women, so N=100, where we want to sample n=10 individuals!–  With SRS, we can get samples of all men or all

women!•  We could also draw a stratified sample,

where via SRS we sample nine men and (separately) via SRS one woman!–  Here each person has probability 1/10 of being

sampled, but not all groups of 10 can be sampled!

3/26/13 4

Page 5: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

How to Draw a SRS!

•  Easiest way: !–  Assign every element in the sampling frame a

uniformly distributed random number (say between 0 and 1)!

–  Sort the list according to the random numbers!•  Either ascending or descending, doesn’t matter!

–  Then take the first n elements!•  Don’t try to actually generate all possible

combinations of n elements out of N…!•  Chapter 4 describes other manual ways to do

this using tables of random numbers!3/26/13 5

Page 6: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Example!

3/26/13 6

UNSORTED SORTED

Page 7: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Note the Difference!

•  So, notice that giving every element in the population an equal chance of selection like this results in a SRS!

•  Which is probably why SRS is often mistakenly defined this way!

•  But remember that other non-SRS methods can also result in every element having an equal chance of being selected!–  For example, stratified sampling when probability

of selection is proportional to strata size!

3/26/13 7

Page 8: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Horvitz-Thompson Under SRS!

•  Under SRS, each sampling unit has probability n/N of being selected!

•  Estimating with Horvitz-Thompson estimator, we have!

–  Same as Stats 101!!•  If population is infinite, standard error of is

estimated the same way too: !

3/26/13 8

1 1 1 1

1 1 1 1 1 1ˆ/

n n n n

i i i ii i i ii

Ny y y y yN N n N N n n

µπ= = = =

= = = = =∑ ∑ ∑ ∑

ˆ y s nσ =

µ

y

Page 9: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

But What If Population Is Finite?!

•  It can be shown (see Appendix A of SMO&G) that for finite populations,!

!•  So, an unbiased estimate for the variance of

the sample mean is:!

•  And thus the estimated standard error is:!

3/26/13 9

E S 2( ) = NN −1

σ 2

Var Y( ) = N − n

N⎛⎝⎜

⎞⎠⎟

s2

n

“finite population correction” or fpc!

s.e. Y( ) = 1− n

N⎛⎝⎜

⎞⎠⎟× s

n

Page 10: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Finite Population Correction!

•  Note that failure to use the finite population correction (fpc) results in standard errors that are too large!–  Confidence intervals will be (erroneously) too big!–  Hypothesis tests will be (erroneously) less

powerful!•  For a survey with sample size less than 5

percent of population, can ignore the fpc!–  It will have negligible effect!

•  If sample size larger than 5 percent, use fpc to get more precise results – a good thing! !

3/26/13 10

Page 11: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Example: Margin of Error Estimates!

•  For various sample sizes, margins of error for an infinite-sized population and one with N=300 –  Binary question!–  Conservative

p=0.5 assumption!

3/26/13 11

Page 12: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Another Example!

•  Survey asks a binary yes/no question –  Estimate the proportion of respondents who say

“yes” with a confidence interval (N=300 and n=200)!–  If 100 of the 200 say “yes,” population point

estimate is 50% ( )!•  Calculating the 95% confidence interval:!

–  Incorrect interval without fpc: (43%, 57%)!

–  Correct interval with fpc: (46%, 54%)!

3/26/13 12

ˆ 0.5p =

ˆ ˆ(1 ) 0.25ˆ 1.96 0.5 1.96 0.5 0.07200

p ppn−± = ± = ±

p̂ ±1.96 1− n

N⎛⎝⎜

⎞⎠⎟

p̂(1− p̂)n

⎛⎝⎜

⎞⎠⎟= 0.5±1.96 1

3⎛⎝⎜

⎞⎠⎟

0.25200

⎛⎝⎜

⎞⎠⎟= 0.5± 0.04

Page 13: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Where Does the FPC Come From?!

•  In an infinite population, if we sample two observations then!–  Doesn’t really matter whether we sample with

replacement or not!•  For a finite population, when we sample

without replacement, !

•  Picking one observation affects the rest, so there is correlation!!

3/26/13 13

Cov( , ) 0i jY Y =

21Cov( , )1i jY Y

Nσ= −

Page 14: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Mean Estimation Summary!

•  Estimator for the mean:!

•  Variance of :!

•  Bound on the error of estimation (margin of error):!

3/26/13 14

1

1 n

ii

y yn =

= ∑

y Var y( ) = 1− n

N⎛⎝⎜

⎞⎠⎟

s2

n

2 Var y( ) = 2 1− n

N⎛⎝⎜

⎞⎠⎟

s2

n

Page 15: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Estimating Totals!

•  Estimator for the total:!

•  Variance of :!

•  Bound on the error of estimation (margin of error):!

3/26/13 15

τ̂ = N × y = N

nyi

i=1

n

τ̂ Var τ̂( ) = Var Ny( ) = N 2 1− n

N⎛⎝⎜

⎞⎠⎟

s2

n

2 Var τ̂( ) = 2N 1− n

N⎛⎝⎜

⎞⎠⎟

s2

n

Page 16: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Estimating Proportions!

•  Estimator for the proportion:!

•  Variance of :!

•  Bound on the error of estimation (margin of error):!

3/26/13 16

1

1ˆn

ii

p y yn =

= = ∑

p̂ Var p̂( ) = 1− n

N⎛⎝⎜

⎞⎠⎟

p̂ 1− p̂( )n

2 Var p̂( ) = 2 1− n

N⎛⎝⎜

⎞⎠⎟

p̂ 1− p̂( )n

Page 17: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Sample Size Calculations (w/ fpc)for Estimating Means !

•  Typically, we want to determine a sample size to achieve a particular margin of error B

•  So, solving the following for n

gives!

•  This is the number of respondents required!–  Will need to inflate to account for nonrespondents!

3/26/13 17

2

21

N n BN n

σ−⎛ ⎞ =⎜ ⎟−⎝ ⎠

( )2

2 21 4Nn

B Nσ

σ=

− +

Page 18: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Sample Size Calculations (w/ fpc)for Estimating Totals !

•  Proceed as before, but use the expression for the margin of error for totals!

•  That is, solve the following for n

•  ! gives!

•  Again, don’t forget to inflate this to account for the nonresponse rate!

3/26/13 18

2

21

N nN BN n

σ−⎛ ⎞ =⎜ ⎟−⎝ ⎠

( )2

2 2 21 4Nn

B N Nσ

σ=

− +

Page 19: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Sample Size Calculations (w/ fpc)for Estimating Proportions !

•  Again proceed as before, but use the expression for proportions!

•  That is, solve the following for n

gives!

•  And again, don’t forget to inflate this to account for the nonresponse rate!

3/26/13 19

( )ˆ ˆ12 1

p pn BN n

−⎛ ⎞− =⎜ ⎟⎝ ⎠

( )2

(1 )1 4 (1 )Np pn

B N p p−=

− + −

Page 20: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Power Calculations Example!

•  Back to survey with N=300, where we guess that p=50% (most conservative assumption) !

•  What sample size do we need to achieve a margin of error of 3%?!

•  So, need responses from 237 out of the 300 –  If 80% response rate, must sample 237/0.8=297!!

3/26/13 20

( )

( )

2

2

(1 )1 4 (1 )300 0.5(1 0.5) 236.4

0.03 300 1 4 0.5(1 0.5)

Np pnB N p p

−=− + −

× −= =− + −

Page 21: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Another Illustration!

•  Same assumptions:!–  Binary question!–  p=0.5

•  If we’re going to survey ~900 people out of 1500, might as well do them all?!–  Plus, 1500 gives

some insurance if response rate < 0.7!

21 3/26/13

Page 22: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Doing the Calculations Directly!

•  First, we need this many respondents for a 3% margin of error:!

•  Then, accounting for nonresponse:!

3/26/13 22

n = Np(1− p)B2 N −1( ) 4+ p(1− p)

= 1500× 0.5(1− 0.5)0.032 1500−1( ) 4+ 0.5(1− 0.5)

= 638.5

638.5 / 0.7 = 912.1

Page 23: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Sample Size Calculations (w/out fpc)for Estimating Proportions!

•  Similar to what we were doing, but margin of error expression does not include fpc!–  Choose B, the margin of error !–  Then,!–  Algebra gives required sample size: !

•  Can simplify further:!–  Estimate p using worst case: ½!–  Then, !

3/26/13 23

2

ˆ ˆ4 (1 )p pnB−=

ˆ ˆ2 (1 ) /B p p n= −

21/n B=

Page 24: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Example!

•  National poll of likely voters for candidate “X”!–  Desire 3% margin of error!

•  Then!•  If expect a 70% response rate, then sample

1,111.1/0.7=1,587.3 or 1,588 likely voters!•  Compare to fpc-based calculation:!

3/26/13 24

2 21/ 1/ 0.03 1,111.1n B= = =

( )2

300,000,000 0.5(1 0.5) 1,111.10.03 300,000,000 1 4 0.5(1 0.5)

n × −= =− + −

Page 25: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

How Does That Work?!

3/26/13 25

( )2

2

2

2

(1 )1 4 (1 )

4 (1 )1

(1 )41

1 (for 1/ 2)11

1 for large

Np pnB N p p

N p pN

p pBN

NN p

BN

NB

−=− + −

⎛ ⎞ −⎜ ⎟−⎝ ⎠= −+−

⎛ ⎞⎜ ⎟−⎝ ⎠= =+

Page 26: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

Take-Aways !!

•  With SRS and sample size less than 5% of population, proceed using “Stats 101” methods!–  Means, totals, proportions!–  Can use standard statistical software!

•  With SRS, if n > 0.05N, then be sure to use finite population correction!–  Reported results more precise (and correct)!–  Either need to use special software or manually

adjust the reported standard errors!

3/26/13 26

Page 27: Simple Random Sampling - Naval Postgraduate Schoolfaculty.nps.edu/rdfricke/Survey_Short_Course_Docs/Lecture 8... · Goals for this Lecture! • Define simple random sampling (SRS)

What We Have Covered!

27

•  Defined simple random sampling (SRS) and discussed how to draw one!

•  Discussed Horvitz-Thompson estimation and SRS!–  Defined the finite population correction (fpc)!

•  Defined estimators for means, totals, and proportions, including their standard errors!

•  Discussed sample size calculations!

3/26/13