1. AP Biology and Calculus AB:

In this problem I will be comparing the proportion of female students who took the AP biology exam with the proportion of female students who took the AP Calculus AB exam.

Hypothesis:

H_0: p_1 = p_2

H_a: p_1 > p_2

p_1= proportion of female student taking Biology exam.

p_2 = proportion of female students taking Calculus AB exam.

Significance Level:

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

Conclusion: Since p-value < 2.2e-16 we reject the null hypothesis. There is enough evidence at 5% significance level to conclude that the proportion of female students taking AP Biology exam was higher that the proportions of female students taking the AP Calculus AB exam in 2017.

2. Infant Crying After a Vitamin K Shot:

Hypothesis:

H_0: mu_1 = mu_2

H_a: mu_1 > mu_2

mu_1 = mean crying time using conventional methods.

mu_2 = mean crying time when the mother holds the infant.

Significance level:

alpha= 0.05

conventional <- c(63, 0, 3, 48, 33, 33, 20, 23, 11, 12, 48, 15, 33, 14, 28, 27, 34, 70, 63, 0, 72, 23, 54, 52, 28, 34, 30, 27, 21, 10)
mother <- c(0, 32, 22, 23, 84, 19, 60, 50, 44, 34, 72, 50, 48, 14, 12, 38, 19, 43, 17, 5, 12, 73, 19, 46, 9, 43, 71, 27, 28, 18)

Hypothesis Test:

t.test(conventional, mother, alternative = "greater")
## 
##  Welch Two Sample t-test
## 
## data:  conventional and mother
## t = -0.62949, df = 57.456, p-value = 0.7342
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
##  -12.55157       Inf
## sample estimates:
## mean of x mean of y 
##  30.96667  34.40000

Conclusion: since the p-value is grater that 0.05 we fail to reject the null hypothesis. There is not enough evidence at the 5% significance level to assume that when infants cried less when held by their mother compared to the conventional methods.