A chemist wishes to test the effect of four chemical agents on tensile strength. Because there may be variability from one bolt of cloth to another, the five bolts are treated as blocks.
library(GAD)
chemical <- factor(rep(1:4, each = 5))
bolt <- 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
)
dat1 <- data.frame(chemical, bolt, strength)
dat1
## chemical bolt strength
## 1 1 1 73
## 2 1 2 68
## 3 1 3 74
## 4 1 4 71
## 5 1 5 67
## 6 2 1 73
## 7 2 2 67
## 8 2 3 75
## 9 2 4 72
## 10 2 5 70
## 11 3 1 75
## 12 3 2 68
## 13 3 3 78
## 14 3 4 73
## 15 3 5 68
## 16 4 1 73
## 17 4 2 71
## 18 4 3 75
## 19 4 4 75
## 20 4 5 69
Because chemical is the treatment of interest, it is a fixed effect. Bolt is treated as a random block effect.
\[ Y_{ij}=\mu+\alpha_i+\beta_j+\epsilon_{ij} \]
where \(\alpha_i\) is the fixed chemical effect, \(\beta_j\) is the random bolt effect, and \(\epsilon_{ij}\) is random error.
\[ H_0:\alpha_1=\alpha_2=\alpha_3=\alpha_4=0 \]
equivalently,
\[ H_0:\mu_1=\mu_2=\mu_3=\mu_4 \]
\[ H_a:\text{At least one chemical mean differs} \]
The significance level is:
\[ \alpha=0.15 \]
chemical.fixed <- as.fixed(dat1$chemical)
bolt.random <- as.random(dat1$bolt)
model1 <- lm(strength ~ chemical.fixed + bolt.random)
gad(model1)
## $anova
## Analysis of Variance Table
##
## Response: strength
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical.fixed 3 12.95 4.317 2.3761 0.1211
## bolt.random 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
The treatment test gives approximately
\[ F=2.3761 \]
with
\[ p=0.1211 \]
Since
\[ 0.1211<0.15 \]
we reject \(H_0\).
Conclusion: At the 0.15 significance level, there is sufficient evidence that the chemical agent affects tensile strength.
The block effect is also significant:
\[ F=21.6055,\qquad p=0.0000206 \]
Thus, bolt-to-bolt variability is a significant source of nuisance variability.
Now suppose the experiment is performed without blocking on the bolts. The observations are treated as a completely randomized design.
chemical2 <- factor(rep(1:4, each = 5))
strength2 <- c(
73, 68, 74, 71, 67,
73, 67, 75, 72, 70,
75, 68, 78, 73, 68,
73, 71, 75, 75, 69
)
dat2 <- data.frame(
chemical = chemical2,
strength = strength2
)
dat2
## chemical strength
## 1 1 73
## 2 1 68
## 3 1 74
## 4 1 71
## 5 1 67
## 6 2 73
## 7 2 67
## 8 2 75
## 9 2 72
## 10 2 70
## 11 3 75
## 12 3 68
## 13 3 78
## 14 3 73
## 15 3 68
## 16 4 73
## 17 4 71
## 18 4 75
## 19 4 75
## 20 4 69
The completely randomized design model is
\[ Y_{ij}=\mu+\alpha_i+\epsilon_{ij} \]
where \(\alpha_i\) is the fixed effect of chemical.
\[ H_0:\mu_1=\mu_2=\mu_3=\mu_4 \]
\[ H_a:\text{At least one population mean differs} \]
The significance level is:
\[ \alpha=0.15 \]
chemical2.fixed <- as.fixed(dat2$chemical)
model2 <- lm(strength ~ chemical2.fixed,
data = dat2)
gad(model2)
## $anova
## Analysis of Variance Table
##
## Response: strength
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical2.fixed 3 12.95 4.3167 0.3863 0.7644
## Residuals 16 178.80 11.1750
The treatment test gives approximately
\[ F=0.3863 \]
with
\[ p=0.7644 \]
Since
\[ 0.7644>0.15 \]
we fail to reject \(H_0\).
Conclusion: At the 0.15 significance level, there is insufficient evidence that the four chemical agents have different mean tensile strengths when the experiment is analyzed as a completely randomized design.
The RCBD analysis detected a significant chemical effect at the 0.15 significance level, while the completely randomized analysis did not.
For the RCBD:
\[ p_{\text{chemical}}=0.1211 \]
For the CRD:
\[ p_{\text{chemical}}=0.7644 \]
The difference occurs because blocking accounts for the substantial variability among the five bolts.
The bolt effect was highly significant:
\[ F=21.6055,\qquad p=0.0000206 \]
Therefore, the bolt of cloth is a significant source of nuisance variability.
Conclusion: Blocking on bolt is beneficial for this experiment because it removes substantial nuisance variation from the error term and provides a more sensitive test of the chemical treatment effect.
library(GAD)
chemical <- factor(rep(1:4, each = 5))
bolt <- 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
)
dat1 <- data.frame(chemical, bolt, strength)
chemical.fixed <- as.fixed(dat1$chemical)
bolt.random <- as.random(dat1$bolt)
model1 <- lm(strength ~ chemical.fixed + bolt.random)
gad(model1)
chemical2 <- factor(rep(1:4, each = 5))
strength2 <- c(
73, 68, 74, 71, 67,
73, 67, 75, 72, 70,
75, 68, 78, 73, 68,
73, 71, 75, 75, 69
)
dat2 <- data.frame(
chemical = chemical2,
strength = strength2
)
chemical2.fixed <- as.fixed(dat2$chemical)
model2 <- lm(strength ~ chemical2.fixed,
data = dat2)
gad(model2)