Problem 6.6

  1. False - we know that exactly 46 percent agree with this decision for THIS SAMPLE

  2. True. Margin of error is half the confidence interval so using the interpretation of confidence intervals (95 percent of resamples contain the population parameter) this statement is true.

  3. False, the definition of confidence intervals only applies the range of resampled CI’s vs population parameter, not that there is a 95% chance a resampled mean will fall in this range.

  4. True, the confidence interval for 90 percent would be wideer and since moe is half that, it too would be wider.

Problem 6.12

  1. This is a sample statistic because we do not know how all the US population would have responded, only the 1259 sampled.

zstar<-1.96
p<-0.48
n<-1259
se<-sqrt(p*(1-p)/n)
lower_ci<- p-zstar*se
upper_ci<- p+zstar*se
lower_ci
## [1] 0.4524028
upper_ci
## [1] 0.5075972
  1. The normal model is a good approximation because the conditions for inference are met - 10 in the proportion sample and a random, independent sample.

  2. This is not justified at the 95% confidence level sicne the confidence interval does not include .5 (though it is just shy of it)

Problem 6.20

zstar<-1.96
moe<-.02
p<-.48

n<-((moe/zstar)^2/(p*(1-p)))^(-1)
n
## [1] 2397.158

Problem 6.28

zstar<-1.96
p1<-.08
n1<-11545
p2<-.088
n2<-4691

se1<-sqrt(p1*(1-p1)/n1)
se2<-sqrt(p2*(1-p2)/n2)
sepooled<-sqrt(se1^2+se2^2)

lower<-p2-p1-zstar*sepooled
upper<-p2-p1+zstar*sepooled
lower
## [1] -0.001498128
upper
## [1] 0.01749813

This range contains zero, so we cannot reject the null hypothesis that the difference is zero.

Problem 6.44

  1. H0: Deer do not prefer one habitat over another for foraging

Ha: Deer have a preffered foraging habitat

  1. We can use CHI SQUARE test to determine if the expected values are different from observed values

  2. The assumptions are not exactly met as the expected value for woods is 4.8 and less than 5. You could use yates continuity correction.

n<-426
obs<-c(4,16,67,345)
exp<-c(n*.048,n*.147,.396*n,n*.409)
chisq<-sum((obs-exp)^2/exp)
df<-4-1

pchisq(chisq,df,lower.tail=FALSE)
## [1] 1.144396e-59

Based on this we’d reject H0.

Problem 6.48

  1. Chi square test

  2. H0 there is not difference in coffee among the depression yes no groups for women.

Ha: There is a difference in coffee among the depression groupings for women.

pyes<-2607/50739
pno<-48132/50739
pyes
## [1] 0.05138059
pno
## [1] 0.9486194
expected = 2607*6617/50739
observed<-373

(observed-expected)^2/expected
## [1] 3.205914
X2<-20.93
df<-(5-1)*(2-1)
pchisq(X2,df,lower.tail = FALSE)
## [1] 0.0003269507
  1. The conclusion is that we reject the null hypothesis.

  2. I agree with the statement because we don’t know if correlation means causation, we don’t know that increased coffee consumption CAUSES decreased depression, just that there is a statistically different levels of consumption between the two categories.