In: Statistics and Probability
Do flexible schedules reduce the demand for resources? The Lake County, IL Health Department experimented with a flexible four-day work week. For a year, the department recorded the mileage driven by 11 filed workers on an ordinary five-day work week. Then it changed to a flexible four-day work week and recorded mileage for another year. Here is the data. The researchers want to know if the total mileage changed going form a 5 – day schedule to a 4 – day schedule.
Name |
5 – Day Mileage |
4 – Day Mileage |
Jeff |
2798 |
2914 |
Betty |
7724 |
6112 |
Roger |
7505 |
6177 |
Tom |
838 |
1102 |
Aimee |
4592 |
3281 |
Greg |
8107 |
4997 |
Larry G. |
1228 |
1695 |
Tad |
8718 |
6606 |
Larry M. |
1097 |
1063 |
Leslie |
8089 |
6392 |
Lee |
3807 |
3362 |
State a null and alternative hypothesis to determine if a difference exists between two different schedules for a parametric and a nonparametric test.
Check conditions.
Give your conclusion from both tests and a final conclusion. Use .
I have solved this problem in R.
As the number of data points is more than 10, I have used software.
[IF YOU ARE REQUIRED TO SOLVE THIS PROBLEM BY ANY OTHER SOFTWARE OR BY HAND, LET ME KNOW IN THE COMMENTS ; I SHALL PROVIDE YOU A SOLUTION BY THAT METHOD; I AM USING R BECAUSE IT IS THE EASIEST WAY FOR SOLVING THIS PROBLEM]
FOR THE PARAMETRIC METHOD, WE USE PAIRED t TEST:
Let the mean of 5-day-mileage be denoted 1 and the mean of 4-day-mileage be denoted 2
Here the null hypothesis and the alternative hypothesis are given by
R CODE:
x<-
c(2798,7724,7505,838,4592,8107,1228,8718,1097,8089,3807)
y<-
c(2914,6112,6177,1102,3281,4997,1695,6606,1063,6392,3362)
chisq.test(x,y) #to check independence
shapiro.test(x) #to check normality
shapiro.test(y)
#to check normality
t.test(x,y,paired=TRUE) #to run the
t test
R OUTPUT:
> x<-
c(2798,7724,7505,838,4592,8107,1228,8718,1097,8089,3807)
> y<-
c(2914,6112,6177,1102,3281,4997,1695,6606,1063,6392,3362)
> chisq.test(x,y) #to check independence
Pearson's Chi-squared test
data: x and y
X-squared = 110, df = 100, p-value = 0.2322
Warning message:
In chisq.test(x, y) : Chi-squared approximation may be
incorrect
> shapiro.test(x) #to check normality
Shapiro-Wilk normality test
data: x
W = 0.8566, p-value = 0.05203
> shapiro.test(y) #to check normality
Shapiro-Wilk normality test
data: y
W = 0.88221, p-value = 0.111
> t.test(x,y,paired=TRUE) #to run the t test
Paired t-test
data: x and y
t = 2.858, df = 10, p-value = 0.01701
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
216.4276 1747.5724
sample estimates:
mean of the differences
982
FOR NON PARAMETRIC TEST, WE USE TWO SAMPLE SIGN TEST
Let the median of 5-day-mileage be denoted 1 and the median of 4-day-mileage be denoted 2
Here the null hypothesis and the alternative hypothesis are given by
R CODE:
library(BSDA)
SIGN.test(x,y,alternative="two.sided",conf.level=0.95) #to carry
out the sign test
R OUTPUT:
Dependent-samples Sign-Test
data: x and y
S = 8, p-value = 0.2266
alternative hypothesis: true median difference is not equal to
0
95 percent confidence interval:
-158.5164 1816.2182
sample estimates:
median of x-y
1311
Achieved and Interpolated Confidence Intervals:
Conf.Level L.E.pt U.E.pt
Lower Achieved CI 0.9346 -116.0000 1697.000
Interpolated CI 0.9500 -158.5164 1816.218
Upper Achieved CI 0.9883 -264.0000 2112.000
CONCLUSION:
The p-value and the corresponding conclusion for both the tests are given below:
Method | p-value | Conclusion |
Parametric Test | 0.01701 | reject the null hypothesis at 5% level of significance |
Non-parametric test | 0.2266 | Fail to reject the null hypothesis at 5% level of significance |
Overall, it can be concluded that the mean of the two different schedules are equal by parametric test at 5% level of significance while the median of the two different schedules are not equal by non-parametric test at 5% level of significance. Hence the same data may yield different results for different tests.
Hopefully this will help you. In case of any query, do comment. If you are satisfied with the answer, give it a like. Thanks.