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) (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 are 100% certain of the results released by the Gallup poll. No need for a confidence interval.

(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 : This is almost exlpicitly stated in the context.

(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%.

FALSE : Close but false, we don’t know what the true proportion is, which the true interval is dependent on.

(d) The margin of error at a 90% confidence level would be higher than 3%.

FALSE : Margin of error would increase as the confidence level goes down. As we are less confidence about our answer, we allow for more error.

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.53

nH : No difference in sleep deprivation aH : 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

The confidence interval contains 0, we fail to reject nH. (null hypothesis)…Sleep deprivation is not significantly different.

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.62

(a) Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others.

null Hypothesis : Land foraged by deer is proportionately distributed by land mass.
alternative Hypothesis : Land foraged by deer is not proportionately distributed by land mass.

(b) What type of test can we use to answer this research question?

A chi-square test may be uesd to answer this question.

(c) Check if the assumptions and conditions required for this test are satis???ed.

SRS compliant, check.
Variables are categorical, check.
Not a contigency table (I’m looking at your woods biome), check.
Assumptions are met, if we do a little math.

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

We reject the null hypothesis in favor of the alternative hypothesis. Barking deer do not bark in a proportion to land mass between biomes.

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.63

(a) What type of test is appropriate for evaluating if there is an association between coffee intake and depression?

We would use a chi-square test to evaluate if there is independence between depression and coffee intake. ####(b) Write the hypotheses for the test you identi???ed in part (a).
null Hypothesis : Coffee intake and depression are independent alternative Hypothesis : Coffe intake and depression are dependent. ####(c) Calculate the overall proportion of women who do and do not suffer from depression.

propOfWomenWithDep = 2607/50739
propOfWomenWithoutDep = 1 - propOfWomenWithDep

Proportion of women with depression is 0.0513806
Propottion of women without depression is 0.9486194

(d) Identify the expected count for the highlighted cell, and calculate the contribution of this cell to the test statistic, i.e. (ObservedExpected)2/Expected.

groups = 5
dF = 4
expected = propOfWomenWithDep*6617
cellFactor = (373 - expected)^2/expected
cellFactor
## [1] 3.205914

(e) The test statistic is X2 = 20.93. What is the p-value

pValue = pchisq(20.93,dF,lower.tail = FALSE)
pValue
## [1] 0.0003269507

(f) What is the conclusion of the hypothesis test?

We reject the null hypothesis in favor of teh alternative hypothesis. Coffee intake and depression are dependent.

(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.64 Do you agree with this statement? Explain your reasoning.

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.