2010 Healthcare Law. 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. A Confidence Interval is about a population, not a sample.
True. This is our boilerplace for how to report a confidence interval.
False. A confidence interval is about the population proportion, not about a sample statistic.
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.
Is 48% a sample statistic or a population parameter? Explain.
Answer: 48% is a sample statistic. As I understand it, 48% of 1,259 US residents surveyed (sample data).
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. Answer
SE = sqrt((0.48 * (1 - 0.48))/1259); SE # standard error
## [1] 0.01408022
LI = 0.48 - (qnorm(0.975)*SE); LI # lower limit
## [1] 0.4524033
HI = 0.48 + (qnorm(0.975)*SE); HI # upper limit
## [1] 0.5075967
Answer : There are 2 conditions for the sampling distribution of p^ (p-cap) being nearly normal -
Observations are independent. The sample taken must have been and should not be more than 10% of the population. For this survey, we can reasonably say that this is true.
Success-failure condition. The sample size must also be sufficiently large - that is the success and failure rates must be greater than 10. In this case, this condition is true - 48% and 52% of 1,259 are greater than 10.
Answer Yes, it is justified based on our confidence interval since our upper limit is around 51%. Since this is barely a majority though, it is also probably true that based on our findings, the new piece of survey may not be justified.
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 ?
# ME = (qnorm(0.975) * sqrt((0.48 * (1 - 0.48))/n) margin of error
# sample size at 2% margin of error and 95% control interval
n = (0.48 * (1 - 0.48)) / (0.02 / (qnorm(0.975)))^2; ceiling(n)
## [1] 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 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.
Answer
We assume that the sampling is near normal and thus we can apply the formula for the difference of 2 proportions.
SE_cal = sqrt((0.08 * (1 - 0.08))/11545); SE_cal #standard error for California
## [1] 0.002524887
SE_org = sqrt((0.088 * (1 - 0.088))/4691); SE_org #standard error for Oregon
## [1] 0.004136243
#standard error for the difference in proportion between Oregon and California
SE_org_cal = sqrt(SE_cal + SE_org); SE_org_cal
## [1] 0.08161575
#confridence interval for the difference between the proportions of Oregonians and Californians who are sleep deprived
## (p1 - p2) - z * SE
LL = (0.088 - 0.08) - (qnorm(0.975)*SE_org_cal); LL # lower limit - 2.5% in the lower tail and 2.5% in the upper tail and 95% in the middle
## [1] -0.1519639
UL = (0.088 - 0.08) + (qnorm(0.975)*SE_org_cal); UL # upper limit - 2.5% in the lower tail and 2.5% in the upper tail and 95% in the middle
## [1] 0.1679639
The 95% confidence interval between the difference in the proportion of sleep depreviation between Oregonians and Californians is between ~-15% to ~17%. This means that the proportion of Oregonians who are sleep deprived can be as much as 15% less than Californians or the proportions of Oregonians that are sleep deprived can be as much as 17% more than Californians for 95% of the samples taken with the given sample sizes. This means that there may also be no difference in the proportion of sleep deprived Californians and Oregonians since the interval includes 0.
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.
| Woods | Cultivated grassplot | Deciduous forests |Other | Total
--------------------|--------|-----------------------|--------------------|------|-------
Deer forage habitat | 4 | 16 | 61 |345 | 426
deer forage % | 0.9 | 3.8 | 14.3 |81.0 | 100
Hainan land make up | 4.8 | 14.7 | 39.6 |40.9 | 100
Answer H0: The barking deer does not prefer a certain habitat to forage. HA: The barking deer has certain habitats that it prefer to forage.
Answer A chi-square test. Since we have cases that can be classified into several groups (deer habitats where they forage), we can determine if the forage habitats proportion is representative of the land make up.
Answer There are two conditions that must be checked before performing a chi-square test:
Independence. Each case that contributes a count to the table must be independent of all the other cases in the table. We assume that all the barking deer habitat variables (4) are independent of each other
Sample size / distribution. Each particular scenario (i.e. cell count) must have at least 5 expected cases. The woods habitat has only 4.8 cases - so this is in the lower boundary of what is accepted. We assume though that this is an acceptable count.
Answer H0: The barking deer does not prefer a certain habitat to forage. HA: The barking deer has certain habitats that it prefer to forage.
# Z_woods = (Obs_cnt_woods - Null_cnt_woods)/SE; SE = sqrt(Null_cnt_woods)
# = (Obs_cnt_woods - Null_cnt_woods)^2/Null_cnt_woods
Z_woods_chisq = (0.9 - 4.8)^2/4.8
# Z_grass = (Obs_cnt_grass - Null_cnt_grass)/SE; SE = sqrt(Null_cnt_grass)
# = (Obs_cnt_grass - Null_cnt_grass)^2/Null_cnt_grass
Z_grass_chisq = (3.8 - 14.7)^2/14.7
# Z_forest = (Obs_cnt_forest - Null_cnt_forest)/SE; SE = sqrt(Null_cnt_forest)
# = (Obs_cnt_forest - Null_cnt_forest)^2/Null_cnt_forest
Z_forest_chisq = (14.3 - 39.6)^2/39.6
# Z_oth = (Obs_cnt_oth - Null_cnt_oth)/SE; SE = sqrt(Null_cnt_oth)
# = (Obs_cnt_oth - Null_cnt_oth)^2/Null_cnt_oth
Z_oth_chisq = (81.0 - 40.9)^2/40.9
Z_all = Z_woods_chisq + Z_grass_chisq + Z_forest_chisq + Z_oth_chisq; Z_all
## [1] 66.7306
1 - pchisq(Z_all, 3)
## [1] 2.14273e-14
Since the p-value for the chi square distribution is very small, we can strongly reject the null hypothesis that deers have no preference in the habitats were they forage.
6.48 Coffee and Depression. 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.
Caffeinated coffee consumption
--------------------------------
<=1 2-6 1 2-3 4
cup/week cups/week cup/day cups/day cups/day Total
Clinical Yes 670 373 905 564 95 2,607
depression No 11,545 6,244 16,329 11,726 2,288 48,132
Total 12,215 6,617 17,234 12,290 2,383 50,739
Answer : chi square test to test for independence in 2 way table
Answer : H0: There is no relationship between coffee consumption and clinical depression. HA: There is a relationship between coffee consumption and clinical depression.
Answer :
p_depressed = (2607/50739) * 100; round(p_depressed, digits=2) #women who are depressed
## [1] 5.14
p_normal = (48132/50739) * 100; round(p_normal, digits=2) #women who are normal
## [1] 94.86
Answer :
exp_cnt = 6617 * 0.0514; round(exp_cnt,digit=0)
## [1] 340
obs_cnt = 373
(obs_cnt - exp_cnt)^2/exp_cnt
## [1] 3.179824
Answer :
df = (5-1)*(2-1); df
## [1] 4
1 - pchisq(20.93,df)
## [1] 0.0003269507
Answer : Since the p-value is very small (0.0003), for similar samples there is only a 0.0003 chance that we reject the null hypothesis that there is no relationship between depression and coffee consumption among women.
Answer : Yes, I agree with his statement. Based on this study, there is a very weak relationship between coffee consumption and depression among women.