6.6 2010 Healthcare Law. 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.39 
  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.

“False”. We are 100% 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.

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

“True”, the confident interval is 43% to 49%.

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

“True”, this is the definition of confidence interval

  1. The margin of error at a 90% confidence level would be higher than 3%.

“False”, Margin of error = Z * Standard of Error. If this is a 90% confidence interval, the Z would correspond to: 1.65. Therefore, the margin of error would be smaller (less than 3%).

6.28 Sleep deprivation, CA vs. OR, Part I. According to a report on sleep deprivation by the Centers for Disease Control and Prevention, the proportion of California residents who reported insu"cient 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 di???erence between the proportions of Californians and Oregonians who are sleep deprived and interpret it in context of the data.53
p_ca <- 8/100
p_or <- 8.8/100
n_ca <- 11545
n_or <- 4691

se <- sqrt(p_ca * (1 - p_ca) / n_ca + p_or * (1 - p_or) / n_or)
point_est <- p_ca - p_or
lo <- point_est - 1.96 * se
hi <- point_est + 1.96 * se
c(lo, hi)
## [1] -0.017498128  0.001498128

ANSWER: the 95% Confidence interval for the difference (California-Oregan) is between -0.017 to 0.0015. We are 95% confident to conclude that the diffrence in sleep deprivation proportion between California and Oregon residents is within the said level.

6.44 Barking deer. 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.62 Woods Cultivated grassplot Deciduous forests Other Total 4 16 67 345 426
  1. Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others.

\(H_0\): - There is no difference in habitat on foraging for barking dear.
\(H_A\): - Barking Deer do prefer one or more habitats over other habitats for foraging.

  1. What type of test can we use to answer this research question?

chi square test will be a reasonable test for this hypothesis.

  1. Check if the assumptions and conditions required for this test are satisfied.
# formula: expected <- 426* proportion_observed

woods <- round(426 * .048)
woods
## [1] 20
cultivated_grass <- round(426 * .147)
cultivated_grass
## [1] 63
decidous_forest <- round(426 * .396)
decidous_forest
## [1] 169
other <- round(426 * (1-(.048 + .147 + .396)))
other
## [1] 174
total <- round (426*1)
total
## [1] 426

The conditions are satisfied. We can assume that each case is independent of each other. Also from above, we can see that all expected counts for the categories are all more than 5.

  1. Do these data provide convincing evidence that barking deer prefer to forage in certain habitats over others? Conduct an appropriate hypothesis test to answer this research question.

\(H0\): There is no difference in any of the habitat at all for barking deer’s preference. \(HA\): Barking deer prefer some habitat over others.

chi <- (4-woods)^2/woods + (16-cultivated_grass)^2/cultivated_grass + (61-decidous_forest)^2/decidous_forest + (345-other)^2/other
chi
## [1] 284.933
options(scipen = 999)
pchisq(chi, 3, lower.tail = FALSE)
## [1] 0.0000000000000000000000000000000000000000000000000000000000001813092

Because our p value is much smaller than 0.05 (as a matter of fact, close to 0, or 99.99% more likely), we reject the null hypotheis. We conclude that barking deer do prefer some habitats more so than others (although this test does not tell us which of these habitats is preferred).