Graded: 6.6, 6.12, 6.20, 6.28, 6.44, 6.48
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.
(a) 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 - There are 46% of people in this sample support the decision.
(b) 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. We know from the data given that there are between 43% and 49% of Americans support the decision of the U.S. Supreme Court on the 2010 healthcare law.
(c) 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. Since we are 95% confident that between 43% and 49% of Americans support the decision, 95% of the new sample will be within this interval.
(d) The margin of error at a 90% confidence level would be higher than 3%.
- False.The margin of error would be lower.
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.44
(a) Is 48% a sample statistic or a population parameter? Explain.
- 48% is a sample statistic since it is a parameter of the sample
(b) 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.
n <- 1259
p <- 0.48
ci <- 0.95
z <- 1.96
SE <- sqrt((p*(1-p)/n))
p - z * SE
## [1] 0.4524028
p + z* SE
## [1] 0.5075972
(c) 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.
- True. The observations are independent. The sample size are over 10 success and 10 failures within the observations. Since both conditions are met, we conclude that normality is true for this sample.
(d) 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?
- No, the statement is not justified.The 95% confidence interval falls between 45.24% and 50.76%, therefore we can not conclude that majority of Americans think marijuana should be legalized.
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 insucient 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.
p1<-0.08
p2<-0.088
p<-p1-p2
p
## [1] -0.008
NC <- 11545
NO <- 4691
SE <- sqrt(p1 * (1-p1)/NC + p2 * (1-p2)/NO)
SE
## [1] 0.004845984
upper<-p+1.96*SE
lower<-p-1.96*SE
round(c(lower,upper),4)
## [1] -0.0175 0.0015
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.
(a) Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others.
H0: Barking deer don’t perfer different habitats over others
Ha: Barking deer perfer different habitats over others
(b) What type of test can we use to answer this research question?
We can use a Chi square test.
(c) Check if the assumptions and conditions required for this test are satisfied.
Independence: we assume data is independent. Sample size and distribution: 0.048 * 426= 20.448, which is > 5, condition is satisfied
(d) 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.
deer <- c(4, 16, 61, 345)
percent <- c(0.048, 0.147, 0.396, 0.409)
chisq.test(x = deer, p = percent)
##
## Chi-squared test for given probabilities
##
## data: deer
## X-squared = 284.06, df = 3, p-value < 2.2e-16
p- value is < 0.05, we reject the null hypothesis.
6.48 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.
(a) What type of test is appropriate for evaluating if there is an association between coffee intake and depression?
Chi-square test.
(b) Write the hypotheses for the test you identifieed in parta
HO: There is no relationship between caffeinated coffee consumption and risk of depression in women.
HA: Caffeinated coffee consumption and risk of depression in women are related.
(c) Calculate the overall proportion of women who do and do not suffer from depression
#depression
dep <- 2607/50739
dep
## [1] 0.05138059
#no depression
no_dep <- 48132/50739
no_dep
## [1] 0.9486194
paste("The overall proportion of women who suffer from depression is", round(dep,4))
## [1] "The overall proportion of women who suffer from depression is 0.0514"
paste("The overall proportion of women who suffer from depression is", round(no_dep,4))
## [1] "The overall proportion of women who suffer from depression is 0.9486"
- 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.
twosixcups<-dep*6617
twosixcups
## [1] 339.9854
TestStat<-(373-twosixcups)^2/twosixcups
TestStat
## [1] 3.205914
The contribution to the test statistic for the highlighted cell is 3.2
- The test statistic is 2 = 20.93. What is the p-value?
pvalue <- pchisq(20.93, 4)
pvalue <- 1-pvalue
pvalue
## [1] 0.0003269507
P-value is < 0.05, so we reject the null hypothesis and conclude that coffee does affect 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.
Yes. I agree with the statement. Based on the test e can conclude there is a relationship between coffe consumption and depression. However we don’t know exactly what kind of relationship is it and if other factors were supposed to be taken into the consideration.