In: Statistics and Probability
A test is made of five different incentive-pay schemes for piece workers. Eight workers are assigned randomly to each plan. The total number of items produced by each worker over a 20-day period is recorded:
A | B | C | D | E |
1106 | 1214 | 1010 | 1054 | 1210 |
1203 | 1186 | 1069 | 1101 | 1193 |
1064 | 1165 | 1047 | 1029 | 1169 |
1119 | 1177 | 1120 | 1066 | 1223 |
1087 | 1146 | 1084 | 1082 | 1161 |
1106 | 1099 | 1062 | 1067 | 1200 |
1101 | 1161 | 1051 | 1109 | 1189 |
1049 | 1153 | 1029 | 1083 |
1197 |
•Perform ANOVA to see if there is a difference among the five plans.
•Perform a comparison of means using Tukey’s method.
•Which plan(s) would you recommend to increase productivity?
•State the ANOVA assumptions and comment on whether you think they are satisfied.
•Perform a non-parametric test (Kruskal-Wallis) to see if there is a difference among the groups.
Here,
H0: there is a difference among the five plans.
The R- code for ANOVA is as;
y=c(1106,1203,1064,1119,1087,1106,1101,1049,1214,1186,1165,1177,1146,1099,1161,1153,1010,1069,1047,1120,1084,1062,1051,1029,1054,1101,1029,1066,1082,1067,1109,1083,1210,1193,1169,1223,1161,1200,1189,1197)
x=rep(c(1,2,3,4,5),each=8)
d=data.frame(y,x)
a=aov(y~x,d);a
summary(aov(y~x,d))
And the output is ;
> a=aov(y~x,d);a
Call:
aov(formula = y ~ x, data = d)
Terms:
x Residuals
Sum of Squares 6195.2 137578.8
Deg. of Freedom 1 38
Residual standard error: 60.17054
Estimated effects may be unbalanced
> summary(aov(y~x,d))
Df Sum Sq Mean Sq F value Pr(>F)
x 1 6195 6195 1.711 0.199
Residuals 38 137579 3620
Here p-value is 0.199 which is greater than 0.05 thus we accept null hypothesis and conclude that
There is a no difference among the five plans.
The R-code for Tykey method is as;
y=c(1106,1203,1064,1119,1087,1106,1101,1049,1214,1186,1165,1177,1146,1099,1161,1153,1010,1069,1047,1120,1084,1062,1051,1029,1054,1101,1029,1066,1082,1067,1109,1083,1210,1193,1169,1223,1161,1200,1189,1197)
x=rep(c("l","m","n","o","p"),each=8)
d=data.frame(y,x)
a=aov(y~x)
TukeyHSD(a)
And the output is ;
> TukeyHSD(a)
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = y ~ x)
$x diff lwr upr p adj
m-l 58.250 10.73122 105.768784 0.0099294
n-l -45.375 -92.89378 2.143784 0.0671590
o-l -30.500 -78.01878 17.018784 0.3649223
p-l 88.375 40.85622 135.893784 0.0000527
n-m -103.625 -151.14378 -56.106216 0.0000033
o-m -88.750 -136.26878 -41.231216 0.0000492
p-m 30.125 -17.39378 77.643784 0.3772209
o-n 14.875 -32.64378 62.393784 0.8949479
p-n 133.750 86.23122 181.268784 0.0000000
p-o 118.875 71.35622 166.393784 0.0000002
Here differences "m-l","p-l","n-m","o-m","p-n","p-o"
are significant while other differences are not significant.
The R-code for Kruskal -Wallis test is as;
y=c(1106,1203,1064,1119,1087,1106,1101,1049,1214,1186,1165,1177,1146,1099,1161,1153,1010,1069,1047,1120,1084,1062,1051,1029,1054,1101,1029,1066,1082,1067,1109,1083,1210,1193,1169,1223,1161,1200,1189,1197)
x=rep(c("l","m","n","o","p"),each=8)
d=data.frame(y,x)
kruskal.test(y~x,d)
And the output is :
> kruskal.test(y~x,d)
Kruskal-Wallis rank sum test
data: y by x
Kruskal-Wallis chi-squared = 26.383, df = 4,
p-value = 2.648e-05
Here p-value is less than 0.05 thus we reject null hypothesis as There is a no difference among the groups.