False. The confiden interval appies to the population.
True, because the confidence interval is 46-3, 46+3 (43, 49).
False. A 95% confidence level indicates that 95% of the population will be in the range of the confidence interval.
False. 90% will have a lower margin of error.
It is a sample statistics because they are from the sample of American population.
zs <- 1.96
n <- 1259
p <- .48
SE <- sqrt((p*(1-p))/n)
CI.LOWER <- p - (zs * SE)
CI.UPPER <- p + (zs * SE)
CI <- c(CI.LOWER, CI.UPPER)
CI## [1] 0.4524028 0.5075972
Observations are independent. The sample is nore more than 10% of population.
Success-failure condition. The success and failure are both greater than 10.
The confidence interval is (0.45, 0.51). It includes values greater than 50%, so it is not justified.
n <- (0.48 * (1-0.48))/ (0.02 / (qnorm(0.975)))^2
ceiling(n)## [1] 2398
SE_cal <- sqrt((0.08 * (1-0.08))/11545)
SE_org <- sqrt ((0.088 * (1-0.088))/4691)
SE_org_cal <- sqrt(SE_cal+SE_org)
LI <- (0.088-0.08) - (qnorm(0.975)*SE_org_cal)
UI <- (0.088-0.08)+ (qnorm(0.975)*SE_org_cal)
CI <- c(LI,UI)
CI## [1] -0.1519639 0.1679639
H0: The barking deer does not prefer a certain habitat to forage.
HA: The barking deer has certain habitats that it prefer to forage.
A chi-square test.
It is independent and all habitats have at least 5 expected cases, therefore this condition is satisfied.
Zwood <- (0.9-4.8)^2/4.8
Zgrass <- (3.8 - 14.7)^2 / 14.7
Zforest <- (14.3-39.6)^2 / 39.6
Zoth <- (81.0-40.9)^2 / 40.9
Z_all <- Zwood + Zgrass + Zforest + Zoth
Z_all## [1] 66.7306
1-pchisq(Z_all, 3)## [1] 2.14273e-14
A Chi-Square test
H0: There is no relationship between coffee consumption and clinical depression
HA: There is relationship between coffee consumption and clinical depression
yes <- 2607
no <- 48132
total <- 50739
yes_prop <- yes/total
no_prop <- no/total
yes_prop## [1] 0.05138059
no_prop## [1] 0.9486194
p_depressed <- (2607/50739) * 100
p_normal <- ( 48132/50739) * 100
exp_cnt <- 6617 * 0.0514
obs_cnt <- 373
(obs_cnt - exp_cnt)^2 / exp_cnt## [1] 3.179824
df <- (5-1) * (2-1)
1- pchisq(20.93, df)## [1] 0.0003269507
We will reject H0 and accept HA because P-value is very small.