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.

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 ...

Part A:

Yes, it is a valid latin square because in each column or row one ingredient occurs only once and there’s no repetition thus it’s valid and it’s orthogonal.

Part B:

\(X_{i,j,k}\) = mu + \(\tau_i\) + \(\beta_j\) + \(\alpha_k\) + \(\epsilon_{i,j,k}\)

Assuming \(\tau_i\) is the ingredient effect, and thus we define our null and alternative hypotheses as

Ho = \(\tau_i=0\)

Ha = \(\tau_i\neq0\)

Part C:

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

Since our p-value for the ANOVA analysis w.r.t. ingredients is much smaller than 0.05, thus we reject the null hypothesis and thus we conclude that there’s a significant effect of ingredients on the mean reaction times of chemical processes.