FALSE A confidence interval is constructed to estimate the population proportion, not the sample proportion.
TRUE A confidence interval is constructed to estimate the population propotion
TRUE By the definition of the confidence level.
FALSE At a 90% confidence level, the margin of error will be less than 3% and confidence interval will be more narrow since we need to be less confident that the population probability is within the interval.
48% is a sample statistic that estimates the population parameter since it was derived from the sample data.
n <- 1259
p <- 0.48
SE <- sqrt((p * (1-p))/n)
( ME <- 1.96 * SE )
## [1] 0.02759723
Although we have no information about how residents were selected for the survey, it is reasonble to assume that they were selected using a simple random process.
Based on the confidence interval it is possible that the population probablity is over 50%, but it is also possible that it is noticeably lower than 50%.
p <- 0.48
ME <- 0.02
SE <- ME / 1.96
( n <- (p * (1-p)) / (SE^2) )
## [1] 2397.158
p_ca <- 0.08
p_or <- 0.088
p <- p_ca - p_or
n_ca <- 11545
n_or <- 4691
SE2_ca <- (p_ca * (1-p_ca)) / n_ca
SE2_or <- (p_or * (1-p_or)) / n_or
SE <- sqrt(SE2_ca + SE2_or)
( ME <- 1.96 * SE )
## [1] 0.009498128
observed <- c(4, 16, 61, 345, 426)
expected_prop <- c(0.048, 0.147, 0.396, 1-0.048-0.147-0.396, 1)
expected <- expected_prop * 426
deer <- rbind(observed, expected)
colnames(deer) <- c("woods", "grassplot", "forests", "other", "total")
deer
## woods grassplot forests other total
## observed 4.000 16.000 61.000 345.000 426
## expected 20.448 62.622 168.696 174.234 426
H0: Barking deer has no preference of certain habitats for foraging. HA: Barking deer prefers some habitats over others for foraging.
We can use chi-square goodness of fit test to this hypothesis.
Although it is possible that something in the behavior of barking deer makes cases dependent on each other, it is more likely that the cases are independent.
k <- 4
df <- k-1
chi2 <- sum(((deer[1,] - deer[2,])^2)/deer[2,])
( p_value <- 1 - pchisq(chi2, df) )
## [1] 0
Chi-square test for the two-way table can be used to evaluate if there is an association between coffee intake and depression.
H0: There is no relationship between coffee consumption and clinical depression. HA: There is a relationship between coffee consumption and clinical depression.
p_depressed = (2607/50739) * 100; round(p_depressed, digits=2)
## [1] 5.14
p_normal = (48132/50739) * 100; round(p_normal, digits=2)
## [1] 94.86
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
df = (5-1)*(2-1); df
## [1] 4
1 - pchisq(20.93,df)
## [1] 0.0003269507
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.
Yes I agree with his statement. Based on this study, there is a very weak relationship between coffee consumption and depression among women.