The following data contains a sample of 20 drivers and their reaction times before and after drinking two beers. The times are listed in seconds, with the final column representing the difference in reaction time before and after each subject drank two beers.
## SubjectID Before After AfterMinusBefore
## 1 2 2.96 4.78 1.82
## 2 13 3.16 4.55 1.39
## 3 4 3.94 4.01 0.07
## 4 16 4.05 5.59 1.54
## 5 17 4.42 3.96 -0.46
## 6 20 4.69 3.72 -0.97
## 7 6 4.81 5.34 0.53
## 8 5 4.85 5.91 1.06
## 9 10 4.88 5.75 0.87
## 10 3 4.95 5.57 0.62
## 11 18 4.99 5.93 0.94
## 12 19 5.01 6.03 1.02
## 13 9 5.15 4.19 -0.96
## 14 12 5.26 7.23 1.97
## 15 8 5.33 5.84 0.51
## 16 15 5.49 5.25 -0.24
## 17 11 5.75 6.25 0.50
## 18 1 6.25 6.85 0.60
## 19 7 6.60 6.09 -0.51
## 20 14 6.65 6.42 -0.23
It is important to check the sample for normality since the sample
size \((n)\) is less than 30. To test
this, a histogram of the AfterMinusBefore column was created to check if
the data resembles a normal distribution.
Based on the histogram above, the data appears to be normally distributed. However, to ensure a normal distribution, further studies should make sure that \(n\) is larger than 30.
Typically, the reaction time of drivers slow down after drinking. A way to test if the sample collected follows this is by conducting a T-test at a 95% level of significance. Since the data collected for the t-test are paired, it is important to find the mean of differences \((\mu_d)\) and the standard deviation of differences \((s_d)\). \(\mu_d\) is calculated as \(\mu_a-\mu_b\) and \(s_d\) is calculated by \(s_a-s_b\). The null\((H_0)\) and alternative\((H_\alpha)\) hypotheses for the T-test can be found below, along with \(\alpha\), representing the level of significance: \[H_0:\,\mu_d=\mu_0\] \[H_a:\,\mu_d<0\] \[\alpha=0.05\]
##
## Paired t-test
##
## data: BeerTest$After and BeerTest$Before
## t = 2.6031, df = 19, p-value = 0.9913
## alternative hypothesis: true mean difference is less than 0
## 95 percent confidence interval:
## -Inf 0.8379484
## sample estimates:
## mean difference
## 0.5035
Above are the results after conducting the T-test for the sample of drivers before and after drinking two beers.
Since \(p=0.9913>\alpha=0.05\), we fail to reject the null hypothesis.
At a 0.05 level of significance, there is enough evidence to conclude that the reaction times of drivers are slower after drinking two beers.
Paired Samples. (n.d). UF Biostatistics Open Learning Textbook. https://web.archive.org/web/20220519220227/https://bolt.mph.ufl.edu/6050-6052/unit- 4b/module-13/paired-t-test/