The effect of five different ingredients (A, B, C, D, E) on the reaction time of a chemical process is being studied. Each batch of new material is only large enough to permit five runs to be made. Furthermore, each run requires approximately 1.5 hours, so only five runs can be made in one day. The experimenter decides to run the experiment as a Latin square so that day and batch effects may be systematically controlled. She obtains the data that follows.
| Day | |||||
|---|---|---|---|---|---|
| Batch | 1 | 2 | 3 | 4 | 5 |
| 1 | A=8 | B=7 | D=1 | C=7 | E=3 |
| 2 | C=11 | E=2 | A=7 | D=3 | B=8 |
| 3 | B=4 | A=9 | C=10 | E=1 | D=5 |
| 4 | D=6 | C=8 | E=6 | B=6 | A=10 |
| 5 | E=6 | D=2 | B=3 | A=8 | C=8 |
Is this a valid Latin Square?
Yes this is a valid 5x5 Latin Square. Each of the five treatments (A-E) appears only once in each row and column.
Write the model equation
\[x_{ijk}=\mu+\alpha_{i}+\beta_{j}+\tau_{k}+\epsilon_{ijk}\]
Where:
\[x_{ijk}= \text{The response in batch }i\text{, day }j\text{, and treatment }k\]
\[\mu=\text{The grand mean}\]
\[\alpha_{i}=\text{The effect of batch }i\]
\[\beta_{j}=\text{The effect of day }j\]
\[\tau_{k}=\text{The effect of treatment }k\]
\[\epsilon_{ijk}=\text{The random error of batch }i\text{, day }j\text{, and treatment }k\]
Analyze the data from this experiment (use α=0.05) and draw conclusions about the factor of interest.
\[H_{0}:\tau_1=\tau_2=...=\tau_5=0\]
\[H_a:\tau_k\neq0\text{ for some k}\]
x<-c(8,7,1,7,3,11,2,7,3,8,4,9,10,1,5,6,8,6,6,10,6,2,3,8,8)
batch<-factor(rep(1:5, each = 5))
day<-factor(rep(1:5, times = 5))
trt<-factor(c("A","B","D","C","E",
"C","E","A","D","B",
"B","A","C","E","D",
"D","C","E","B","A",
"E","D","B","A","C"))
dat<-data.frame(batch,day,trt,x)
aov.model<-aov(x ~ batch + day + trt, data = dat)
summary(aov.model)
## Df Sum Sq Mean Sq F value Pr(>F)
## batch 4 12.56 3.14 0.871 0.50938
## day 4 15.76 3.94 1.092 0.40373
## trt 4 131.36 32.84 9.105 0.00128 **
## Residuals 12 43.28 3.61
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qf(0.95,4,12)
## [1] 3.259167
The treatment critical value for this assessment is 3.26 assuming an alpha of 0.05, 4 degrees of freedom for the treatments, and 12 degrees of freedom for the residuals.
| Source | df | SS | MS | F | p |
|---|---|---|---|---|---|
| Batch | 4 | 12.56 | 3.14 | 0.871 | 0.509 |
| Day | 4 | 15.76 | 3.94 | 1.092 | 0.404 |
| Trt | 4 | 131.36 | 32.84 | 9.105 | 0.001 |
| Error | 12 | 43.28 | 3.61 | ||
| Total | 24 | 202.96 |
TukeyHSD(aov.model,"trt")
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = x ~ batch + day + trt, data = dat)
##
## $trt
## diff lwr upr p adj
## B-A -2.8 -6.6284587 1.0284587 0.2006565
## C-A 0.4 -3.4284587 4.2284587 0.9969635
## D-A -5.0 -8.8284587 -1.1715413 0.0094066
## E-A -4.8 -8.6284587 -0.9715413 0.0124984
## C-B 3.2 -0.6284587 7.0284587 0.1192924
## D-B -2.2 -6.0284587 1.6284587 0.4006574
## E-B -2.0 -5.8284587 1.8284587 0.4880068
## D-C -5.4 -9.2284587 -1.5715413 0.0053577
## E-C -5.2 -9.0284587 -1.3715413 0.0070917
## E-D 0.2 -3.6284587 4.0284587 0.9998003
The results of the TukeyHSD test show that the following treatment effects are significantly different assuming an alpha = 0.05:
Based on the results of this ANOVA, there is sufficient evidence to reject the null hypothesis that all of the treatment effects equal zero. This was determined by the following findings:
x<-c(8,7,1,7,3,11,2,7,3,8,4,9,10,1,5,6,8,6,6,10,6,2,3,8,8)
batch<-factor(rep(1:5, each = 5))
day<-factor(rep(1:5, times = 5))
trt<-factor(c("A","B","D","C","E",
"C","E","A","D","B",
"B","A","C","E","D",
"D","C","E","B","A",
"E","D","B","A","C"))
dat<-data.frame(batch,day,trt,x)
aov.model<-aov(x ~ batch + day + trt, data = dat)
summary(aov.model)
qf(0.95,4,12)
TukeyHSD(aov.model,"trt")