1 Assignment on Latin Squares (A Type of RCBD)

1.1 Question 1

  • PART 1: Check whether the given data is Latin Square or not?
    This is a valid Latin square. There are two forms of nuisance Batch and Day. There are five different ingredients being tested. In order to control for the known nuisances, every ingredient must be tested one time in each batch and on every day. This means that looking at the Latin square, the treatments should only appear one time in every row and one time in every column. Because this is the case, the Latin square is valid.

  • PART 2: Linear Effects Equation for Latin Squares - RCBD:

    • \(y_{i,j,k} = \mu + \tau_{i} + \beta_{j} + \alpha_{k} + \epsilon _{i,j,k}\)

      Where,
      \(\mu\): Population Mean;
      \(\tau_{i}\): Treatment effect for population i;
      \(\beta_{j}\) : Block effect for source of Nuisance j;
      \(\alpha_{k}\): Block effect for source of Nuisance k;
      \(\epsilon_{i,j,k}\): Error corresponding to ith population, j&k blocks.

    • Hypothesis:

      • \(H_{0}: \tau_{i} = 0\) \(\forall {i}\)
      • \(H_{a}: \tau_{i} \neq 0\) some i
  • PART 3: Read the data into R, Convert the Treatments and Blocks as factors and finally perform ANOVA using aov().

Observations<- 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(rep(1:5, each = 5))
Days<- c(rep(seq(1,5),5))
Ingredients<- 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")
Batch<- as.factor(Batch)
Days<- as.factor(Days)
Ingredients<- as.factor(Ingredients)


ANOVA_MODEL<- aov(Observations~Batch+Days+Ingredients)
summary(ANOVA_MODEL)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## Batch        4  15.44    3.86   1.235 0.347618    
## Days         4  12.24    3.06   0.979 0.455014    
## Ingredients  4 141.44   35.36  11.309 0.000488 ***
## Residuals   12  37.52    3.13                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  • Comment:
    When the analysis of variance(ANOVA) was run, the p-value with respect to ingredient was .0004 which is smaller than our alpha = 0.05. We can say that there is evidence to reject the null hypothesis in favor of the alternative hypothesis. At least one chemical ingredient has a mean reaction time significantly different from the others.  

    We can also observe that the two blocks of predicted nuisance were not statistically significant. Our experimental design had less power than if we were to have designed the test without the blocks.

  • Complete R Code

Observations<- 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(rep(1:5, each = 5))
Days<- c(rep(seq(1,5),5))
Ingredients<- 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")
Batch<- as.factor(Batch)
Days<- as.factor(Days)
Ingredients<- as.factor(Ingredients)


ANOVA_MODEL<- aov(Observations~Batch+Days+Ingredients)
summary(ANOVA_MODEL)