Simple Radom Samplig! Professor Ro Fricker! Naval Postgraduate School! Moterey, Califoria! Readig:! 3/26/13 Scheaffer et al. chapter 4! 1
Goals for this Lecture! Defie simple radom samplig (SRS) ad discuss how to draw oe! Horvitz-Thompso estimatio ad SRS! The fiite populatio correctio (fpc)! Defiig estimators for meas, totals, ad proportios! Sample size calculatios! 3/26/13 2
Defiitio! Simple radom samplig (SRS) occurs whe every sample of size (from a populatio of size N) has a equal chace of beig selected! This is ot how we will actually draw such a sample, just how it s defied! Note it is ot defied as each elemet havig a equal chace of beig selected! That ca occur with more complex desigs, particularly stratified desigs! A example! 3/26/13 3
Example! Cosider a populatio cosistig of 90 me ad 10 wome, so N=100, where we wat to sample =10 idividuals! With SRS, we ca get samples of all me or all wome! We could also draw a stratified sample, where via SRS we sample ie me ad (separately) via SRS oe woma! Here each perso has probability 1/10 of beig sampled, but ot all groups of 10 ca be sampled! 3/26/13 4
How to Draw a SRS! Easiest way:! Assig every elemet i the samplig frame a uiformly distributed radom umber (say betwee 0 ad 1)! Sort the list accordig to the radom umbers! Either ascedig or descedig, does t matter! The take the first elemets! Do t try to actually geerate all possible combiatios of elemets out of N! Chapter 4 describes other maual ways to do this usig tables of radom umbers! 3/26/13 5
Example! UNSORTED SORTED 3/26/13 6
Note the Differece! So, otice that givig every elemet i the populatio a equal chace of selectio like this results i a SRS! Which is probably why SRS is ofte mistakely defied this way! But remember that other o-srs methods ca also result i every elemet havig a equal chace of beig selected! For example, stratified samplig whe probability of selectio is proportioal to strata size! 3/26/13 7
Horvitz-Thompso Uder SRS! Uder SRS, each samplig uit has probability /N of beig selected! µ Estimatig with Horvitz-Thompso estimator, we have! 1 1 1 1 1 N 1 ˆ µ = y = y = y = y = y N N N N i i i i i= 1 πi i= 1 / i= 1 i= 1 Same as Stats 101!! If populatio is ifiite, stadard error of estimated the same way too:! ˆ σ y = s y is 3/26/13 8
But What If Populatio Is Fiite?! It ca be show (see Appedix A of SMO&G) that for fiite populatios,!! E( S 2 ) = N N 1 σ 2 So, a ubiased estimate for the variace of the sample mea is:! Var ( Y ) = N N s2 Ad thus the estimated stadard error is:! s.e. Y ( ) = 1 N s fiite populatio correctio or fpc! 3/26/13 9
Fiite Populatio Correctio! Note that failure to use the fiite populatio correctio (fpc) results i stadard errors that are too large! Cofidece itervals will be (erroeously) too big! Hypothesis tests will be (erroeously) less powerful! For a survey with sample size less tha 5 percet of populatio, ca igore the fpc! It will have egligible effect! If sample size larger tha 5 percet, use fpc to get more precise results a good thig!! 3/26/13 10
Example: Margi of Error Estimates! For various sample sizes, margis of error for a ifiitesized populatio ad oe with N=300 Biary questio! Coservative p=0.5 assumptio! 3/26/13 11
Aother Example! Survey asks a biary yes/o questio Estimate the proportio of respodets who say yes with a cofidece iterval (N=300 ad =200)! If 100 of the 200 say yes, populatio poit estimate is 50% ( p ˆ = 0.5)! Calculatig the 95% cofidece iterval:! Icorrect iterval without fpc: (43%, 57%)! pˆ(1 pˆ) 0.25 pˆ ± 1.96 = 0.5 ± 1.96 = 0.5 ± 0.07 200 Correct iterval with fpc: (46%, 54%)! ˆp ±1.96 1 N ˆp(1 ˆp) = 0.5 ±1.96 1 3 0.25 200 3/26/13 12 = 0.5 ± 0.04
Where Does the FPC Come From?! I a ifiite populatio, if we sample two observatios the! Does t really matter whether we sample with replacemet or ot! Cov( Yi, Y j) = 0 For a fiite populatio, whe we sample without replacemet,! 1 2 Cov( Yi, Yj) = σ N 1 Pickig oe observatio affects the rest, so there is correlatio!! 3/26/13 13
Mea Estimatio Summary! Estimator for the mea:! y 1 yi i = 1 = y Variace of :! Var y ( ) = 1 N s2 Boud o the error of estimatio (margi of error):! 2 Var y ( ) = 2 1 N s2 3/26/13 14
Estimatig Totals! Estimator for the total:! ˆτ = N y = N y i i=1 ˆ τ Variace of :! Var ( ˆτ ) = Var Ny ( ) = N 2 1 N s2 Boud o the error of estimatio (margi of error):! 2 Var ( ˆτ ) = 2N 1 N s2 3/26/13 15
Estimatig Proportios! Estimator for the proportio:! 1 pˆ = y = y i = 1 i ˆp Variace of :! Var ( ˆp ) = 1 N ˆp ( 1 ˆp ) Boud o the error of estimatio (margi of error):! 2 Var ( ˆp ) = 2 1 N ˆp 1 ˆp ( ) 3/26/13 16
Sample Size Calculatios (w/ fpc) for Estimatig Meas! Typically, we wat to determie a sample size to achieve a particular margi of error B So, solvig the followig for gives! 2 = 2 N σ N 1 B ( N ) This is the umber of respodets required! Will eed to iflate to accout for orespodets! 3/26/13 17 = B 2 Nσ 1 4+ σ 2 2
Sample Size Calculatios (w/ fpc) for Estimatig Totals! Proceed as before, but use the expressio for the margi of error for totals! That is, solve the followig for! gives! 2 N σ 2N = B N 1 = 2 Nσ 2 2 2 B N 1 4N + σ ( ) Agai, do t forget to iflate this to accout for the orespose rate! 3/26/13 18
Sample Size Calculatios (w/ fpc) for Estimatig Proportios! Agai proceed as before, but use the expressio for proportios! That is, solve the followig for gives! ( 1 pˆ) pˆ 2 1 = N = ( ) Ad agai, do t forget to iflate this to accout for the orespose rate! 3/26/13 19 B Np(1 p) 1 4 (1 ) 2 B N + p p
Power Calculatios Example! Back to survey with N=300, where we guess that p=50% (most coservative assumptio)! What sample size do we eed to achieve a margi of error of 3%?! = Np(1 p) 1 4 (1 ) ( ) 2 B N + p p 300 0.5(1 0.5) = = 236.4 ( ) 2 0.03 300 1 4 + 0.5(1 0.5) So, eed resposes from 237 out of the 300 If 80% respose rate, must sample 237/0.8=297!! 3/26/13 20
Aother Illustratio! Same assumptios:! Biary questio! p=0.5 If we re goig to survey ~900 people out of 1500, might as well do them all?! Plus, 1500 gives some isurace if respose rate < 0.7! 3/26/13 21
Doig the Calculatios Directly! First, we eed this may respodets for a 3% margi of error:! = = B 2 Np(1 p) ( N 1) 4 + p(1 p) 1500 0.5(1 0.5) ( ) 4 + 0.5(1 0.5) = 638.5 0.03 2 1500 1 The, accoutig for orespose:! 638.5 / 0.7 = 912.1 3/26/13 22
Sample Size Calculatios (w/out fpc) for Estimatig Proportios! Similar to what we were doig, but margi of error expressio does ot iclude fpc! Choose B, the margi of error! The,! B= 2 pˆ(1 pˆ)/ Algebra gives required sample size:! Ca simplify further:! Estimate p usig worst case: ½! The,! = = 1/ B 4 pˆ(1 pˆ) 2 B 2 3/26/13 23
Example! Natioal poll of likely voters for cadidate X! Desire 3% margi of error! 2 2 The! = 1/ B = 1/0.03 = 1,111.1 If expect a 70% respose rate, the sample 1,111.1/0.7=1,587.3 or 1,588 likely voters! Compare to fpc-based calculatio:! 300,000,000 0.5(1 0.5) = = 1,111.1 ( ) 2 0.03 300,000,000 1 4 + 0.5(1 0.5) 3/26/13 24
How Does That Work?! = ( ) Np(1 p) 1 4 (1 ) 2 B N + p p N 4 p(1 p) N 1 = 2 p(1 p) B + 4 N 1 N N 1 = (for p = 1/ 2) 2 1 B + N 1 1 2 for large N B 3/26/13 25
Take-Aways!! With SRS ad sample size less tha 5% of populatio, proceed usig Stats 101 methods! Meas, totals, proportios! Ca use stadard statistical software! With SRS, if > 0.05N, the be sure to use fiite populatio correctio! Reported results more precise (ad correct)! Either eed to use special software or maually adjust the reported stadard errors! 3/26/13 26
What We Have Covered! Defied simple radom samplig (SRS) ad discussed how to draw oe! Discussed Horvitz-Thompso estimatio ad SRS! Defied the fiite populatio correctio (fpc)! Defied estimators for meas, totals, ad proportios, icludig their stadard errors! Discussed sample size calculatios! 3/26/13 27