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.
Answer
\((a)\) False: Confidence interval is about a population not a sample.
\((b)\) True
\((c)\) False: Confidence Interval is about population propertion not about sample statistic.
\((d)\) False: If the confidence interval will be narrow then the margin of error will be smaller.
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.
Answer
\((a)\) Yes 48% is a sample statistics becasuse it estimates the population propertion (p).
\((b)\)
p <- 0.48
n <- 1259
SE <- sqrt(p *(1 -p)/n)
margin_error <- SE * 1.96
upper_bound <- round(p + margin_error,3)
lower_bound <- round(p - margin_error,3)
upper_bound
## [1] 0.508
lower_bound
## [1] 0.452
95% CI range is (.452, .508)
45.2% to 50.8% US residents think marijuana should be made legal
\((c)\) Central Limit Theorem (CLT) tells us
We can assume residents were selected in a random process because we do not have that information. Given sample size (n) = 1259 success: 1259 * 0.48 = 604.32 failure: 1259 * (1 - 0.48) = 654.68 Both success and failure ≥ 10.
So, this is TRUE i.e normal model is a good approximation.
\((d)\) No, news piece statement is not justified. The confidence interval is between 45.2% to 50.8%. So, 45.2% to 50.8% of Americans think that marijuana should be legalized which is just barely covers half of Americans at the top of the range. So we cannot accurately say that majority of people support legalization.
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?
Answer
Given
p <- 0.48
margin_error <- 0.02
z <- 1.96
SE <- margin_error / z
sample <- (p * (1-p) ) / (SE ^ 2)
sample
## [1] 2397.158
Almost 2398 Americans need for survey where margin of error of a 95% confidence interval to 2%.
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.
Answer
Given
p_cal <- 0.08
p_ore <- 0.088
p_prop <- p_cal - p_ore
sample_cal <- 11545
sample_ore <- 4691
SE_cal <- (p_cal * (1-p_cal)) / sample_cal
SE_ore <- (p_ore * (1-p_ore)) / sample_ore
SE_prop <- sqrt(SE_cal + SE_ore)
margin_error <- 1.96 * SE_prop
margin_error
## [1] 0.009498128
upper_bound <- round(p_prop + margin_error,3)
lower_bound <- round(p_prop - margin_error,3)
upper_bound
## [1] 0.001
lower_bound
## [1] -0.017
CI range is (-0.017,0.001).
The proportion of Californians and Oregonians who are sleep deprived is between -0.017 and 0.001.
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.
Answer
Creat a table to understand the given data.
library("DT")
observed <- c(4, 16, 67, 345, 426)
expected_prop <- c(0.048, 0.147, 0.396, 0.409, 1)
expected <- expected_prop * 426
deer <- rbind(observed, expected)
colnames(deer) <- c("Woods", "Cultivated grassplot", "Deciduous forests", "Other", "Total")
datatable(deer)
\((a)\) Hypothesis conditions
\((b)\) I think, chi-square test can be the best fit for answer this research question.
\((c)\) Condition for chi-square test:
Given table, each case that shows a count to the table is independent of all the other cases in the table.
Sample size: we can see in the deer table expected row all values greater than 5.
datatable(deer)
Above assumtion we can say Chi-squared goodness of fit test.
\((d)\) degree of freedom = k - 1 = 4 -1 = 3
df <- 3
chi_square <- sum(((observed - expected) ^ 2)/expected)
p_value <- 1 - pchisq(chi_square, df)
p_value
## [1] 0
The p value is 0, so we can reject the null hypothesis.
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.
Answer
\((a)\) Chi-square test can be appropriate for evaluate if there is an association between coffee intake and depression.
\((b)\) Hypothesis test:
H0 (null hypothesis): There is no relationship between coffee intake and clinical depression
HA (alternate hypothesis): There is a relationship between coffee intake and clinical depression.
\((c)\) Proportion of women who suffer from depression:
prop_depres <- 2607 / 50739
prop_depres
## [1] 0.05138059
Proportion of women who do not suffer from depression:
prop_no_depres <- 48132 / 50739
prop_no_depres
## [1] 0.9486194
\((d)\) Expected Count for highlighted cell and test statistics:
observed <- 373
expected <- (2607/50739)*6617
expected
## [1] 339.9854
hightlighted_cell <- sum(((observed - expected) ^ 2)/expected)
hightlighted_cell
## [1] 3.205914
Expected Count for highlighted cell: 340
Test statistics = 3.2
\((e)\) The test statistic is \(\chi^2=20.93\)
Degree of freedom: (5 - 1) * (2 - 1) = 4
chisq <- 20.93
df <- 4
p_value <- 1-pchisq(chisq, df)
p_value
## [1] 0.0003269507
The p value is 0.0003269507.
\((f)\) Due to low p-value we reject the null hypothesis that there is no relationship between clinical depression and coffee intake.
\((g)\) I do agree with author’s statement because this test was an observational study and therefore we cannot assume causation. To conclude there is a relation, experiments need to be conducted.