6.6

  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, 100% confident regarding the sample itself.

  1. 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, 46% +- 3%/definition of 95% CI.

  1. 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, definition of 95% CI.

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

FALSE, ME inversely proportional to Z score

6.12

  1. Is 48% a sample statistic or a population parameter? Explain.

Sample statistic, describes sample attribute not attribute of entire population.

  1. 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 = 1,259
# p = .48

48 - 1.96*sqrt(0.48*(1-0.48)/1259)
## [1] 47.9724
48 + 1.96*sqrt(0.48*(1-0.48)/1259)
## [1] 48.0276

95% CI: (47.9724, 48.0276)

  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.

Sample is less than 10% of population, so independent observations reasonable.
Greater than 10 successes and failures, so can assume sample is large enough to avoid being impacted severely by skew.

  1. 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?

Assuming the other percentage is “don’t think marijuana should be legal”, this study actually shows a majority do not hold the opinion “marijuana should be legalized”.

6.20

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 ?

ME = 0.02 = 1.96 * SE = 1.96 * sqrt(p(1-p)/n) solve for n

0.48*(1 - .48)/((0.02/1.96)^2)
## [1] 2397.158

Should survey 2398 Americans.

6.28

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.

11,545 California - 8.0%
4,691 Oregon residents - 8.8%

# Difference:
0.008
## [1] 0.008
# ME:
0.008 - 1.96*sqrt(0.08*(1-0.08)/11545 + 0.088*(1-0.088)/4691)
## [1] -0.001498128
0.008 + 1.96*sqrt(0.08*(1-0.08)/11545 + 0.088*(1-0.088)/4691)
## [1] 0.01749813

(-0.0015, 0.018)

No significant difference.

6.44

4.8*426/100
## [1] 20.448
14.7*426/100
## [1] 62.622
39.6*426/100
## [1] 168.696
40.9*426/100
## [1] 174.234

426 sites where the deer forage,
4 were categorized as woods,
16 as cultivated grassplot,
61 as deciduous forests
345 as other

  1. Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others.
    H0:
    Deer foraged:
    Woods 4.8%426 = 20.4
    Cultivated grass 14.7%
    426 = 62.6
    Deciduous forests 39.6%426 = 168.6
    Other 40.9%
    426 = 174.234

Ha:
Deer foraged some significantly different proportion of these

  1. What type of test can we use to answer this research question?

Chi-square test

  1. Check if the assumptions and conditions required for this test are satisfied.
    Independence: Each case independent of others (might be violated if deer exhibit pack behavior?).
    Sample size/distribution: Each case does have at least 5 expected cases. Well, see they actually foraged only 4 woods areas, but I think the expected is based on the null hypothesis?

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

(4 - 20.4)^2/4 + (16 - 62.6)^2/62.6 + (61 - 168.6)^2/168.6 + (174.234 - 345)^2/174.234
## [1] 337.9665

probability <<< 0.001. Evidence that they may prefer specific areas instead of just choosing randomly.

6.48

  1. What type of test is appropriate for evaluating if there is an association between coffee intake and depression?

Chi-square tests on a two-way table.

  1. Write the hypotheses for the test you identified in part (a).

H0: Depression in women does not differ by amount of coffee drank.
HA: Depression in women does differ by amount of coffee drank

Is drinking some greater amount of coffee independent of drinking a lesser amount?

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

2607/50739 (5.1%) suffer from clinical depression

48132/50739 (95%) do not suffer from clinical depression

2607/50739
## [1] 0.05138059
48132/50739
## [1] 0.9486194
  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.
# Depression expected values
2607*12215/50739
## [1] 627.614
2607*6617/50739
## [1] 339.9854
2607*17234/50739
## [1] 885.4932
2607*12290/50739
## [1] 631.4675
2607*2383/50739
## [1] 122.44
# No depression expected values
48132*12215/50739
## [1] 11587.39
48132*6617/50739
## [1] 6277.015
48132*17234/50739
## [1] 16348.51
48132*12290/50739
## [1] 11658.53
48132*2383/50739
## [1] 2260.56

Depression expected values:
627.614
339.9854
885.4932
631.4675
122.44

No depression expected values:

11587.39
6277.015
16348.51
11658.53
2260.56

((607 - 627.614)^2/627.614) +
((373 - 339.9854)^2/339.9854) +
((905 - 885.4932)^2/885.4932) +
((564 - 631.4675)^2/631.4675) +
((95 - 122.44)^2/122.44) +
  
((11545 - 11587.39)^2/11587.39) +
((6244 - 6277.015)^2/6277.015) +
((16329 - 16348.51)^2/16348.51) +
((11726 - 11658.53)^2/11658.53) +
((2288 - 2260.56)^2/2260.56)
## [1] 18.74621

18.74621

I get a slightly different test statistic Thinking this may be due to rounding errors? 18.74621

  1. The test statistic is ??^2 = 20.93. What is the p-value?
    DF = (5 - 1)*(2 - 1) = 4

Both 20.93 and 18.74 have a p-value < 0.001

  1. What is the conclusion of the hypothesis test?

Given this conclusion it does seem that the amount of coffee consumption affects the clinical depression

  1. 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…”

This was an observational study, so causality cannot be attributed.