Inference on Population Proportions See chapter 18 of text for details. Obstructive sleep apnea is a sleep disorder that causes a person to stop breathing momentarily and then awaken briefly. These sleep interruptions, which may occur hundreds of times in a night, can drastically reduce the quality of rest and cause fatigue during waking hours. Researchers at Stanford University studied 159 commercial truck drivers and found that 124 of them suffered from obstructive sleep apnea (Chest, May 1995). Do the data suggest that more than 70% of truck drivers suffer from obstructive sleep apnea? We have the choice of two functions in R for inference on proportions: binom.test and prop.test. binom.test is an exact procedure, but it only works on inference of a single proportion. prop.test is an approximate method, but it can compare several proportions. >binom.test(124,159,p=0.7,alternative="greater") Exact binomial test data: 124 out of 159 number of successes = 124, n = 159, p-value = 0.01543 alternative hypothesis: true probability of success is greater than 0.7 95 percent confidence interval: 0.718954 1.000000 sample estimates: probability of success 0.7798742 ################################################ > prop.test(124,159,p=.7,alternative="greater", correct=F) 1-sample proportions test without continuity correction data: 124 out of 159, null probability 0.7 X-squared = 4.8305, df = 1, p-value = 0.01398 alternative hypothesis: true p is greater than 0.7 95 percent confidence interval: 0.7213938 1.0000000 sample estimates: p 0.7798742 > sqrt(4.8305) = 2.19784, which equals the z test statistic. Are the p-values of the 2 methods exactly the same? Scope of inference? Comparing Two Population Proportions: The Salk polio vaccine trials of 1954 included a double-blind experiment in which elementary school children of consenting parents were assigned at random to injection with the Salk vaccine or with a placebo. Both treatment and control groups were set at 200,000 because the target disease, infantile paralysis, was uncommon. The data are below: Paralysis Victim Yes No Total ----------------------------- Placebo 142 199,858 200,000 Vaccine 56 199,944 200,000 Is the proportion of children contracting paralysis the same for the placebo and vaccine groups? For the test: x1 = 142, x2 = 56, n1 = n2 = 200,000 > prop.test(c(142, 56), c(200000, 200000)) 2-sample test for equality of proportions with continuity correction data: c(142, 56) out of c(2e+05, 2e+05) X-squared = 36.508, df = 1, p-value = 1.520e-09 alternative hypothesis: two.sided 95 percent confidence interval: 0.0002871449 0.0005728551 sample estimates: prop 1 prop 2 0.00071 0.00028 > sqrt(36.508) [1] 6.042185. This is the z test-statistic.