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.44
- Is 48% a sample statistic or a population parameter? Explain.
- Sample statistic. The population size is unknown. It is not possible to survey every US resident.
- 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.
SE <- sqrt(0.48 * (1-0.48) / 1259)
SE
## [1] 0.01408022
upper <- 0.48 + (1.96 * SE)
lower <- 0.48 - (1.96 * SE)
c(lower, upper)
## [1] 0.4524028 0.5075972
- 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 once the observations are randomly selected.
- A news piece on this survey’s ???ndings states, “Majority of Americans think marijuana should be legalized.” Based on your confidence interval, is this news piece’s statement justi???ed?
- No. The confidence interval is not all 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 ?
n <- 1.96^2 * (0.48 * (1-0.48)) / 0.02^2
n
## [1] 2397.158
Sample size N is at least 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 di???erence between the proportions of Californians and Oregonians who are sleep deprived and interpret it in context of the data.
\(\hat{p_c} - \hat{p_o} = 0.08 - 0.088 = -0.008\)
\(\hat{p_{c-o}} = -0.008\)
SE <- sqrt((0.08 * (1 - 0.08)) / 11545 + (0.088 * (1-0.088)) / 4691)
SE
## [1] 0.004845984
lower <- (-0.008 - 1.96 * SE)
upper <- (-0.008 + 1.96 * SE)
c(lower, upper)
## [1] -0.017498128 0.001498128
This means that we are 95% confident that the proportion of Californians and Oregonians who are sleep deprived is between -1.7% and 1.5%. In other words, we are 95% confident that Californians who are sleep deprived is 1.7% less to 1.5% more than Oregonians.
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 Woods Cultivated grassplot Deciduous forests Other Total 4 16 67 345 426
Write the hypotheses for testing if barking deer prefer to forage in certain habitats over others. \(H_0:\) Barking dears do not have any preference in any of the habitats
\(H_A:\) Barking dears prefer to forage in certain habitats over others
What type of test can we use to answer this research question?
- Check if the assumptions and conditions required for this test are satis???ed.
- Independence: Sample size is less than 10%p and is random.
- All expected counts are at least 5.
- 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.
exp1 <- 0.048 * 426
exp2 <- 0.1476 * 426
exp3 <- 0.396 * 426
exp4 <- 0.409 * 426
c(exp1, exp2, exp3, exp4)
## [1] 20.4480 62.8776 168.6960 174.2340
# Chi Square Test Statistic
z1 <-(4 - exp1) / sqrt(exp1)
z2 <-(16 - exp2) / sqrt(exp2)
z3 <- (61 - exp3) / sqrt(exp3)
z4 <-(345 - exp4) / sqrt(exp4)
c(z1, z2, z3, z4)
## [1] -3.637372 -5.911768 -8.291769 12.937041
z1^2 + z2^2 + z3^2 + z4^2
## [1] 284.2999
df <- 4 - 1
p-value is less than 0.001 which is less than 0.05 therefore we reject \(H_0\) for the alternative that they do prefer foraging in certain habitats.
6.48 Coffee and Depression. Researchers conducted a study investigating the relationship between ca???einated 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 ca???einated co???ee 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 ca???einated co???ee consumption.63
- What type of test is appropriate for evaluating if there is an association between coffee intake and depression?
- Testing for independence in two way tables
- Write the hypotheses for the test you identi???ed in part (a).
\(H_0:\) There is no link or relationship between coffee consumption and the risk of depression in women
\(H_A:\) There is a relationship between coffee consumption and the risk of depression on women
- Calculate the overall proportion of women who do and do not suffer from depression.
- Women who suffer from depression: 0.05
- Women who do not suffer from depression: 0.95
- 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\).
# 373
0.05 * 6617
## [1] 330.85
# Contribution
(373 - 330.85)^2 / 330.85
## [1] 5.369873
- The test statistic is 2 = 20.93. What is the p-value?
\(df = (R - 1)(C - 1) = (2 - 1)(5 - 1) = 4\)
p-value < 0.001
- What is the conclusion of the hypothesis test?
p-value is less than 0.05 therefore we reject null hypothesis that there is a link between depression in women and coffee consumption.
- 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.
Agreed. There may be other factors that needs to be considered and were not covered in this study as it was based on coffee consumption.