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. We know for 100% fact that this sample has a 46% approval rate. We know that the US population approval rate with 95% confidence intervals is between 43% and 49%.
(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. A confidence interval is constructed to estimate the population propotion which is 46% ± 3%, or 43% to 49%.
(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. This is also the definition of the confidence interval.
(d) The margin of error at a 90% confidence level would be higher than 3%.
FALSE. For the same standard error (SE), 90% confidence interval will have a lower margin of error since we are throwing a narrower net. The z-score for 90% confidence interval is only 1.645 against 1.96 for a 95% confidence interval.
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.
(a) Is 48% a sample statistic or a population parameter? Explain.
This is a sample statistic as this number, 48%, was derived from a sample of 1259 US residents, and NOT from the US population.
(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.
# 95% Confidence Interval translates into an alpha of 0.05. On the Z table, z = 1.96
z <- 1.96
p <- .48 # We are making the presumption that the global proportion is 0.48, from the sample statistic
n <- 1259 # The number in this sample
me <- z * sqrt(p*(1-p)/n)
paste("Margin of Error: ", round(me*100,2), "%")## [1] "Margin of Error: 2.76 %"
ci.l <- (p - me) * 100
ci.u <- (p + me) * 100
paste("The 95% confidence interval ranges from ", round(ci.l,2), "% to", round(ci.u,2), "%.")## [1] "The 95% confidence interval ranges from 45.24 % to 50.76 %."
# This means that we are 95% confident that the approval rate in the US population for the legal use of marijuana ranges from 45.24% to 50.76%.(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.
Given that there are over >1200 residents, this is a fairly large sample size. So yes, while having a normal model would allow us to perform a 95% confidence interval
(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?
This statement is False. News piece’s statement is not justified. Based on the confidence interval it is possible that the population probablity is over 50%, but it is also possible that it is noticeably lower than 50% (in fact most of confidence interval is below 50%).
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 ?
n = (0.48 * (1 - 0.48)) / (0.02 / (qnorm(0.975)))^2; ceiling(n) ## [1] 2398
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.
SE_cal = sqrt((0.08 * (1 - 0.08))/11545); #standard error for California
SE_org = sqrt((0.088 * (1 - 0.088))/4691); #standard error for Oregon
SE_org_cal = sqrt(SE_cal + SE_org);
LL = (0.088 - 0.08) - (qnorm(0.975)*SE_org_cal); # lower limit
UL = (0.088 - 0.08) + (qnorm(0.975)*SE_org_cal); # upper limit
results<- c("SE CALIFORNIA"=SE_cal, "SE OREGON"=SE_org, "SE Dif Proportion"=SE_org_cal, "Lower Limit"=LL, "Upper Limit"=UL)
results## SE CALIFORNIA SE OREGON SE Dif Proportion Lower Limit
## 0.002524887 0.004136243 0.081615745 -0.151963922
## Upper Limit
## 0.167963922
Null hypothesis(HO) is the proportion of California residents with insufficient sleep - the proportion of Oregon residents with insufficient sleep == 0.
The alternate hypothesis (HA) is: the proportion of California residents with insufficient sleep - the proportion of Oregon residents with insufficient sleep != 0.
Given that these two states’ confidence intervals overlap, it appears that we cannot reject the null hypothesis.
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.
(a) Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others.
The null hypothesis is: The barking deer does not prefer a certain habitat to forage. The alternative hypothesis is: The barking deer has certain habitats that it prefer to forage.
(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.
Looking at the data, we assume that the deer are not influencing each other and that they are independent. There appears to be 4 observed cases in the woods section, but if we calculate out the expected amount of cases for woods, .048 * 426 = 20.448, which is greater or equal to 5, thus satisfying part 2 of the conditions.
(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.
Z_woods_chisq = (0.9 - 4.8)^2/4.8
Z_grass_chisq = (3.8 - 14.7)^2/14.7
Z_forest_chisq = (14.3 - 39.6)^2/39.6
Z_oth_chisq = (81.0 - 40.9)^2/40.9
Z_all = Z_woods_chisq + Z_grass_chisq + Z_forest_chisq + Z_oth_chisq;
pvalues <- 1 - pchisq(Z_all, 3)
pvalues## [1] 2.14273e-14
Since the p-value for the chi square distribution is very small, we can strongly reject the null hypothesis that deers have no preference in the habitats were they forage.
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 for the two-way table can be used to evaluate if there is an association between coffee intake and depression.
(b) Write the hypotheses for the test you identified in part (a).
Null hypothesis: There is no relationship between coffee consumption and clinical depression. Alternative hypothesis: There is a relationship between coffee consumption and clinical depression.
(c) Calculate the overall proportion of women who do and do not suffer from depression.
Depressed <- 2607/50739
paste("The proportion of women who depressed: ", round(Depressed, 4))## [1] "The proportion of women who depressed: 0.0514"
Not.Depressed <- 48132/50739
paste("The proportion of women who do not depressed: ", round(Not.Depressed, 4))## [1] "The proportion of women who do not depressed: 0.9486"
(d) 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.
expected <- ceiling((2607 * 6617)/50739)
obs_cnt = 373
test_stat <- (obs_cnt - expected)^2/expectedExpected Value: 340
Calculation for the test statistic: 3.203
(e) The test statistic is 2 = 20.93. What is the p-value?
p <- pchisq(20.93,4,lower.tail = FALSE)
paste("p = ",round(p,5),sep="")## [1] "p = 0.00033"
(f) What is the conclusion of the hypothesis test?
We reject the null hypothesis and state that there is a statistical significant difference among different groups of coffee drinkers and clinical depression.
(g) 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.
I agree with author’s statement because this was an observational study. It cannot be used to demonstrate causation.This doesn’t necessarily show any relationship in terms of causality.