Inference for p1 − p2 M243 April 12 Does cell phone use while driving cause accidents? 1. The two-by-two table. 2. the 2 × 2 table. Error Distracted Not Distracted No Error 17 22 7 2 3. Same three data collection paradigms as in the case of two means. Parameters A B Success p1 p2 Data Failure 1 − p1 1 − p2 Success x1 x2 A B Failure n1 − x1 n2 − x2 4. Confidence interval for p1 − p2 : (a) Standard interval (R command prop.test) x1 p̂1 = n1 x2 p̂2 = n2 s (p̂1 − p̂2 ) ± z ∗ p̂1 (1 − p̂1 ) p̂2 (1 − p̂2 ) + n1 n2 (b) Plus-4 interval (add one success and one failure to each group) x1 + 1 p̃1 = n1 + 2 Bald Hairy HeartDisease 127 548 x2 + 1 p̃2 = n2 + 2 s (p̃1 − p̃2 ) ± z Not ∗ p̃1 (1 − p̃1 ) p̃2 (1 − p̃2 ) + n1 + 2 n2 + 2 > prop.test( c(127,548), c(127+1124,548+7611) ,correct=F) 1224 7611 2-sample test for equality of proportions without continuity correction data: c(127, 548) out of c(127 + 1124, 548 + 7611) X-squared = 19.2249, df = 1, p-value = 1.162e-05 alternative hypothesis: two.sided 95 percent confidence interval: 0.01675861 0.05194877 sample estimates: prop 1 prop 2 0.1015188 0.0671651 5. Odds ratios and relative risk. (a) Odds for each population (rows) pi 1 − pi p1 /(1 − p1 ) (1 means no difference) p2 /(1 − p2 ) p1 (c) Relative risk: (1 means no difference) p2 (b) Odds ratio: M243 Inference for p1 − p2 April 12 Homework 1. Read Chapter 22, pages 526–530. 2. For practice do problem 22.3. 3. To turn in (Due Tuesday, April 20) do Problem 22.6. Test Friday. Take-home portion handed out Tuesday and due Friday. In-class portion covers Chaters 18,19,20,21,23,24. More details Tuesday.
© Copyright 2026 Paperzz