Question 1

p1 = proportion of females who took the Biology exam p2 = proportion of females who took AB exam

Ho: p1 = p2 Ha: p1 > p2

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 is smaller than the significance value therefore we reject Ho and we have evidence that p1 is greater than p2.

Question 2

Hypotheses

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

Where,

\(\mu_1\) = mean crying time for conventional handling

\(\mu_2\) = mean crying time for held-by-mother group

significance level = 0.05

conventional <- 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 data (held by mother)
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
)

t_test_result <- t.test(new_method, conventional, alternative = "less")

print(t_test_result)
## 
##  Welch Two Sample t-test
## 
## data:  new_method and conventional
## t = -0.029953, df = 57.707, p-value = 0.4881
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
##      -Inf 9.135003
## sample estimates:
## mean of x mean of y 
##  35.13333  35.30000

p-value= 0.488 and less than the significance level therefore we reject Ho and we have evidence that infants cry less when they are held opposed to the conventional method.

```