MIT OpenCourseWare http://ocw.mit.edu 11.220 Quantitative Reasoning & Statistical Methods for Planners I Spring 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Quantitative Reasoning and Statistical Methods Ezra Glenn March 31, 2009 Ezra Glenn Quantitative Reasoning and Statistical Methods An Example: Immunization Study Before After Immunization 56 34 Ezra Glenn No Immunization 144 166 Total 200 200 Quantitative Reasoning and Statistical Methods An Example: Immunization Study Before After Immunization 56 34 No Immunization 144 166 Total 200 200 “Before” Sample: � p̂b = 56 ÷ 200 = .28 seb = √ .28×.78 √ 200 = 0.0330 (1) “After” Sample: � p̂a = 34 ÷ 200 = .17 sea = √ .17×.83 √ 200 = 0.0266 (2) Pooled Error: sed = � .03302 + .02662 = 0.0424 Ezra Glenn Quantitative Reasoning and Statistical Methods (3) Difference Between Two Groups: Proportions ⎧ ⎪ ⎨p̂b = 0.28 p̂a = 0.17 ⎪ ⎩ sed = 0.0424 (4) Then use t-statistic: t= p̂b − p̂a .28 − .17 = = 2.59 sed .0424 which exceeds our t-critical for df=398. ∴ we can reject H0 (i.e., we can conclude that the difference is significant) Ezra Glenn Quantitative Reasoning and Statistical Methods (5) Looking at Confidence Intervals 15 Confidence Intervals for Two Samples 0 5 Probability Density 10 Before After 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Estimate 95% confidence intervals Ezra Glenn Quantitative Reasoning and Statistical Methods Looking at the T-Distribution 8 T−Test for Difference Between Two Proportions 4 6 Observed Difference 2 ● 0 Probablity Density ● −0.2 −0.1 0.0 0.1 0.2 Difference in Proportions 95% confidence interval Ezra Glenn Quantitative Reasoning and Statistical Methods Controlling for Race Table: All Respondents Before After Immunization No Immunization 56 144 34 166 From 28% down to 17% Total 200 200 Table: With Health Insurance Table: Without Health Insurance Imm. No Total Imm. Before 48 10 58 After 6 1 7 From 83% up to 85% Imm. No Total Imm. Before 8 134 142 After 28 165 193 From 5.6% up to 17% You could also now test each of these for significance. . . Ezra Glenn Quantitative Reasoning and Statistical Methods The χ2 Test: Rolling a Die Table: Observed Counts (n = 60) count 1 14 2 8 Ezra Glenn 3 8 4 8 5 8 6 14 Quantitative Reasoning and Statistical Methods The χ2 Test: Rolling a Die Table: Observed Counts (n = 60) count 1 14 2 8 3 8 4 8 5 8 6 14 Table: Expected Counts (n = 60) count 1 10 2 10 Ezra Glenn 3 10 4 10 5 10 6 10 Quantitative Reasoning and Statistical Methods Computing χ2 Table: Observed-Expected Counts observed expected 1 14 10 2 8 10 3 8 10 4 8 10 5 8 10 6 14 10 total 60 60 (observed − expected)2 expected 42 22 22 22 22 42 + + + + + = 10 10 10 10 10 10 2 × 1.6 + 4 × .4 = χ2 = Σ 3.2 + 1.6 = 4.8 From table: χ2critical ≥ 11.07 (5 df, α = .05, two-tailed). 4.8 < 11.07, ∴ we cannot reject H0 Ezra Glenn Quantitative Reasoning and Statistical Methods Another χ2 Test Table: DUSP Applications, Observed (2008) non-minority applicants minority applicants total applicants CDD 98 16 114 Ezra Glenn IDG 70 6 76 EPP 40 5 45 HCED 43 23 66 Total 251 50 301 Quantitative Reasoning and Statistical Methods Another χ2 Test Table: DUSP Applications, Observed (2008) non-minority applicants minority applicants total applicants CDD 98 16 114 IDG 70 6 76 EPP 40 5 45 HCED 43 23 66 Total 251 50 301 Table: DUSP Applications, Expected (2008) Non-minority Minority Total CDD 95.06 18.94 114 IDG 63.38 12.62 76 Ezra Glenn EPP 37.52 7.48 45 HCED 55.04 10.96 66 Total 251 50 301 Quantitative Reasoning and Statistical Methods DUSP χ2 Calculation Table: DUSP (Observed−Expected)2 Expected Non-minority Minority CDD 0.09 0.46 IDG 0.69 3.48 Cell Contributions EPP 0.16 0.82 HCED 2.63 13.21 χ2 = 0.09 + 0.69 + 0.16 + 2.63 + 0.46 + 3.48 + 0.82 + 13.21 = 21.54 df = 3, significant at p < .001 Ezra Glenn Quantitative Reasoning and Statistical Methods The χ2 Distribution 0.15 0.10 0.05 chi−square critical, df=3 chi−square of 21.54 ● ● 0.00 Probability Density 0.20 0.25 Chi−Squared Distribution, df=3 0 5 10 15 20 25 30 Chi−Square Value 95% confidence Ezra Glenn Quantitative Reasoning and Statistical Methods DUSP Applications, Removing HCED Table: DUSP Applications, Observed (2008) non-minority applicants minority applicants total applicants CDD 98 16 114 IDG 70 6 76 EPP 40 5 45 Total 208 27 235 Table: DUSP Applications, Expected (2008) Non-minority Minority Total CDD 100.90 13.10 114 Ezra Glenn IDG 67.27 8.73 76 EPP 39.83 5.17 45 Total 208 27 235 Quantitative Reasoning and Statistical Methods Calculating χ2 Table: DUSP Applications, Expected (2008) Non-minority Minority Total Table: DUSP CDD 100.90 13.10 114 IDG 67.27 8.73 76 (Observed−Expected)2 Expected Non-minority Minority CDD 0.08 0.64 EPP 39.83 5.17 45 Total 208 27 235 Cell Contributions IDG 0.11 0.85 EPP 0.00 0.01 χ2 = 1.7 df = 2, not significant at p < .05 Ezra Glenn Quantitative Reasoning and Statistical Methods