Problem 1

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.

  1. 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 95% confident that the true percentage of Americans who support the healthcare bill at the time of the poll was between 43 and 49 percent.

  2. 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. See wording in (a)

  3. 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’re 95% confident that the true population mean will be among the sample means.

  4. The margin of error at a 90% confidence level would be higher than 3%. False. The z_value decreases as the confidence level decreases, hence by the formula a smaller margin of error results. This also makes intuitive sense as I will be less confident in a smaller confidence interval range.


Problem 2

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.

  1. Is 48% a sample statistic or a population parameter? Explain. A sample statistic because as stated above “48% of the respondents”, meaning respondents to the survey.

  2. 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.975

zscore = qnorm(ci)
se = sqrt((p * (1-p))/N)

lower_ci = p - round(zscore * se,2)
upper_ci = p + round(zscore * se,2)

cat('95% confidence interval is',lower_ci, 'to', upper_ci)
## 95% confidence interval is 0.45 to 0.51
  1. 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. Yes. Because by the guidelines for a normal approximation if both proportions are greater than 10 and the data is independent. 0.48 * 1259 = 604 and 0.52 * 1259 = 654.

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


Problem 3

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?

#me = zscore * sqrt((p(1-p))/N)
me = 0.02

survey_size = (zscore**2) * (p * (1-p)/me**2)

cat('Survey size for margin of error of 2% is', survey_size)
## Survey size for margin of error of 2% is 2397.07

Problem 4

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.

pcal = 0.08
ncal = 11545
secal = (pcal * (1-pcal))/ncal

nor = 4691
por = 0.088
seor = (por * (1-por))/nor

ci = 0.975
zscore = qnorm(ci)

p = por - pcal
se = sqrt(secal + seor)

lower_ci = round(p - (zscore * se),3)
upper_ci = round(p + (zscore * se),3)

cat('95% confidence interval for', p, 'is', lower_ci, 'to', upper_ci)
## 95% confidence interval for 0.008 is -0.001 to 0.017

We are 95% confident that the difference in proportion of Californians and Oregonians who are sleep deprived at the time of this study is between 0% and 2%.


Problem 5

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.

  1. Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others. H0: Barking deer have no preference (all forage areas are equal) F1 = F2 = F3 = F4 H1: Barking deer prefer some forage areas over others (all forage areas are not equal)

  2. What type of test can we use to answer this research question? Since this is categorical data, the Chi-square test can be used.

  3. Check if the assumptions and conditions required for this test are satisfied:

  1. Assume the examination was done in a probabilitic manner and the areas are independent
  2. Minimum of 5 expected values for each category: this condition is met.
ewoods = 426 * 0.048
ewoods
## [1] 20.448
egrass = 426 * 0.147
egrass
## [1] 62.622
eforest = 426 * 0.396
eforest
## [1] 168.696
eother = 426 * 0.409
eother
## [1] 174.234
  1. 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. In the results below, the p-value = 0; so p < 0.05, so we can reject the null hypothesis. Rejecting the null hypothesis gives us reason to believe that the barking deer prefer some areas over others to forage in.
owoods = 4
ograss = 16
oforest = 61
oother = 345

#calculate the chi_square test statistic
M <- as.table(rbind(c(owoods, ograss, oforest, oother), c(ewoods, egrass, eforest, eother)))
M
##         A       B       C       D
## A   4.000  16.000  61.000 345.000
## B  20.448  62.622 168.696 174.234
chisq.test(M)
## 
##  Pearson's Chi-squared test
## 
## data:  M
## X-squared = 145.37, df = 3, p-value < 2.2e-16

Problem 6

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.

  1. What type of test is appropriate for evaluating if there is an association between coffee intake and depression? Chi-square test for two-way tables

  2. Write the hypotheses for the test you identified in part (a). H0: Coffee intake is associated with depression C = D H1: Coffee intake is not associated with depression C != D

  3. Calculate the overall proportion of women who do and do not suffer from depression.

depressed <- round(2607/50739,2)
depressed
## [1] 0.05
not_depressed <- round(48132/50739,2)
not_depressed
## [1] 0.95
  1. 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\)).
#row total * column total/table total
expected_count <- round((2607 * 6617)/50739)
cat('Expected count is', expected_count, '\n')
## Expected count is 340
observed_count <- 373
contribution <- round(((observed_count - expected_count)**2)/expected_count,2)
cat('Contribution is', contribution)
## Contribution is 3.2
  1. The test statistic is \(\chi^2=20.93\). What is the p-value?
pchisq(20.93, 4)
## [1] 0.999673
  1. What is the conclusion of the hypothesis test? The p-value of 0.99 is greater than 0.05, so we cannot reject the null hypothesis. The conclusion for this study is that coffee intake does have an impact on people who are clinically depressed.

  2. 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. Yes, I agree because not enough information is available regarding other confounding factors that could be influencing depression rates.