Part 2
statistical model: \(y_{i,j,k}\) = \(\mu\) +\(\alpha_{i}\)+\(\tau_{j}\)+ \(\beta_{k}\) + \(\epsilon_{i,j,k}\)
null hypothesis: The ingredients have no affect on the reaction time, \(\tau_{j}\) = 0
alternative hypothesis: The ingredients have an affect on the reaction time, \(\tau_{j}\) != 0
Part 3
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 )
ingredient <- 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")
ingredient <- as.factor(ingredient)
batch <- c(rep(1,5),rep(2,5),rep(3,5),rep(4,5),rep(5,5))
batch <- as.factor(batch)
day <- c(rep(seq(1,5),5))
day <- as.factor(day)
aov.model <-aov(obs~batch+day+ingredient)
summary(aov.model)
## Df Sum Sq Mean Sq F value Pr(>F)
## batch 4 15.44 3.86 1.235 0.347618
## day 4 12.24 3.06 0.979 0.455014
## ingredient 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
The p-value of the ingredient is significantly lower than that of alpha, indicating that we reject the null hypothesis. Additionally, the p-values of the two blocks (batch & day) are much greater than alpha, indicating that they are sources of nuisance variability. In conclusion, the ingredients do have an effect on the reaction time.