In: Statistics and Probability
The data below shows the response results from 40 trials under 4
different treatments A, B, C, and D.
45.63757, 51.21472, 44.96996, 60.75578, 46.18385, 57.62250,
49.86439, 47.55933, 56.07860, 53.01811,
29.97175, 23.72556, 25.13072, 30.42172, 24.77120, 30.55649,
21.45654, 38.43644, 28.11560, 40.67097,
47.07583, 49.26320, 50.37192, 57.73966, 47.40510, 54.18739,
41.37567, 46.62298, 60.41503, 52.04636,
33.30575, 48.74348, 53.05379, 39.49147, 35.87060, 38.82209,
50.65352, 39.20412, 47.02827, 39.09127
The treatment labels are:
"A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
"B", "B", "B", "B", "B", "B", "B", "B", "B", "B",
"C", "C", "C", "C", "C", "C", "C", "C", "C", "C",
"D", "D", "D", "D", "D", "D", "D", "D", "D", "D"
a. Do an ANOVA to explore the possibility of evidence that (H0) the
means of the four treatments are all the same vs. (Ha) at-least one
of the mean treatments is different than the rest.
Report the p-value you find from the data set above: ____
Reject Null hypothesis at the 95% level of confidence?
no
yes
b. If you rejected the null hypothesis, which pairs of treatments
appear to differ?
A-B:
different
not different
A-C:
different
not different
A-D:
not different
different
B-C:
not different
different
B-D:
different
not different
C-D:
different
not different
The outputs is generated by using R-sofetware, the r-codes are given below along with its r-code.
> response=c(45.63757, 51.21472,
44.96996, 60.75578, 46.18385, 57.62250, 49.86439, 47.55933,
56.07860, 53.01811,
+ 29.97175, 23.72556, 25.13072, 30.42172, 24.77120, 30.55649,
21.45654, 38.43644, 28.11560, 40.67097,
+ 47.07583, 49.26320, 50.37192, 57.73966, 47.40510, 54.18739,
41.37567, 46.62298, 60.41503, 52.04636,
+ 33.30575, 48.74348, 53.05379, 39.49147, 35.87060, 38.82209,
50.65352, 39.20412, 47.02827, 39.09127)
> Treatment=c("A", "A", "A", "A", "A", "A", "A", "A", "A",
"A",
+ "B", "B", "B", "B", "B", "B", "B", "B", "B", "B",
+ "C", "C", "C", "C", "C", "C", "C", "C", "C", "C",
+ "D", "D", "D", "D", "D", "D", "D", "D", "D", "D")
> owanova<-aov(response~as.factor(Treatment), qr=TRUE)
> owanova
Call:
aov(formula = response ~ as.factor(Treatment), qr = TRUE)
Terms:
as.factor(Treatment) Residuals
Sum of Squares 3136.665 1315.987
Deg. of Freedom 3 36
> summary(owanova)
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(Treatment) 3 3137 1045.6 28.6 1.23e-09 ***
Residuals 36 1316 36.6
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Conclusion: here p-value associated with the test is 1.23e-09 < 5% level of significance, therefore we may reject Ho at 5% level of significance and conclude that there is sufficient evidence that the treatment mean for at least one treatment is significant.
p-value = 1.23e-09
Reject null hypothesis: Yes
Residual standard error: 6.04609
Estimated effects may be unbalanced
> TukeyHSD(owanova)
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = response ~ as.factor(Treatment), qr = TRUE)
$`as.factor(Treatment)`
diff lwr upr p adj
B-A -21.964782 -29.246982 -14.682582 0.0000000
C-A -0.640167 -7.922367 6.642033 0.9952440
D-A -8.764045 -16.046245 -1.481845 0.0130807
C-B 21.324615 14.042415 28.606815 0.0000000
D-B 13.200737 5.918537 20.482937 0.0001224
D-C -8.123878 -15.406078 -0.841678 0.0238069
conclusions:
b. We rejected the null hypothesis, we want to find which pairs
of treatments appear to differ?
A-B:
different
because p-value is significant., less than 5% level of significance
A-C:
not different
because p-value is insignificant., greater than 5% level of significance
A-D:
different
because p-value is significant., less than 5% level of significance
B-C:
different
because p-value is significant., less than 5% level of significance
B-D:
different
because p-value is significant., less than 5% level of significance .
.
C-D:
different
because p-value is significant., less than 5% level of significance.