Directions

For each question: - Write the null and alternative hypotheses
- State the significance level (α)
- Find the p-value
- State your decision
- Write a conclusion in context

Question 1

  • Hypothesis

p1 - Represents the proportions of females in biology p2 - Represents the proportions of females in Calc BC

Ho (Null Hypothesis): p1 = p2 Ha (Alternative Hypothesis): p1 > p2

  • Significance Level

α = 0.05

# I am comparing the proportion of female students in two AP exams
# to see if Biology has a higher proportion than Calculus AB.

alpha <- 0.05  # I use 0.05 because it is the standard significance level

# Biology data (females and total students)
x1 <- 84200
n1 <- 144790

# Calculus AB data
x2 <- 102598
n2 <- 211693

# I run a two-proportion test because I am comparing two groups
prop.test(c(x1, x2), c(n1, n2),
          alternative = "greater",
          correct = FALSE)
## 
##  2-sample test for equality of proportions without continuity correction
## 
## data:  c(x1, x2) out of c(n1, n2)
## 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

Analysis

  • Since the p-value is less than 0.05, I reject the null hypothesis. This basically means the probability of observing a difference this large assuming the null hypothesis is true is very low. Therefore I conclude that there is evidence to conclude that the proportion of females taking the Biology exam is significantly higher than the proportion taking the Calculus AB exam.

Question 2

  • Hypothesis

μ1 - This represents the mean crying time when held by mother μ2 - This represents the crying time by a conventional method

Ho (Null Hypothesis) : μ1 = μ2 Ha (Alternative Hypothesis) : μ1 < μ2

  • Significance Level

α = 0.05

group1 <- 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)

group2 <- 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)
t.test(group1, group2, alternative = "less")
## 
##  Welch Two Sample t-test
## 
## data:  group1 and group2
## 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

Analysis

Since the p-value is 0.4881, which is greater than 0.05 I would fail to reject the null hypothesis. This means that the results are not statistically significant. There is not enough evidence to conclude that infants cry less when they are held by their mothers.