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.
False. The margin of error is for the inference on the population. We know that 46% of the people in the survey support the decision.
True. This is the how to margin of error is meant to be used.
False. 95% of the sample proportions would capture the true percentage of Americans that support the decision.
False. As confidence level decreases, so does the margin of error.
6.12 Legalization of marijuana, Part I. 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.
Yes, since it is based off of the sample population.
se <- (((.48)*(.52))/(1259))^(.5)
lower <- .48 - 1.96*se
upper <- .48 + 1.96*se
c(lower, upper)
## [1] 0.4524028 0.5075972
We are 95% confident that the true proportion of US residents who think marijuana should be made legal is between 45.24% and 50.76%.
Since the sample is so large, we can use the normal model. We do have to assume, however, that the sample was randomly selected. If not, then this confidence interval isn’t valid.
No, taking the upper bound of the confidence level isn’t advised and isn’t wise.
6.20 Legalize Marijuana, Part II. As discussed in Exercise 6.12, 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?
Since the margin of error (ME) for a 95% CI is calculated as
ME=1.96((pq/n)^.5), we solve for n and let ME=.02.
n=(pq)/((ME/1.96)^2)=(.48*52)/((.02/1.96)^2)=239715.84
So if we wanted to limit the margin of error of a 95% confidence interval to 2%, we would need to survey 239716 Americans.
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 insufficient 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.
The difference of the proportions (p) is .088-.8
pc <- .08
nc <- 11545
po <- .088
no <- 4691
p <- po-pc
se <- ((pc*(1-pc) / nc) + (po*(1-po) / no))^(.5)
lower <- p - 1.96*se
upper <- p + 1.96*se
c(lower, upper)
## [1] -0.001498128 0.017498128
We are 95% confident that the true difference between the proportions of Californians and Oregonians who are sleep deprived is between 0% and 1.75%.
6.44 Barking deer. Micro-habitat 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.
deer <- matrix(c(4, 16, 67, 345, 426), 1)
colnames(deer) <- c("Woods", "Cultivated Grassplot", "Deciduous Forest", "Other", "Total")
Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others. Ho: There is no difference of preference for barking deer prefer to forage in certain habitats over others. H1: There is a difference of preference for barking deer prefer to forage in certain habitats over others.
What type of test can we use to answer this research question?
A goodness of fit test using χ2.
Check if the assumptions and conditions required for this test are satisfied. From the textbook, on page 293: Independence: It isn’t stated, and I don’t know the habits of barking deer (whether or not they are social or territorial) but assume each case is independent of each other, for the sake of the exercise. Sample Size/Distribution: Each particular scenario must have for than 5 cases. This isn’t true for the Woods case.
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.
chisq.test(x=c(4, 16, 67, 345), p=c(.048, .147, .396, .409))
##
## Chi-squared test for given probabilities
##
## data: c(4, 16, 67, 345)
## X-squared = 272.69, df = 3, p-value < 2.2e-16
Since the p-value is below .05, we reject the null hypothesis. There is sufficient evidence to suggest a difference of preference for barking deer prefer to forage in certain habitats over others.
6.48 Coffee and Depression. 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.
dcof <- matrix(c(670, 11545, 373, 6244, 905, 16329, 564, 11726, 95, 2288), nrow = 2, )
colnames(dcof) = c("< 1 cup/week", "2-6 cups/week", "1 cup/day", "2-3 cups/day", ">4 cups/day")
row.names(dcof) = c("depression", "no depression")
dcof
## < 1 cup/week 2-6 cups/week 1 cup/day 2-3 cups/day
## depression 670 373 905 564
## no depression 11545 6244 16329 11726
## >4 cups/day
## depression 95
## no depression 2288
A goodness of fit test using χ2.
Write the hypotheses for the test you identified in part (a). Ho: There is no difference in amounts of coffee drank between women with and without depression. H1: There is a difference in amounts of coffee drank between women with and without depression.
Calculate the overall proportion of women who do and do not suffer from depression.
depressed_women <- (2607)/50739
nondepressed_women <- (48132)/50739
obs <- 373/6617
exp <- 6617*depressed_women
((obs-exp)^2)/exp
## [1] 339.8727
df <- (2-1)*(5-1)
p <- 1-pchisq(20.93, df)
p
## [1] 0.0003269507
What is the conclusion of the hypothesis test? Since p < .05, we reject the null hypothesis. There is enough evidence to suggest a difference in amounts of coffee drank between women with and without depression.
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.
Yes, there could be a confounding factor related to drinking more coffee (more active lifestyle, and so on), and there could be adverse side effects to drinking more coffee.