Question1
Hypothesis:
\(H_0: \tau_i =0\)
\(H_a: \tau_i \neq 0\)
Linear effects equation:
\(y_{ijk}=\mu_i+\tau_i+\beta_j+\epsilon_{ijk}\)
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(seq(1:5),4))
chemical <- as.fixed(chemical)
bolt <- as.fixed(bolt)
model1 <- lm(obs~chemical+bolt)
gad(model1)
## $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
P value is 0.12, which is smaller than \(\alpha=0.15\). We can reject the null hypothesis.
Question2
Hypothesis:
\(H_0: \tau_i =0\)
\(H_a: \tau_i \neq 0\)
Linear effects equation:
\(y_{ij}=\mu_i+\tau_i+\epsilon_{ij}\)
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))
dat <- data.frame(obs,chemical)
dat$chemical <- as.factor(dat$chemical)
aov.model <- aov(obs~chemical, data=dat)
summary(aov.model)
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical 3 12.95 4.317 0.386 0.764
## Residuals 16 178.80 11.175
The p value is 0.764 which is larger than \(\alpha=0.15\). We fail to reject the null hypothesis.
Question 3
In Q1, we blocked Bolt, which gave us a p value less than 0.15. In Q2, we did not block Bolt, and the p value turned out to be larger than 0.15. So we can conclude that blocking Bolt is justifiable.
If we fail to block when we need to, the nuisance variability will make the results of the experiment not valid.
We believe the Bolt of cloth represents a significant amount of nuisance variability.