This document contains the analysis of an experiment in which a chemist tests the effect of four chemical agents on the tensile strength of a particular type of cloth. In the first question, the experiment is analyzed as a randomized complete block design (RCBD), with the bolts of cloth used as blocks. In the second question, the same data is analyzed as if it had been collected with a completely randomized design (CRD), without blocking. In the third question, the findings of the two analyses are compared to judge whether the bolt of cloth is a significant source of nuisance variability. The analysis is done within R using the package GAD, with a significance level of alpha = 0.15.
The linear effects model is:
\[y_{ij} = \mu + \alpha_i + \beta_j + \epsilon_{ij}, \qquad i = 1,2,3,4 \qquad j = 1,2,3,4,5\]
where \(y_{ij}\) is the tensile strength of the cloth with the \(i\)th chemical in the \(j\)th bolt, \(\mu\) is the overall mean, \(\alpha_i\) is the effect of the \(i\)th chemical, \(\beta_j\) is the effect of the \(j\)th bolt (block) and \(\epsilon_{ij}\) is the random error. The model is additive, so there is no interaction between the chemical and the bolt.
The hypothesis being tested is:
\[H_0: \alpha_1 = \alpha_2 = \alpha_3 = \alpha_4 = 0\] \[H_1: \alpha_i \neq 0 \text{ for at least one } i\]
The four chemicals were chosen deliberately by the chemist, so the chemical is a fixed effect. The five bolts were selected from all of the bolts of this type of cloth, and the conclusions are meant to apply to the cloth in general and not only to these five bolts, so the bolt is treated as a random effect.
library(GAD)
obs<-c(73,68,74,71,67,
73,67,75,72,70,
75,68,78,73,68,
73,71,75,75,69)
chemical<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
bolt<-c(rep(c(1,2,3,4,5),4))
chemical<-as.fixed(chemical)
bolt<-as.random(bolt)
boxplot(obs~chemical,xlab="Chemical",ylab="Tensile Strength",main="Boxplot of Observations by Chemical")
boxplot(obs~bolt,xlab="Bolt",ylab="Tensile Strength",main="Boxplot of Observations by Bolt")
The boxplots show that the mean tensile strength of the four chemicals is very similar, from about 70.6 for chemical 1 to about 72.6 for chemical 4. The differences between the bolts are much larger, going from about 68.5 for bolts 2 and 5 to about 75.5 for bolt 3.
model<-lm(obs~chemical+bolt)
gad(model)
## $anova
## Analysis of Variance Table
##
## Response: obs
## 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
For the chemicals, the F statistic is about 2.38 with a p-value of about 0.121. Since the p-value is smaller than alpha = 0.15, we reject the null hypothesis and conclude that at least one chemical has a different effect on the tensile strength of the cloth. The bolt also has a very large F statistic, about 21.6, with a p-value of about 0.00002, which shows that the bolts account for a large part of the variability in the data.
The linear effects model is:
\[y_{ij} = \mu + \alpha_i + \epsilon_{ij}, \qquad i = 1,2,3,4 \qquad j = 1,2,3,4,5\]
where \(y_{ij}\) is the \(j\)th observation of tensile strength with the \(i\)th chemical, \(\mu\) is the overall mean, \(\alpha_i\) is the effect of the \(i\)th chemical and \(\epsilon_{ij}\) is the random error.
The hypothesis being tested is:
\[H_0: \alpha_1 = \alpha_2 = \alpha_3 = \alpha_4 = 0\] \[H_1: \alpha_i \neq 0 \text{ for at least one } i\]
model2<-lm(obs~chemical)
gad(model2)
## $anova
## Analysis of Variance Table
##
## Response: obs
## 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
The F statistic is about 0.39 with a p-value of about 0.764. Since the p-value is larger than alpha = 0.15, we fail to reject the null hypothesis, and there is no evidence that the chemicals have different effects on the tensile strength of the cloth.
The two analyses lead to opposite conclusions with the same observations. With the RCBD we reject the null hypothesis, while with the CRD we fail to reject it. The sum of squares of the chemicals is the same in both analyses (about 12.95), so the difference comes from the error. In the RCBD, the variability between bolts (sum of squares of about 157.0) is removed from the error, which leaves a mean squared error of about 1.82 with 12 degrees of freedom. In the CRD, this variability stays in the error, and the mean squared error grows to about 11.18 with 16 degrees of freedom. The larger error hides the small differences between the chemicals.
Blocking costs 4 degrees of freedom in the error, but the reduction of the sum of squared error is much larger than this loss, so the RCBD gives a much more sensitive test. Since the bolt has a very large F statistic and a p-value close to zero, I believe that the bolt of cloth represents a significant amount of nuisance variability, and blocking on the bolt was the right choice for this experiment.
library(GAD)
obs<-c(73,68,74,71,67,
73,67,75,72,70,
75,68,78,73,68,
73,71,75,75,69)
chemical<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
bolt<-c(rep(c(1,2,3,4,5),4))
chemical<-as.fixed(chemical)
bolt<-as.random(bolt)
boxplot(obs~chemical,xlab="Chemical",ylab="Tensile Strength",main="Boxplot of Observations by Chemical")
boxplot(obs~bolt,xlab="Bolt",ylab="Tensile Strength",main="Boxplot of Observations by Bolt")
model<-lm(obs~chemical+bolt)
gad(model)
model2<-lm(obs~chemical)
gad(model2)