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 follow.
1.Is this a valid Latin Square? (explain)
2. Write the model equation
3.Analyze the data from this experiment (use α=0.05) and draw conclusions about the factor of interest. (Note: Use aov() instead of gad() for Latin Square Designs, be sure all blocks are recognized as factors)
Solution:
PART 1:
---> It is a valid Latin square because it has 2 sources of nuiscance variability which are the Number of Days and the Batch Effect, which are known and Controllable. Also, the observations are not repeating in each row and column. This provides orthogonality to the experimentPART 2:
Writing the Model Equation
\[ X_{i,j}=\mu+\tau_{i}+\beta_{j}+\alpha_{k}+\epsilon_{i,j,k} \]
Where,
\(X_{i,j}\)=Observation
\(\mu\)=Grand Mean
\(\tau_{i}\)=Effect for “i”
\(\beta_{j}\)= First Block Factor
\(\alpha_{k}\)= Second Block Factor
\(\epsilon_{i,j,k}\)= Random Error
PART 3:
Reading the Data:
Obs <- c(8,7,1,7,3,11,2,7,3,8,4,9,10,1,5,6,8,6,6,10,4,2,3,8,8)
Batch <- c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5)
Day <- c(rep(seq(1,5),5))
Ingredient <- c(1,2,4,3,5,3,5,1,4,2,2,1,3,5,4,4,3,5,2,1,5,4,2,1,3)
Batch <- as.factor(Batch)
Day <- as.factor(Day)
Ingredient <- as.factor(Ingredient)
Data <- data.frame(Obs, Batch, Day, Ingredient)
str(Data)
## 'data.frame': 25 obs. of 4 variables:
## $ Obs : num 8 7 1 7 3 11 2 7 3 8 ...
## $ Batch : Factor w/ 5 levels "1","2","3","4",..: 1 1 1 1 1 2 2 2 2 2 ...
## $ Day : Factor w/ 5 levels "1","2","3","4",..: 1 2 3 4 5 1 2 3 4 5 ...
## $ Ingredient: Factor w/ 5 levels "1","2","3","4",..: 1 2 4 3 5 3 5 1 4 2 ...
Writing the Hypothesis:
Null:
\[ H_O:\tau_{i}=0 \]
Alternate:
\[ H_a: \tau_{i}\neq0 \]
Running the Anova Model:
aov.model<-aov(Obs~Ingredient+Batch+Day,data=Data)
summary(aov.model)
## Df Sum Sq Mean Sq F value Pr(>F)
## Ingredient 4 141.44 35.36 11.309 0.000488 ***
## Batch 4 15.44 3.86 1.235 0.347618
## Day 4 12.24 3.06 0.979 0.455014
## Residuals 12 37.52 3.13
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Conclusion:
---> Since our ingrediants P-Value is 0.000488, very small compared to the sig level of 0.05, therefore we will reject the Null Hypothesis, and conclude that different ingredients have certain effect on reaction time of a chemical process