In a preliminary study to determine whether the installation of a camera designed to catch cars that go through an intersection on a red traffic light affects the number of violators, the number of violators that go through an intersection on a red traffic light was recorded for each day of the weak before and the week after the camera was installed. Test at a 1% level of significance whether the installation of a camera resulted in a reduction of the number of violators that go through the intersection on a red traffic light, given the results below. Give the null and alternative hypothesis.

Day Sunday Monday Tuesday Wednesday Thursday Friday Saturday
Before 12 16 31 18 20 24 16
After 8 18 24 19 16 19 16

1 answer

To test whether the installation of a camera resulted in a reduction of the number of violators that go through the intersection on a red traffic light, we can use a paired t-test.

Null hypothesis: The installation of a camera did not result in a reduction of the number of violators.
Alternative hypothesis: The installation of a camera resulted in a reduction of the number of violators.

We need to calculate the difference in the number of violators before and after the camera installation for each day:

Sunday: 12 - 8 = 4
Monday: 16 - 18 = -2
Tuesday: 31 - 24 = 7
Wednesday: 18 - 19 = -1
Thursday: 20 - 16 = 4
Friday: 24 - 19 = 5
Saturday: 16 - 16 = 0

Next, we calculate the mean difference:
Mean difference = (4 - 2 + 7 - 1 + 4 + 5 + 0) / 7 = 1.43

To perform the t-test, we also need to calculate the standard deviation of the differences.
First, we calculate the squared differences from the mean:
(4 - 1.43)^2 = 5.8449
(-2 - 1.43)^2 = 13.2849
(7 - 1.43)^2 = 19.8049
(-1 - 1.43)^2 = 5.8849
(4 - 1.43)^2 = 5.8449
(5 - 1.43)^2 = 12.9649
(0 - 1.43)^2 = 2.0449

Then, we calculate the variance by summing up the squared differences and dividing by n-1:
Variance = (5.8449 + 13.2849 + 19.8049 + 5.8849 + 5.8449 + 12.9649 + 2.0449) / 6 = 7.1134

Finally, we find the standard deviation by taking the square root of the variance:
Standard deviation = sqrt(7.1134) = 2.667

With the mean difference of 1.43 and standard deviation of 2.667, we can calculate the t-statistic:

t = (mean difference - 0) / (standard deviation / sqrt(n))
t = (1.43 - 0) / (2.667 / sqrt(7))
t = 0.535

Degrees of freedom = n - 1 = 7 - 1 = 6

We can calculate the critical t-value at a 1% level of significance for a two-tailed t-test with 6 degrees of freedom. Using a t-table or calculator, the critical t-value is approximately ±2.447.

Since the calculated t-value (0.535) is within the range of -2.447 to 2.447, we fail to reject the null hypothesis. There is not enough evidence to conclude that the installation of a camera resulted in a reduction of the number of violators that go through the intersection on a red traffic light.