\(H_o: \mu_1=\mu_2=\mu_3=\mu_4\)
\(H_a:\) At least one \(\mu_i\) are different
\(y_{ij}=\mu+\tau_i+\beta_j+\epsilon_{ij}\)
#install.packages("GAD")
library(GAD)
Strength<-c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
Chem<-rep(c("C1","C2","C3","C4"),each=5)
Bolt<-rep(c("B1","B2","B3","B4","B5"),4)
Chem<-as.fixed(Chem)
Bolt<-as.fixed(Bolt)
model<-lm(Strength~Chem+Bolt)
gad(model)
## $anova
## Analysis of Variance Table
##
## Response: Strength
## Df Sum Sq Mean Sq F value Pr(>F)
## Chem 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
With a p-value of .121 and 2.059e-05 being less than \(\alpha=.15\), there is not enough evidence to reject the null hypothesis that there is no significant difference between strengths of the chemical agents and bolts of cloth.
\(H_o: \tau_i=0\)
\(H_a: \tau_i\neq 0\)
\(y_{ij}=\mu+\tau_i+\epsilon_{ij}\)
model2<-lm(Strength~Chem)
gad(model2)
## $anova
## Analysis of Variance Table
##
## Response: Strength
## Df Sum Sq Mean Sq F value Pr(>F)
## Chem 3 12.95 4.3167 0.3863 0.7644
## Residuals 16 178.80 11.1750
With a p-value=.7644 being less than \(\alpha=.15\), there is not enough evidence to reject the null hypothesis that there is a significant difference between strengths of the chemical agents.
Both versions of the experiment resulted in not rejecting the null hypothesis, but the p-value was much larger in the experiment without the bolts of cloth as a block. This should indicate that the bolts represents a significant amount of nuisance variability.