Many high school students take the AP tests in different subject areas. In 2017, of the 144,790 students who took the biology exam 84,200 of them were female. In that same year, of the 211,693 students who took the calculus AB exam 102,598 of them were female. Is there enough evidence to show that the proportion of female students taking the biology exam is higher than the proportion of female students taking the calculus AB exam? Test at the 5% level.

# Biology Exam
n_bio <- 144790
x_bio <- 84200

# Calculus AB Exam
n_calculus <- 211693
x_calculus <- 102598
# Null hypothesis
p = 0.5
# Alternative hypothesis
p > 0.5
## [1] FALSE

Our conclusion is our hypothesis of the proportion of female students taking the biology exam is higher than the proportion of female students taking the calculus AB exam, has been proven false.

A vitamin K shot is given to infants soon after birth. The study is to see if how they handle the infants could reduce the pain the infants feel. One of the measurements taken was how long, in seconds, the infant cried after being given the shot. A random sample was taken from the group that was given the shot using conventional methods, and a random sample was taken from the group that was given the shot where the mother held the infant prior to and during the shot. Is there enough evidence to show that infants cried less on average when they are held by their mothers than if held using conventional methods? Test at the 5% level.

cry_mother <- c(30, 25, 28, 35, 20)
cry_conventional <- c(40, 45, 38, 50, 42)
# Null hypothesis
p = 0.5
# Alternative hypothesis
p > 0.5
## [1] FALSE

We can conclude that we have enough evidence that infants cried less on average when held by their mothers than if using conventional methods, is proven false.