# 2by2 - 10.7 Condence interval for p1 p2 10.9 The odds ratio...

This preview shows pages 1–7. Sign up to view the full content.

10.7 Confidence interval for p 1 - p 2 10.9 The odds ratio and relative risk Case-control studies Sections 10.7 and 10.9 Timothy Hanson Department of Statistics, University of South Carolina Stat 205: Elementary Statistics for the Biological and Life Sciences 1 / 23

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10.7 Confidence interval for p 1 - p 2 10.9 The odds ratio and relative risk Case-control studies 10.7 confidence interval for p 1 - p 2 Recall, in population 1, we observe y 1 out of n 1 successes; in population 2 we observe y 2 out of n 2 successes, placed in a contingency table Group 1 2 Outcome Success y 1 y 2 Failure n 1 - y 1 n 2 - y 2 Total n 1 n 2 ˆ p 1 = y 1 / n 1 estimates p 1 & ˆ p 2 = y 2 / n 2 estimates p 2 . We want to compute a 95% confidence interval for p 1 - p 2 . 2 / 23
10.7 Confidence interval for p 1 - p 2 10.9 The odds ratio and relative risk Case-control studies Confidence interval for p 1 - p 2 This interval is slightly different than your book’s. The estimate of p 1 - p 2 is ˆ p 1 - ˆ p 2 . The standard error is SE ˆ p 1 - ˆ p 2 = s ˆ p 1 (1 - ˆ p 1 ) n 1 + ˆ p 2 (1 - ˆ p 2 ) n 2 . At 95% confidence interval for p 1 - p 2 is ˆ p 1 - ˆ p 2 ± 1 . 96 SE ˆ p 1 - ˆ p 2 . This is given in R by prop.test(success,total) where success is a list of the number of successes in the two groups and total is a list of the total number sampled in each group. 3 / 23

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10.7 Confidence interval for p 1 - p 2 10.9 The odds ratio and relative risk Case-control studies Example 10.7.1 Migraine headache data Migraine headache patients took part in a double-blind clinical trial to assess experimental surgery. 75 patients were assigned real surgery ( n 1 = 49) or sham surgery ( n 2 = 26) so total=c(49,26) . There were y 1 = 41 successes among real surgery and y 2 = 15 successes among sham so success=c(41,15) . ˆ p 1 = 41 / 49 = 83 . 7% & ˆ p 2 = 15 / 26 = 57 . 7% so ˆ p 1 - ˆ p 2 = 0 . 260. The standard error of the difference is SE ˆ p 1 - ˆ p 2 = r 0 . 837(0 . 163) 49 + 0 . 577(0 . 423) 26 = 0 . 110 . 95% confidence interval is 0 . 260 ± 1 . 96(0 . 110) = (0 . 0444 , 0 . 476). 4 / 23
10.7 Confidence interval for p 1 - p 2 10.9 The odds ratio and relative risk Case-control studies R code for migraine headache data Use correct=FALSE to get “old fashioned” confidence interval. > total=c(49,26) > success=c(41,15) > prop.test(success,total,correct=FALSE) 2-sample test for equality of proportions without continuity correction data: success out of total X-squared = 6.0619, df = 1, p-value = 0.01381 alternative hypothesis: two.sided 95 percent confidence interval: 0.04354173 0.47608150 sample estimates: prop 1 prop 2 0.8367347 0.5769231 We are 95% confident that real surgery reduces the probability of migraines by 4.3% to 47.6%. 5 / 23

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10.7 Confidence interval for p 1 - p 2 10.9 The odds ratio and relative risk Case-control studies R code for migraine headache data Allowing the continuity correction changes the confidence interval a bit. > prop.test(success,total) 2-sample test for equality of proportions with continuity correction data: success out of total X-squared = 4.7661, df = 1, p-value = 0.02902 alternative hypothesis: two.sided 95 percent confidence interval: 0.01410688 0.50551635 sample estimates: prop 1 prop 2 0.8367347 0.5769231 We are 95% confident that real surgery reduces the probability of migraines by 1.4% to 50.6%. This interval is larger than the one on the previous slide.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern