knitr::opts_chunk$set(echo = TRUE)

Problem 1

Hypotheses

\(H_0\): \(p_1\) = \(p_2\) \(H_a\): \(p_1\) > \(p_2\)

Where,

\(p_1\)= proportion of female students taking the biology exam

\(p_2\) = proportion of female students taking the calculus AB exam

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

Significance Level: α = 0.05

P-value = < 2.2e-16

Decision: Since the p-value is basically zero and the significance level is greater, we reject the null hypotheses. In the context of the question, it shows 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.

Problem 2

Hypotheses

\(H_0\): \(\mu_1\) = \(\mu_2\) \(H_a\): \(\mu_1\) < \(\mu_2\)

Where,

\(\mu_1\) = mean crying time for infants held by mothers

\(\mu_2\) = mean crying time for infants held conventionally

mothers<-c(25, 28, 30, 27, 29, 31, 26, 33, 30, 28,32, 27, 29, 34, 26, 31, 28, 30, 33, 29, 27, 32, 30, 28, 31, 29, 33, 30)
conventional <- c(35, 42, 38, 41, 45, 40, 39, 37, 43, 44, 38, 40, 42, 46, 39, 41, 37, 43, 45, 40, 39, 38, 44, 42, 40, 41, 43, 45, 39, 40)
t.test(mothers, conventional, conf.level = 0.95, alternative = "less")
## 
##  Welch Two Sample t-test
## 
## data:  mothers and conventional
## t = -16.864, df = 55.598, p-value < 2.2e-16
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
##       -Inf -10.23923
## sample estimates:
## mean of x mean of y 
##  29.50000  40.86667

Significance Level: α = 0.05

P-value = < 2.2e-16

Decision: Since the p-value is basically zero and the significance level is greater, we reject the null hypotheses. In the context of the question, it shows strong evidence that infants tend to cry less when they’re held by their mothers compared to conventional methods