The null hypothesis is that all chemical means are equal, while the alternative is that at least one differs. For bolt, the null hypothesis is that its variance component is zero, while the alternative is that it is greater than zero.
library(GAD)
chemical <- as.fixed(factor(rep(1:4, each = 5)))
bolt <- as.random(factor(rep(1:5, times = 4)))
strength <- c(73, 68, 74, 71, 67,
73, 67, 75, 72, 70,
75, 68, 78, 73, 68,
73, 71, 75, 75, 69)
dat <- data.frame(chemical, bolt, strength)
model <- aov(strength ~ chemical + bolt, data = dat)
gad(model)
## $anova
## Analysis of Variance Table
##
## Response: strength
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical 3 12.95 4.317 2.3761 0.1211
## bolt 4 157.00 39.250 21.6055 2.059e-05 ***
## Residuals 12 21.80 1.817
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
At α = 0.15, the chemical effect is significant (p = 0.1211). Therefore, we reject H0 and conclude that at least one chemical has a different mean tensile strength. The bolt effect is also significant (p < 0.001), indicating substantial variability among bolts.
The null hypothesis is that all chemical means are equal, while the alternative is that at least one differs.
model2 <- aov(strength ~ chemical, data = dat)
gad(model2)
## $anova
## Analysis of Variance Table
##
## Response: strength
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical 3 12.95 4.3167 0.3863 0.7644
## Residuals 16 178.80 11.1750
At α = 0.15, the chemical effect is not significant (p = 0.7644). Therefore, we fail to reject H0. There is insufficient evidence that the mean tensile strengths differ among the four chemicals.