Hypothesis Testing on Day 07

Ball Bearings Example:

H0: true mean = 7

H1: true mean \( \neq \) 7

n = 75
x.mean = 6.85
x.s = 1.25
test.stat = (x.mean - 7)/(x.s/sqrt(n))
# test.stat = -1.04
p = 2 * pt(test.stat, df = n - 1)  # 2* because two-sided H1
# p = 0.30 >= alpha = 0.05

The evidence does not support rejecting the Null Hypothesis, so we conclude that the data cannot be used to disprove that the true mean is 7.

Confidence Interval Approach:

n = 75
x.mean = 6.85
x.s = 1.25
alpha = 0.05
tstar = qt(1 - (0.05/2), df = n - 1)
low = x.mean - tstar * x.s/sqrt(n)
high = x.mean + tstar * x.s/sqrt(n)
print(c(low, high))
## [1] 6.562 7.138

The 95% CI is (6.6,7.1). Since this contains the proposed mean (H0: mean = 7) we conclude that the proposed mean is reasonable. We would fail to reject the null hypothesis based on this data. In general, we reject a null hypothesis in favor of a two-sided alternative hypothesis when the 100(1-alpha)% CI does not contain the proposed mean.

Gifted Children Example:

H0: true mean = 32

H1: true mean < 32

n = 36
g.mean = 30.69
g.sd = 4.31
test.stat = (g.mean - 32)/(g.sd/sqrt(36))
# test.stat = -1.82
p = pt(-1.82, df = n - 1)
# p = 0.039 < alpha = 0.10

Since p < alpha, we reject the null hypothesis. The data supports the assertion that gifted children learn to count to 10 before their regular peers.