2010 Healthcare Law. (6.48, p. 248) On June 28, 2012 the U.S. Supreme Court upheld the much debated 2010 healthcare law, declaring it constitutional. A Gallup poll released the day after this decision indicates that 46% of 1,012 Americans agree with this decision. At a 95% confidence level, this sample has a 3% margin of error. Based on this information, determine if the following statements are true or false, and explain your reasoning.
False. We are completely confident that between 43% and 49% of Americans in this sample support the decision. That’s because we polled each one of them to find out that, among these 1,012 Americans, 46% of them favor the decision.
True. Assuming that the 1,012 people in the sample were randomly selected from all Americans, our confidence interval tells us that the true population proportion is between 43% and 49%, with 95% confidence.
True, if the true population proportion is equal to our sample proportion of 46%. As the value of \(|p - \hat{p}|\) increases, the fraction of other random samples within 3% of \(\hat{p}\) decreases.
False. The width of a confidence interval decreases as the confidence level decreases. The margin of error at a 90% confidence level would be less than 3%.
Legalization of marijuana, Part I. (6.10, p. 216) The 2010 General Social Survey asked 1,259 US residents: “Do you think the use of marijuana should be made legal, or not” 48% of the respondents said it should be made legal.
48% is a sample statistic, because it describes a proportion among only 1,259 Americans, and not the entire American population.
legal_I_se <- sqrt((0.48) * (1 - 0.48) / 1259)
legal_I_ub <- 0.48 + 1.96 * legal_I_se
legal_I_lb <- 0.48 - 1.96 * legal_I_se
The 95% confidence interval is (0.452, 0.508). With 95% confidence, we claim that the population proportion of those who favor legalization of marijuana lies between 45.2% and 50.8%. Around half of Americans favor legalizing marijuana.
legal_I_np <- 1259 * 0.48
legal_I_nq <- 1259 * 0.52
Both \(np\) and \(nq\) are greater than 10, so the success-failure condition is satisfied. The sample size is large. And there is no reason to believe that responses are not independent of each other.
Legalize Marijuana, Part II. (6.16, p. 216) As discussed in Exercise above, the 2010 General Social Survey reported a sample where about 48% of US residents thought marijuana should be made legal. If we wanted to limit the margin of error of a 95% confidence interval to 2%, about how many Americans would we need to survey?
The margin of error for a 95% confidence interval for population proportion, when \(\hat{p} = 0.48\), is \(m = 1.96 \times \sqrt{(\hat{p}(1 - \hat{p})/n)}\). Solving for \(n\) when \(m = 0.02\):
n <- 1.96^2*(0.48*0.52)/0.02^2
n
## [1] 2397.158
We would need to survey about 2398 Americans.
Sleep deprivation, CA vs. OR, Part I. (6.22, p. 226) According to a report on sleep deprivation by the Centers for Disease Control and Prevention, the proportion of California residents who reported insuffient rest or sleep during each of the preceding 30 days is 8.0%, while this proportion is 8.8% for Oregon residents. These data are based on simple random samples of 11,545 California and 4,691 Oregon residents. Calculate a 95% confidence interval for the difference between the proportions of Californians and Oregonians who are sleep deprived and interpret it in context of the data.
Check the conditions for inference for both groups: Each sample consists of independent responses, since the respondents were chosen randomly. Both samples are independent of each other, since the sleep quality of an Oregon resident does not affect and is not affected by the sleep quality of a California resident.
sleep_CA_np <- 11545 * 0.080
sleep_CA_nq <- 11545 * (1 - 0.08)
sleep_OR_np <- 4691 * 0.088
sleep_OR_nq <- 4691 * (1 - 0.088)
The success-failure condition is met for both samples. (Values for \(np\) are calculated, and values for \(nq\) would be greater.)
The samples satisfy conditions for inference.
sleep_I_se <- sqrt((0.08 * (1 - 0.08) / 11545) + (0.088 * (1 - 0.088) / 4691))
sleep_I_ub <- (0.080 - 0.088) + 1.96 * sleep_I_se
sleep_I_lb <- (0.080 - 0.088) - 1.96 * sleep_I_se
sleep_I_lb
## [1] -0.01749813
sleep_I_ub
## [1] 0.001498128
The 95% confidence interval for \(p_{CA} - p_{OR}\) is \((-0.017, 0.001)\). Since the confidence interval contains 0, there is insufficient evidence to claim that there is a difference between the proportions of Californians and Oregonians who are sleep deprived.
Barking deer. (6.34, p. 239) Microhabitat factors associated with forage and bed sites of barking deer in Hainan Island, China were examined from 2001 to 2002. In this region woods make up 4.8% of the land, cultivated grass plot makes up 14.7% and deciduous forests makes up 39.6%. Of the 426 sites where the deer forage, 4 were categorized as woods, 16 as cultivated grassplot, and 61 as deciduous forests. The table below summarizes these data.
\(H_{A}\): Deer do exhibit a preference for some types of foraging areas over others. That is, the areas where deer forage are not independent of the categorizations of those areas.
We can use a chi-square test for goodness of fit to test these hypotheses.
The independence condition is satisfied, because the area where one deer chooses to forage does not affect other deer’s foraging choices. The sample size condition is not completely satisfied, because one of the counts, for Woods, is less than 5.
Even though the conditions for the test were not completely satisfied, the available data provide strong evidence that the areas where deer forage are not independent of the categorization of those areas.
To conduct the test, I created a dataframe with columns for counts, the fraction of sites comprising a particular categorization, and expected counts. In the final column I computed \(Z_{i}\), the individual test statistics for each microhabitat category. I then added all these \(Z_{i}\) to find the test statistic, XiSq.
With df = 3, the \(p\)-value of this test statistic is almost 0. We reject the null hypothesis.
deer_mat <- data.frame(cts = c(4,16,61,345),frcs = c(0.048,0.147,0.396,0.409))
deer_mat <- deer_mat %>%
mutate(exp = sum(cts) * frcs) %>%
mutate(Zi = ((cts - exp)/sqrt(exp))^2)
XiSq <- sum(deer_mat$Zi)
deer_p <- 1 - pchisq(XiSq, 3)
deer_p
## [1] 0
Coffee and Depression. (6.50, p. 248) Researchers conducted a study investigating the relationship between caffeinated coffee consumption and risk of depression in women. They collected data on 50,739 women free of depression symptoms at the start of the study in the year 1996, and these women were followed through 2006. The researchers used questionnaires to collect data on caffeinated coffee consumption, asked each individual about physician-diagnosed depression, and also asked about the use of antidepressants. The table below shows the distribution of incidences of depression by amount of caffeinated coffee consumption.
The appropriate test is a chi-square test for independence in a two-way table.
\(H_{0}\): Caffeinated coffee consumption is independent of clinical depression. \(H_{A}\): Caffeinated coffee consumption is not independent of clinical depression.
The overall proportion of women who suffer from depression is 0.051.
coffee_dep <- 2607 / 50739
coffee_dep
## [1] 0.05138059
The overall proportion of women who do not suffer from depression is 0.949.
coffee_not_dep <- 1 - coffee_dep
coffee_exp_ct <- (2607 * 6617) / 50739
coffee_cont <- (373 - coffee_exp_ct)^2 / coffee_exp_ct
coffee_exp_ct
## [1] 339.9854
coffee_cont
## [1] 3.205914
coffee_p <- 1 - pchisq(20.93, 3)
coffee_p
## [1] 0.0001088595
The conclusion is that we reject the null hypothesis, and conclude that caffeinated coffee consumption is not independent of clinical depression in women.
Based on just this study, we cannot conclude that increased coffee consumption reduces clinical depression. The hypothesis test shows only that there is an association and not the direction of that association. Further, the design of this study prevents us from drawing causal conclusions because subjects were not randomly assigned to treatment or control groups.