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.
False. We are 95% confident that between 43% and 49% of the American population support
the Supreme Court decision.
True. This is how we estimate the true population statistic from the sample.
True. With a 95% confidence, we expect 95% of the samples to fall within 43% and 49%.
False. Margin of error = z * SE. Z for 90% is 1.645 vs Z for 95% is 1.96.
Since all except Z is the same, we would expect lower margin of error
for the lower confidence/z.
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.
It is a sample statistic because it is a survey.
n = 1259
p = .48
SE = sqrt((p * (1-p))/n)
z = 1.96
lower = p - (z * SE)
upper = p + (z * SE)
lower
## [1] 0.4524028
upper
## [1] 0.5075972
# We need to check for normality so check for independence and success-failure > 10.
# Independence is satisfied if this was a simple random sample, and if we sampled
# less than the population. Population of US is more than 12590, so this condition is
# satisfied.
n * p
## [1] 604.32
n * (1 - p)
## [1] 654.68
# We have much more 10 success and failure, so this condition is satisfied.
# thus the normal model is a good approximation
No, it is not justified because 50% is within the confidence interval and our
sample statistic is only 48%, which is not a majority (greater than 50%).
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?
# MoE = Z * SE
# .02 = 1.96 * SE
# .02 = 1.96 * sqrt((p * (1 - p))/n)
# (.02/1.96)^2 = (p * (1 - p))/n
# n = (p * (1 - p))/(.02/1.96)^2
p = .48
n = (p * (1 - p))/(.02/1.96)^2
n
## [1] 2397.158
# We should sample 2398 people
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.
z = 1.96
ca_p = .08
or_p = .088
ca_n = 11545
or_n = 4691
SE_part_ca = (ca_p * (1 - ca_p))/ca_n
SE_part_or = (or_p * (1 - or_p))/or_n
pdiff = ca_p - or_p
SEdiff = sqrt(SE_part_ca + SE_part_or)
lower = pdiff - z * SEdiff
upper = pdiff + z * SEdiff
lower
## [1] -0.01749813
upper
## [1] 0.001498128
# HO: proportion CA residents insufficient sleep - proportion OR residents insufficient sleep = 0
# HA: proportion CA residents insufficient sleep - proportion OR residents insufficient sleep != 0
# the confidence interval includes 0, so we are not actually sure that the proportion of
# residents in CA and OR with insufficient sleep is different. Fail to reject H0
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.
H0: The barking deer has no preference for forage habitats
p_woods = .048, p_grass = .147, p_forest = .396, p_other = .409
HA: The barking deer has a preference for certain forage habitats
at least one of the p_{something} is different
Chi-square goodness of fit test
# 2 conditions to check: Independence and Sample Size.
# I assume that the data 426 deer forage sites were independent.
# The expected sample size of each condition must be greater than 5.
other_prop = 1 - .048 - .147 - .396
exp_prop = c(.048, .147, .396, other_prop)
n = 426
expected_n = n * exp_prop
expected_n
## [1] 20.448 62.622 168.696 174.234
# The expected of each is greater than 5. Conditions for chi-squared
# are satisfied
k = 4
df = k - 1
# sum didn't add, shoudl be 61 for forest
observed_n = c(4, 16, 61, 345)
x_square = sum((observed_n - expected_n)^2/expected_n)
p_val = 1 - pchisq(x_square, df)
p_val
## [1] 0
# The p-value is less than the signifcance level. We reject H0, and there is evidence
# that the deer prefer certain forage habitats than others.
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.
We can use a chi-square test for independence to look for association.
H0: Coffee consumption and depression are independent and there is no association
HA: Coffee consumption and depression are not independent and there is an association
total = 50739
depr = 2607/total
not_depr = 48132/total
depr
## [1] 0.05138059
not_depr
## [1] 0.9486194
drink_2_6 = 6617/total
prob_depr_2_6 = depr * drink_2_6
exp_depr_2_6 = prob_depr_2_6 * total
exp_depr_2_6
## [1] 339.9854
obs_depr_2_6 = 373
x_square_cell = (obs_depr_2_6 - exp_depr_2_6)^2/exp_depr_2_6
x_square_cell
## [1] 3.205914
x_square = 20.93
rows = 2
cols = 5
df = (rows - 1) * (cols - 1)
df
## [1] 4
p_val = 1 - pchisq(x_square, df)
p_val
## [1] 0.0003269507
The p value is less than the significance at the 95% levle (p = .05), thus we
reject the null hypothesis as there is evidence that there is an association
between coffee consumption and depression.
True. All we know is that there is some association from our testing of the data.
We do not know the exact effect of coffee consumption on depression and we do not
know anything about causation, just that there is an association.