### 6.6 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.39

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.

Ans: False. confidence interval is calculated to estimate the population, not te sample.

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.

Ans : True margin_of_err = .03 samplemean = .46

lower <- .46 - .03
lower
## [1] 0.43
upper <- .46 + .03
upper
## [1] 0.49
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%.

Ans: True Based on the above calculation and provided the condition to construct the confident interval are met. 1. Observations should be independent 2. Sucess- Failure rate should be > 10.

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

when the critical value reduces, the margin of error decreases. This is directly proportional to marin of error.

### 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

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

This is sample statistic since the survey is conducted among 1,259 US residents.

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.

The 95% confidence interval is calculated as below and it is (0.46 , 0.50) This means that if you take a new random samples, percentage of people who think that marijuana should be made legal would be in .46 and .50

sample_mean <- .48
n <- 1259
p <- .48
SE <- sqrt(p*(1-p)/n)
zval <- qnorm(0.95)

lower <- sample_mean - zval * SE
lower
## [1] 0.4568401
upper <- sample_mean + zval * SE
upper
## [1] 0.5031599
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.

Ans: In order to be sure that the above statistic follows anormal distribution, we need to have two conditions satisfied. 1. Observations are independent. Since the number of observation is less than 10% of population, this is true. 2. Success -Failure percentage should be atleast 10% each. Here it is true.

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?

Ans:Based on the confidence interval (0.46 , 0.50), This new piece of information cant be justified. because the upper limit says the 50% which can consider it to be a majority.

### 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 ?

Ans: Marin of Error = zval * SE SE = sqrt(p*(p-1)/n)

number of Americans needed for samples : 1689

ME <- .02
zval <- qnorm(.95)
zval
## [1] 1.644854
SE <- ME/zval
SE
## [1] 0.01215914
n <- 0.48 * (1-.48)/SE^2

n
## [1] 1688.259

### 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 di↵erence between the proportions of Californians and Oregonians who are sleep deprived and interpret it in context of the data.53

Ans: Since the confidence (-0.017, 0.0014) overlaps 0, There is no much significance difference between California residents and Oregan resident in terms sleep deprivation.

PE <- 0.080 - 0.088
CA.p <- .080
CA.n <- 11545
OR.p <- .088
OR.n <- 4691

SE <- sqrt((CA.p)*(1-CA.p)/CA.n + (OR.p)*(1-OR.p)/OR.n)
SE
## [1] 0.004845984
z <- 1.96
z 
## [1] 1.96
CI <- z*SE
PE - CI
## [1] -0.01749813
PE + CI
## [1] 0.001498128