In: Statistics and Probability
A study was conducted to see whether two types of cars, A and B, took the same time to parallel park. Seven drivers were randomly obtained and the time required for each of them to parallel park (in seconds) each of the 2 cars was measured. The results are listed below in order of driver (e.g. the first listing for A and B are driver 1; the second listing driver 2; etc.) Car A: 19, 21.8, 16.8, 24.2, 22, 34.7, 23.8 Car B: 17.8, 20.2, 16.2, 41.4, 21.4, 28.4, 22.7
A. Explain why this is a paired test and not a two sample test.
B. Test whether the there is a difference in mean parallel parking time of the two cars at a 0.05 level of significance. Include the hypotheses, the test statistic, the p-value, test decision and conclusion in the context of the problem.
C. Do you believe the test results are valid? Explain.
D. What test decision error could you have made and provide an explanation of this error in context of the problem. E. Include a copy of your R-code and test output.
(A) This is the paired test because each of the 7 drivers has driven both cars - and hence, his observations (times) for two cars are paired.
(B)
Thus, P-value = 0.7796. Which is greater than the level of significance (0.05) hence, we fail to reject the null hypothesis. Hence, In the context of the problem we can conclude there is no difference in mean parallel parking time for two cars.
(C) The values of d are respectively : 1.2, 1.6, 0.6, -17.2, 0.6, 6.3, 1.1. Notice that, except for 4th driver all other shows more time on second car. Fruther, the value of 4th driver seems unusually low which might be due to mistake or outlier observations. It seems that, if the test is done with ignoring this observation, test will suggest significant difference between two cars. Hence test result doesn't seem valid.
(D) The type II error can be made in this situation. i.e. the error of accepting null hypothesis when it is false. In terms of the problem, it is error of declaring no difference in parking time between two cars when actually the difference exists.
(E)
A <- c(19, 21.8, 16.8, 24.2, 22, 34.7, 23.8 ); B <- c(17.8, 20.2, 16.2, 41.4, 21.4, 28.4, 22.7); d <- A - B; xbar_d <- mean(d); t_cal <- (xbar_d - 0)/(sd(d)/sqrt(length(d))) p_value <- 2* pt(q = abs(t_cal), df=length(d)-1, lower.tail=F); cat("\nsample mean paired diff: ", xbar_d, "\npaired t statistic : ", t_cal, "\nP-value :", p_value);
Output:
sample mean paired diff: -0.8285714
paired t statistic : -0.2926594
P-value : 0.7796396
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image