1 / 70

Sampling and Inference

Sampling and Inference. The Quality of Data and Measures March 23, 2006. Why we talk about sampling. General citizen education Understand data you’ll be using Understand how to draw a sample, if you need to Make statistical inferences. Why do we sample?. How do we sample?.

atara
Download Presentation

Sampling and Inference

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sampling and Inference The Quality of Data and Measures March 23, 2006

  2. Why we talk about sampling • General citizen education • Understand data you’ll be using • Understand how to draw a sample, if you need to • Make statistical inferences

  3. Why do we sample?

  4. How do we sample? • Simple random sample • Variant: systematic sample with a random start • Stratified • Cluster

  5. Stratification • Divide sample into subsamples, based on known characteristics (race, sex, religiousity, continent, department) • Benefit: preserve or enhance variability

  6. Cluster sampling

  7. Effects of samples • Obvious: influences marginals • Less obvious • Allows effective use of time and effort • Effect on multivariate techniques • Sampling of independent variable: greater precision in regression estimates • Sampling on dependent variable: bias

  8. Sampling on Independent Variable

  9. Sampling on Dependent Variable

  10. Sampling Consequences for Statistical Inference

  11. Statistical Inference:Learning About the Unknown From the Known • Reasoning forward: distributions of sample means, when the population mean, s.d., and n are known. • Reasoning backward: learning about the population mean when only the sample, s.d., and n are known

  12. Reasoning Forward

  13. Exponential Distribution Example Mean = 250,000 Median=125,000 s.d. = 283,474 Min = 0 Max = 1,000,000

  14. Consider 10 random samples, of n = 100 apiece

  15. Consider 10,000 samples of n = 100 N = 10,000 Mean = 249,993 s.d. = 28,559 Skewness = 0.060 Kurtosis = 2.92

  16. Consider 1,000 samples of various sizes

  17. Difference of means example State 1 Mean = 250,000 State 2 Mean = 300,000

  18. Take 1,000 samples of 10, of each state, and compare them

  19. 1,000 samples of 10 State 2 > State 1: 673 times

  20. 1,000 samples of 100 State 2 > State 1: 909 times

  21. 1,000 samples of 1,000 State 2 > State 1: 1,000 times

  22. Another way of looking at it:The distribution of Inc2 – Inc1

  23. Play with some simulations • http://www.ruf.rice.edu/~lane/stat_sim/sampling_dist/index.html • http://www.kuleuven.ac.be/ucs/java/index.htm

  24. Reasoning Backward

  25. Central Limit Theorem As the sample size n increases, the distribution of the mean of a random sample taken from practically any population approaches a normal distribution, with mean  and standard deviation

  26. Calculating Standard Errors In general:

  27. Most important standard errors

  28. Using Standard Errors, we can construct “confidence intervals” • Confidence interval (ci): an interval between two numbers, where there is a certain specified level of confidence that a population parameter lies • ci = sample parameter + • multiple * sample standard error

  29. Constructing Confidence Intervals • Let’s say we draw a sample of tuitions from 15 private universities. Can we estimate what the average of all private university tuitions is? • N = 15 • Average = 29,735 • S.d. = 2,196 • S.e. =

  30. N = 15; avg. = 29,735; s.d. = 2,196; s.e. = s/√n = 567 .398942 y .000134 Mean The Picture 29,735+567=30,302 29,735-567=29,168 29,735-2*567= 28,601 29,735+2*567= 30,869 29,735 68% 95% 99%

  31. Confidence Intervals for Tuition Example • 68% confidence interval = 29,735+567 = [29,168 to 30,302] • 95% confidence interval = 29,735+2*567 = [28,601 to 30,869] • 99% confidence interval = 29,735+3*567 = [28,034 to 31,436]

  32. What if someone (ahead of time) had said, “I think the average tuition of major research universities is $25k”? • Note that $25,000 is well out of the 99% confidence interval, [28,034 to 31,436] • Q: How far away is the $25k estimate from the sample mean? • A: Do it in z-scores: (29,735-25,000)/567 = 8.35

  33. Constructing confidence intervals of proportions • Let us say we drew a sample of 1,000 adults and asked them if they approved of the way George Bush was handling his job as president. (March 13-16, 2006 Gallup Poll) Can we estimate the % of all American adults who approve? • N = 1000 • p = .37 • s.e. =

  34. N = 1,000; p. = .37; s.e. = √p(1-p)/n = .02 .398942 y .000134 Mean The Picture .37+.02=.39 .37-.02=.35 .37-2*.02=.33 .37+2*.02=.41 .37 68% 95% 99%

  35. Confidence Intervals for Bush approval example • 68% confidence interval = .37+.02 = [.35 to .39] • 95% confidence interval = .37+2*.02 = [.33 to .41] • 99% confidence interval = .37+3*.02 = [ .31 to .43]

  36. What Gallup said about the confidence interval • Results are based on telephone interviews with 1,000 national adults, aged 18 and older, conducted March 13-16, 2006. For results based on the total sample of national adults, one can say with 95% confidence that the maximum margin of sampling error is ±3 percentage points [because the actual standard error is 1.5%, not 2%].

  37. What if someone (ahead of time) had said, “I think Americans are equally divided in how they think about Bush.” • Note that 50% is well out of the 99% confidence interval, [31% to 43%] • Q: How far away is the 50% estimate from the sample proportion? • A: Do it in z-scores: (.37-.5)/.02 = -6.5 [-8.7 if we divide by 0.15]

  38. Constructing confidence intervals of differences of means • Let’s say we draw a sample of tuitions from 15 private and public universities. Can we estimate what the difference in average tuitions is between the two types of universities? • N = 15 in both cases • Average = 29,735 (private); 5,498 (public); diff = 24,238 • s.d. = 2,196 (private); 1,894 (public) • s.e. =

  39. N = 15 twice; diff = 24,238; s.e. = 749 .398942 y .000134 Mean The Picture 24,238+749=24,987 24,238-749= 23,489 24,238-2*749= 22,740 24,238+2*749= 25,736 24,238 68% 95% 99%

  40. Confidence Intervals for difference of tuition means example • 68% confidence interval = 24,238+749 = [23,489 to 24,987] • 95% confidence interval = 24,238+2*749 = [22,740 to 25,736] • 99% confidence interval =24,238+3*749 = • [21,991 to 26,485]

  41. What if someone (ahead of time) had said, “Private universities are no more expensive than public universities” • Note that $0 is well out of the 99% confidence interval, [$21,991 to $26,485] • Q: How far away is the $0 estimate from the sample proportion? • A: Do it in z-scores: (24,238-0)/749 = 32.4

  42. Constructing confidence intervals of difference of proportions • Let us say we drew a sample of 1,000 adults and asked them if they approved of the way George Bush was handling his job as president. (March 13-16, 2006 Gallup Poll). We focus on the 600 who are either independents or Democrats. Can we estimate whether independents and Democrats view Bus differently? • N = 300 ind; 300 Dem. • p = .29 (ind.); .10 (Dem.); diff = .19 • s.e. =

  43. diff. p. = .19; s.e. = .03 .398942 y .000134 Mean The Picture .19+.03=.22 .19-.03=.16 .19-2*.03=.13 .19+2*.03=.25 .19 68% 95% 99%

  44. Confidence Intervals for Bush Ind/Dem approval example • 68% confidence interval = .19+.03 = [.16 to .22] • 95% confidence interval = .19+2*.03 = [.13 to .25] • 99% confidence interval = .19+3*.03 = [ .10 to .28]

  45. What if someone (ahead of time) had said, “I think Democrats and Independents are equally unsupportive of Bush”? • Note that 0% is well out of the 99% confidence interval, [10% to 28%] • Q: How far away is the 0% estimate from the sample proportion? • A: Do it in z-scores: (.19-0)/.03 = 6.33

  46. Constructing confidence intervals of differences of means in a paired sample • Let’s say we draw a sample of tuitions from 15 private universities, in 2003 and again in 2004. Can we estimate what the difference in average tuitions is between the two years? • N = 15 • Averages = 28,102 (2003); 29,735 (2004); diff = 1,632 • s.d. = 2,196 (private); 1,894 (public); 886 (diff) • s.e. =

  47. N = 15; diff = 1,632; s.e. = 229 .398942 y .000134 Mean The Picture 1,632+229=1,861 1,632-229=1,403 1,632-2*229= 1,174 1632+2*229= 2,090 1,632 68% 95% 99%

  48. Confidence Intervals for second difference of tuition means example • 68% confidence interval = 1,632+ 229= [1,403 to 1,861] • 95% confidence interval = 1,632+ 2*229 = [1,174 to 2,090] • 99% confidence interval = 1,632+3*229 = [945 to 2,319]

  49. What if someone (ahead of time) had said, “Private university tuitions did not grow from 2003 to 2004” • Note that $0 is well out of the 99% confidence interval, [$1,174 to $2,090] • Q: How far away is the $0 estimate from the sample proportion? • A: Do it in z-scores: (1,632-0)/229 = 7.13

  50. The Stata output . gen difftuition=tuition2004-tuition2003 . ttest diff=0 in 1/15 One-sample t test ------------------------------------------------------------------------------ Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------------- difftu~n | 15 1631.6 228.6886 885.707 1141.112 2122.088 ------------------------------------------------------------------------------ mean = mean(difftuition) t = 7.1346 Ho: mean = 0 degrees of freedom = 14 Ha: mean < 0 Ha: mean != 0 Ha: mean > 0 Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000

More Related