3.10 One-sample t-test

The average mean birthweight in England and Wales is about 3300g. We first conduct a one sample t-test to determine if the population mean birthweight differs from this hypothetical value.

The mu option to t.test() allows you to pre-specify which mean you would like to compare with.

#--- Run a one-sample t-test
bab9 %$% t.test(bweight, mu = 3300, var.equal = T)
## 
##  One Sample t-test
## 
## data:  bweight
## t = -7, df = 600, p-value = 0.00000000007
## alternative hypothesis: true mean is not equal to 3300
## 95 percent confidence interval:
##  3079 3180
## sample estimates:
## mean of x 
##      3129

When reporting the results of the test, it is useful to specify the null hypothesis. In this case, the null hypothesis is that the mean population birthweight is equal to 3300. The alternative hypothesis is thus that the mean population birthweight is not equal to 3300.

Exercise 9.3: What do you conclude from this test?