6.6, 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.
Answer: False. For this sample, we are certain that 46% of this sample supports 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.
Answer: True. This sample allows us to make an inference about the population.
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%.
Answer: False. Our confidence interval gives us a range of possible values for the true population proportions.
d, The margin of error at a 90% confidence level would be higher than 3%.
Answer: False. It would be lower, since we are lowering our confidence.
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.
a, Is 48% a sample statistic or a population parameter? Explain.
Answer: 48% is a sample statistic that estimates the population parameter since it was derived from the sample data.
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
nP = 0.48
sE = sqrt((nP*(1-nP))/n)
t = qt(0.975,n-1)
moe = t*sE
upperTail = nP + moe
lowerTail = nP - moe
c(lowerTail,upperTail)
## [1] 0.4523767 0.5076233
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.
Answer: t is probably true. We don’t know how many answers there were to the survey. Assuming it was only “yes” or “no”, then we can induce the other answer “it shouldnt be legal” should be around 52%. This would make a normal distribution
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?
Answer: There is more evidence pointing towards the opposite. However, it is possible considering the upper tail of our confidence interval 0.5076233 is above 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 ?
moe = 0.02
p = .48
z = qnorm(0.975)
sE = moe/z
n = (p*(1-p))/sE^2
round(n,0)+1
## [1] 2398
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.
H0 : No difference in sleep deprivation
Ha : Difference in sleep deprivation
oreP = .088
caliP = .08
nCali = 11545
nOre = 4691
sE = sqrt((caliP*(1-caliP)/nCali)+(oreP*(1-oreP)/nOre))
moe = qnorm(0.975)*sE
upperTail = -0.008 + moe
lowerTail = -0.008 - moe
c(lowerTail,upperTail)
## [1] -0.017497954 0.001497954
Answer: The confidence interval contains 0, so we fail to reject H0: No difference in sleep deprivation.
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
a, Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others.
Answer: H0: Land foraged by deer is proportionately distributed by land mass.
Ha: Land foraged by deer is not proportionately distributed by land mass.
b, What type of test can we use to answer this research question?
Answer: A chi-square test may be uesd to answer this question.
c, Check if the assumptions and conditions required for this test are satisfied
wP = round(426*.048,1)
gP = round(426*.147,1)
fP = round(426*.396,1)
oP = round(426*.409,1)
proportions = c(wP,gP,fP,oP)
proportions
## [1] 20.4 62.6 168.7 174.2
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
x = c(4,16,67,345)
k = 4
dF = 3
chi = 0
for(biome in 1:4){
chi = chi + ((x[biome]-proportions[biome])^2/proportions[biome])
}
p = pchisq(chi,dF,lower.tail = FALSE)
p
## [1] 1.124065e-59
Answer: In conclusion, We reject H0: Land foraged by deer is proportionately distributed by land mass.
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.
a, What type of test is appropriate for evaluating if there is an association between coffee intake and depression?
Answer: The Chi-squared test for two-way tables is appropriate for evaluating if there is an association between coffee intake and depression.
b, Write the hypotheses for the test you identified in part (a)
Answer: The hypotheses for the Chi-squared two-way table test are as follows.
H0: There is no association between caffeinated coffee consumption and depression.
HA: There is an association between caffeinated coffee consumption and depression.
c, Calculate the overall proportion of women who do and do not suffer from depression.
Proportion of women who suffer from depression is 2607/50739=0.0513806, and proportion of women who do not suffer from depression is 48132/50739=0.9486194.
wdep<- (2607/50739)
wodep<- (48132/50739)
wdep*100
## [1] 5.138059
wodep*100
## [1] 94.86194
d, dentify 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 <- wdep*6617
cellcont <- ((373 - exp)^2)/exp
cellcont
## [1] 3.205914
e, The test statistic is ??2=20.93. What is the p-value?
k <- 5
df <- (k-1)
p <- pchisq(20.93,df, lower.tail = FALSE)
p
## [1] 0.0003269507
f, What is the conclusion of the hypothesis test?
Answer: because p value is less than 0.05, we reject the null hypothesis
Answer: Agreed, there are many ordinal levels of clincal depression which we didn’t take into account, which may shed more light on caffeine vs depression.