Background

A study was done that observed truck driver’s reaction times before and after two beers. Below is a table of the results:

SubjectID Before After AfterMinusBefore
1 6.25 6.85 0.60
2 2.96 4.78 1.82
3 4.95 5.57 0.62
4 3.94 4.01 0.07
5 4.85 5.91 1.06
6 4.81 5.34 0.53
7 6.60 6.09 -0.51
8 5.33 5.84 0.51
9 5.15 4.19 -0.96
10 4.88 5.75 0.87
11 5.75 6.25 0.50
12 5.26 7.23 1.97
13 3.16 4.55 1.39
14 6.65 6.42 -0.23
15 5.49 5.25 -0.24
16 4.05 5.59 1.54
17 4.42 3.96 -0.46
18 4.99 5.93 0.94
19 5.01 6.03 1.02
20 4.69 3.72 -0.97

Take a look at the AfterMinusBefore column on the far right. Notice how some drivers actually had better reaction times after having two beers compared to others. While it looks like the overall reaction time increased, we will perform a hypothesis test to be sure.

Normality

Since we have a very small population, we have to determine if our data is normally distributed before we do our test.

One way we can do this is with a histogram:

Well…our histogram doesn’t seem to give us a definitive answer. It is hard to tell if the data is normal or bi modal. We can be sure by trying a QQ-Plot:

That looks a lot better. Notice how the data points lie within the margin-of-error. Now that we are sure that the data is normally distributed, we can test our hypothesis:

Hypothesis Test

We want to know if there is an increase in average reaction time. Let’s start by stating our hypotheses:

\[H_0:\mu_d=\mu_0\] \[H_a:\mu_d\>>\mu_0\]

Now to perform our T-Test:

## 
##  Paired t-test
## 
## data:  beers$After and beers$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

\[a=0.05\>>p=0.008\] Since our p value is smaller than our alpha value, we will reject the null hypothesis.

Conclusion

At 0.05 level of significance, there is enough evidence to conclude that the truck driver’s average reaction increased after having two beers.

Works cited

https://bolt.mph.ufl.edu/6050-6052/unit-4b/module-13/paired-t-test/