This report uses two different data sets that measure the reaction time of drivers, one is when they are sober and the other is after they have had 2 beers. The table below combines the two data sets and adds a new column that contains the difference between the reaction times. The combined table will be used for a two paired sample t-test.
| SubjectID | Before | After | AfterMinusBefore |
|---|---|---|---|
| 2 | 2.96 | 4.78 | 1.82 |
| 13 | 3.16 | 4.55 | 1.39 |
| 4 | 3.94 | 4.01 | 0.07 |
| 16 | 4.05 | 5.59 | 1.54 |
| 17 | 4.42 | 3.96 | -0.46 |
| 20 | 4.69 | 3.72 | -0.97 |
| 6 | 4.81 | 5.34 | 0.53 |
| 5 | 4.85 | 5.91 | 1.06 |
| 10 | 4.88 | 5.75 | 0.87 |
| 3 | 4.95 | 5.57 | 0.62 |
| 18 | 4.99 | 5.93 | 0.94 |
| 19 | 5.01 | 6.03 | 1.02 |
| 9 | 5.15 | 4.19 | -0.96 |
| 12 | 5.26 | 7.23 | 1.97 |
| 8 | 5.33 | 5.84 | 0.51 |
| 15 | 5.49 | 5.25 | -0.24 |
| 11 | 5.75 | 6.25 | 0.50 |
| 1 | 6.25 | 6.85 | 0.60 |
| 7 | 6.60 | 6.09 | -0.51 |
| 14 | 6.65 | 6.42 | -0.23 |
Before the test can be ran, it should be determined if the difference between the two reaction times, AfterMinusBefore, are normally distributed. As the graph above depicts, the distribution of reaction times appears to be approximately normal.
The paired sample t-test is conducted with the following information: \[H_0:\mu_d = 0\] \[H_a:\mu_d>0\] \[\alpha = 0.05\]
\(H_0\) is the null hypothesis, which is that the difference of the sample means is 0. \(H_a\) is the test hypothesis, which is that the mean of the difference is greater than 0. \(\alpha\) is the level of significance, which is 5 percent.
The results of the test is printed below:
##
## Paired t-test
##
## data: combined_table$After and combined_table$Before
## t = 2.6031, df = 19, p-value = 0.008734
## alternative hypothesis: true mean difference is greater than 0
## 95 percent confidence interval:
## 0.1690516 Inf
## sample estimates:
## mean difference
## 0.5035
The p-value of the test is 0.008734, which is less than \(\alpha\), so we reject the null hypothesis. Therefore, at 0.05 level of significance, there is enough evidence to conclude that there is an increase in the average reaction time after the drivers drank the two beers.
University of Florida. “Paired Samples.” BOLT: University of Florida, University of Florida, https://bolt.mph.ufl.edu/6050-6052/unit-4b/module-13/paired-t-test/. Accessed 12 Nov 2024