Write the hypothesis tests.
State the significance level
p-value
State your decision.
\(p_1\) = proportion of female students that took biology exam
\(p_2\) = proportion of female students that Calculus AB Exam
\(H_0\): \(p_1\) \(<=\) \(p_2\)
\(H_a\):\(p_1\) \(>\) \(p_2\)
\(\alpha\) = 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.2 * 10^-16
Based on the results, we can see that we have enough evidence to show that the proportion of females who took the biology exam is greater than the proportion of females that took the Calculus AB Exam. This is because our p-value in this question is less than the significance level(0.5).
\(\mu_1\) = mean of a babies crying time(in seconds), using conventional method.
\(\mu_2\) = mean of a babies crying time(in seconds), being held by their mothers
\(H_0\): \(\mu_1\) < \(\mu_2\)
\(H_a\): \(\mu_1\) > \(\mu_2\)
\(\alpha\) = 0.05
conventional_Cry_Time <- 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)
with_Mother_Cry_Time <- 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)
t.test(conventional_Cry_Time, with_Mother_Cry_Time, paired = TRUE)
##
## Paired t-test
##
## data: conventional_Cry_Time and with_Mother_Cry_Time
## t = 0.028519, df = 29, p-value = 0.9774
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -11.78558 12.11892
## sample estimates:
## mean difference
## 0.1666667
p-value = 0.9774
Based on the test that I did, we can see that we do not have enough evidence to support that the cry time(in seconds) from a baby being held by their mother while getting a shot is less than when a baby get’s a shot using the conventional method. This is because our p-value is greater than the significance level.