6.8 Manually Computing a t-Test
In a warehouse full of power packs labeled as 12 volts we randomly measure the voltage of 7. Here is the data:
## [1] 11.77 11.90 11.64 11.84 12.13 11.99 11.77
- Find the mean and the standard deviation.
Code
## [1] -2.247806
- Using
qt()
, compute the t critical value for a hypothesis test for this sample.
## [1] -2.446912
- Define a test statistic, \(t\), for testing whether the population mean is 12.
## [1] -2.247806
- Calculate the p-value using the t statistic.
## [1] 0.03281943
- Should you reject the null? Argue this in two different ways. (Following convention, set \(\alpha = .05\).)
Code
## [1] 0.06563885
##
## One Sample t-test
##
## data: voltage
## t = -2.2478, df = 6, p-value = 0.06564
## alternative hypothesis: true mean is not equal to 12
## 95 percent confidence interval:
## 11.71357 12.01215
## sample estimates:
## mean of x
## 11.86286
Suppose you were to use a normal distribution instead of a t-distribution to test your hypothesis. What would your p-value be for the z-test?
Without actually computing it, say whether a 95% confidence interval for the mean would include 12 volts.
Compute a 95% confidence interval for the mean.