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.

  1. We are 95% confident that between 43% and 49% of Americans in this sample support the decision of the U.S. Supreme Court on the 2010 healthcare law.
  2. We are 95% confident that between 43% and 49% of Americans support the decision of the U.S. Supreme Court on the 2010 healthcare law.
  3. If we considered many random samples of 1,012 Americans, and we calculated the sample proportions of those who support the decision of the U.S. Supreme Court, 95% of those sample proportions will be between 43% and 49%.
  4. The margin of error at a 90% confidence level would be higher than 3%.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  1. Is 48% a sample statistic or a population parameter? Explain.
  2. Construct a 95% confidence interval for the proportion of US residents who think marijuana should be made legal, and interpret it in the context of the data.
  3. A critic points out that this 95% confidence interval is only accurate if the statistic follows a normal distribution, or if the normal model is a good approximation. Is this true for these data? Explain.
  4. A news piece on this survey’s findings states, “Majority of Americans think marijuana should be legalized.” Based on your confidence interval, is this news piece’s statement justified?

  1. 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.

  1. The statistic does follow a normal distribution, because the conditions for inference are satisfied.
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.

  1. Based on the confidence interval computed here, the claim that a majority of Americans favor legalization is not justified. The confidence interval shows this because it contains values less than 0.50. While we can be quite sure that the population proportion is near 0.50, we cannot make a claim about whether the true value is greater or less than 0.50.

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.

  1. Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others.
  2. What type of test can we use to answer this research question?
  3. Check if the assumptions and conditions required for this test are satisfied.
  4. Do these data provide convincing evidence that barking deer pre- fer to forage in certain habitats over others? Conduct an appro- priate hypothesis test to answer this research question.

  1. \(H_{0}\): The areas where deer forage are independent of the categorizations of the areas. That is, deer do not exhibit a preference for one type of foraging area over another.

\(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.

  1. We can use a chi-square test for goodness of fit to test these hypotheses.

  2. 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.

  3. 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.

  1. What type of test is appropriate for evaluating if there is an association between coffee intake and depression?
  2. Write the hypotheses for the test you identified in part (a).
  3. Calculate the overall proportion of women who do and do not suffer from depression.
  4. Identify the expected count for the highlighted cell, and calculate the contribution of this cell to the test statistic, i.e. (\(Observed - Expected)^2 / Expected\)).
  5. The test statistic is \(\chi^2=20.93\). What is the p-value?
  6. What is the conclusion of the hypothesis test?
  7. One of the authors of this study was quoted on the NYTimes as saying it was “too early to recommend that women load up on extra coffee” based on just this study. Do you agree with this statement? Explain your reasoning.

  1. The appropriate test is a chi-square test for independence in a two-way table.

  2. \(H_{0}\): Caffeinated coffee consumption is independent of clinical depression. \(H_{A}\): Caffeinated coffee consumption is not independent of clinical depression.

  3. 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
  1. The expected count for the highlighted cell is 340. Its contribution to the test statistic is 3.21.
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
  1. For this test, df = 4. \(p = 0.0001\).
coffee_p <- 1 - pchisq(20.93, 3)
coffee_p
## [1] 0.0001088595
  1. The conclusion is that we reject the null hypothesis, and conclude that caffeinated coffee consumption is not independent of clinical depression in women.

  2. 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.