Question 1:
The hypothesis would be first, stating the null hypothesis meaning that all of the means are equal
\(\mu_1=\mu_2=\mu_3=\mu_4\)
and the alternative, meaning that one of the means is different.
The linear equation would be:
\[y_{ijk} = \mu + \tau_i +\beta_j + \epsilon_{ijk} \]
library(GAD)
observation <- 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))
bolts <- c(rep(seq(1,5),4))
chemical <- as.fixed(chemical)
bolts <- as.fixed(bolts)
model <-lm(observation ~ chemical+bolts)
gad(model)
## $anova
## Analysis of Variance Table
##
## Response: observation
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical 3 12.95 4.317 2.3761 0.1211
## bolts 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 p-value is 0.1211 is less than 0.15, so we reject the NULL hypothesis.
Part (2):
The hypothesis would be first, stating the null hypothesis meaning that all of the means are equal
\(\mu_1=\mu_2=\mu_3=\mu_4\)
and the alternative, meaning that one of the means is different.
The linear equation would be:
\[y_{ijk} = \mu + \tau_i + \epsilon_{ijk} \]
observation <- c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
model2 <- lm(observation~chemical)
gad(model2)
## $anova
## Analysis of Variance Table
##
## Response: observation
## 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
Part (3):
In question 1, we have more power to reject H0 by adding block in our design and in question 2, since we are not blocking so the sum of square of blocking is added to the sum of square of error, making it less powerful.
Tundefinedundefined