I'm currently in an undergraduate statistics course and we are investigating a dataset with R. The dataset is traffic data for roads in the state of Kentucky. We formulated hypothesis about the mean AADT (annual average daily traffic) of the roads in the dataset for 2008 and 2014. I hypothesized that the mean AADT was lower in 2014 than it was in 2008 (as opposed to the null hypothesis that the difference of the means = 0) We then were supposed to perform a two-sample t-test and form a conclusion on the hypotheses using the p-value in context.
I called the following R function to generate the t-test (
combined is the name of the dataset):
t.test(AADT ~ year, alt = "less" , data = combined)
And got the results:
## ## Welch Two Sample t-test ## ## data: AADT by year ## t = 0.20726, df = 198.87, p-value = 0.582 ## alternative hypothesis: true difference in means is less than 0 ## 95 percent confidence interval: ## -Inf 4874.681 ## sample estimates: ## mean in group 2008 mean in group 2014 ## 10226.00 9682.76
So given the confidence interval and the high p-value, I am inferring that there is weak evidence for rejecting the null hypothesis that the mean AADT of the two years are the same. However, the last line of the output confuses me. How can we not reject the null hypothesis if the data set shows that the mean in 2014 is in fact less than the mean in 2008?
My theory is that this dataset represents traffic calculated from a sample of the roads (since the entire span of each road cannot be observed all the time), and so although we observed a lower AADT in 2014, because this is not the actual AADT, the evidence can still remain weak that the AADT is, in reality, lower than it was in 2009. Do I understand this correctly?
Also, here is a sample of the dataset:
staID Route Milepoint District AADT year 1 85787 KY 70 2.900 3 1427 2008 2 85787 KY 70 2.900 3 1193 2014 3 1.90E+24 KY 1120 0.300 6 8084 2008 4 1.90E+24 KY 1120 0.300 6 7985 2014 5 72001 US 641 0.600 1 2610 2008 6 72001 US 641 0.681 1 3006 2014