Question 1: AP Exams

We are comparing the proportion of females taking the AP Biology exam to the proportion of females taking the AP Calculus AB exam.

Hypotheses

\[ H_0: p_1 = p_2 \]

\[ H_A: p_1 > p_2 \]

Where:

\[ \alpha = 0.05 \]

R Code

prop.test(
  x = c(84200, 102598),
  n = c(144790, 211693),
  alternative = "greater",
  correct = FALSE
)
## 
##  2-sample test for equality of proportions without continuity correction
## 
## data:  c(84200, 102598) out of c(144790, 211693)
## X-squared = 3235.3, df = 1, p-value < 2.2e-16
## alternative hypothesis: greater
## 95 percent confidence interval:
##  0.09409523 1.00000000
## sample estimates:
##    prop 1    prop 2 
## 0.5815319 0.4846547

Since he p-value from the test is less than 0.05, we reject the null hypothesis.This provides enough evidence to figure out that the amount of females taking the AP Biology exam is greater than the amount taking AP Calculus AB.

Question 2: Infant Crying

We want to find out if babies cry less when held by their moms compared to the conventional method.

Hypotheses:

H₀: μ₁=μ₂ Hₐ::μ₁=<μ₂

Where:

μ₁ = mean crying time with their moms μ2= mean of crying time with conventional method

α=0.05

holding <- c(12, 15, 10, 9, 11, 13, 14, 10, 12, 11)
conventional <- c(20, 18, 22, 19, 21, 23, 20, 19, 22, 21)
t.test(
  holding,
  conventional,
  alternative = "less",
  var.equal = FALSE
)
## 
##  Welch Two Sample t-test
## 
## data:  holding and conventional
## t = -11.298, df = 17.46, p-value = 9.331e-10
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
##       -Inf -7.447093
## sample estimates:
## mean of x mean of y 
##      11.7      20.5

The p-value is less than 0.05, so we reject the null hypothesis.

This tells us that babies cry significantly less when held by their moms compared to the conventional method.