Answer 1
\(P_1\) = proportion of female who took calculus AB test
\(P_2\) = proportion of female who took Biology test
\(H_0\): \(P_1\) = \(P_2\)
\(H_a\): \(P_1\) < \(P_2\)
significance level α = 0.05
prop.test(c(84200,102598), c(144790,211693), alternative="greater")
##
## 2-sample test for equality of proportions with continuity correction
##
## data: c(84200, 102598) out of c(144790, 211693)
## X-squared = 3234.9, df = 1, p-value < 2.2e-16
## alternative hypothesis: greater
## 95 percent confidence interval:
## 0.09408942 1.00000000
## sample estimates:
## prop 1 prop 2
## 0.5815319 0.4846547
p-value 2.2e-16 < α 0.05, there are strong evidence that the proportion of female students taking the biology exam is higher than the proportion of female students taking the calculus AB exam.
Answer2
conventional_method<-c(63,0,2,46,33,33,29,23,11,12,48,15,33,14,51,37,24,70,63,0,73,39,54,52,39,34,30,55,58,18)
new_method<-c(0,32,20,23,14,19,60,59,64,64,72,50,44,14,10,58,19,41,17,5,36,73,19,46,9,43,73,27,25,18)
\(\mu_1\) = average crying time using conventional method
\(\mu_2\) = average crying time using new method
\(H_0\): \(\mu_1\) = \(\mu_2\)
\(H_a\): \(\mu_1\) > \(\mu_2\)
α = 0.05
t.test(conventional_method, new_method, conf.level = 0.95, alternative = "greater")
##
## Welch Two Sample t-test
##
## data: conventional_method and new_method
## t = 0.029953, df = 57.707, p-value = 0.4881
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
## -9.135003 Inf
## sample estimates:
## mean of x mean of y
## 35.30000 35.13333
p-value 0.4881 > α 0.05, there is not enough evidence to show that infants cried less on average when they are held by their mothers than if held using conventional methods.