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.
z_score <- 1.96
p <- .46
n <- 1012
moe <- z_score * sqrt((p*(1-p))/n)
moe## [1] 0.0307073
- 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 46% of Americans in this sample support the decision
- 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 - confidence intervals are used to estimate the population mean, and in this case the population is “all Americans”
- 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%.
FALSE - we are 95% confident that the true population mean is between 43% and 49%
- The margin of error at a 90% confidence level would be higher than 3%.
FALSE - z_score decreases with confidence interval, so the margin of error would be smaller
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.
- Is 48% a sample statistic or a population parameter? Explain.
ANSWER - this is a sample statistic. There are more than 1,259 US Residents in the United States
- 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.
z_score <- 1.96
p <- .48
n <- 1259
moe <- z_score * sqrt((p*(1-p))/n)
c_interval <- c(p-moe, p+moe)
c_interval## [1] 0.4524028 0.5075972
INTERPRET - we are 95% confident that the true proportion for US residents that agree with the ruling is between 45.2% and 50.7%
- 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.
p <- .48
n <- 1259n*p## [1] 604.32
n*(1-p)## [1] 654.68
ANSWER - assuming that the selection of US residents surveyed was random, then the statistic follows a normal distribution, since both np and n(1-p) are greater than 10.
- 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?
ANSWER - given the known margin of error, it is possible that a majority of Americans (>50%) believe marijuana should be legalized. However, based on the data this is far from gauranteed.
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?
p <- .48
z_score <- 1.96
se_num <- p*(1-p)
moe <- .02
n <- se_num / (moe / z_score)**2
n## [1] 2397.158
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.
p1 <- .08
p2 <- .088
n1 <- 11545
n2 <- 4691
se_num1 <- p1*(1-p1)
se_num_2 <- p2*(1-p2)
se <- sqrt(
se_num1/n1 + se_num_2/n2
)
upper_bound <- (p1-p2) + 1.96 * se
lower_bound <- (p1-p2) - 1.96 * se
c(lower_bound, upper_bound)## [1] -0.017498128 0.001498128
INTERPET - we are 95% confident that the true difference in sleep deprivation between california and oregon residents is between (-.017, .001)
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.
- Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others.
Null Hypothesis: Barking deer have no preference of habitats for foraging.
Alternate Hypothesis: Barking deer have prefer certain habitats over others for foraging.
- What type of test can we use to answer this research question?
ANSWER - Chi-Square Goodness of Fit
- Check if the assumptions and conditions required for this test are satisfied.
ANSWER - conditions are satisfied. Cases are independent of one another (One deer preferring one forage site does not influence another deer). Expected counts for each group are above five. Woods, which only capture 4.8% have an expected count of (.048 * 426) == 20.448 > 5
- 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.
n<-426
obser<-c(4,16,67,345)
expected<-c(n*0.048,n*0.147,n*0.396,n*0.409)
chisq<-sum((obser-expected)^2/expected)
df<-4-1
pchisq(chisq,df,lower.tail=FALSE)## [1] 1.144396e-59
The p-value of the test statistic is 0, so we reject the null hypothesis in exchange for the alternate. There does seem to be a statistically significant difference in foraging preferences amongst barking deer.
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.
- What type of test is appropriate for evaluating if there is an association between coffee intake and depression?
ANSWER: Chi-Squared Test for Two-Way Table is appropriate
- Write the hypotheses for the test you identified in part (a).
ANSWER - HO: There is no relationship between caffeinated coffee consumption and risk of depression in women. HA: There is a relationship between caffeinated coffee consumption and risk of depression in women
- Calculate the overall proportion of women who do and do not suffer from depression.
p_dep <- 2607/50739
p_dep## [1] 0.05138059
p_no_dep <- 48132/50739
p_no_dep## [1] 0.9486194
- 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\)).
exp <- 6617*p_dep
exp## [1] 339.9854
test_statistic <- (373-exp)^2/exp
test_statistic## [1] 3.205914
- The test statistic is \(\chi^2=20.93\). What is the p-value?
# degree of freedom= (number of rows minus 1) × (number of columns minus 1)
df <- (2-1)*(5-1)
df## [1] 4
p_val <- 1-pchisq(20.93,df)
p_val## [1] 0.0003269507
- What is the conclusion of the hypothesis test?
ANSWER - As the P-Value is less than 5% (0.05), we reject the Null Hypothesis and conclude that there is a relationship between the consumption of caffeine and depression in women.
- 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.
ANSWER - Yes, I agree. While it was confirmed that there is a relatinoship between the consumption of coffee and reduced depression in women, we do not yet know the full additional effects of coffee consumption. Other tests must be performed.