1 Question 1

\(H_0:\mu_1=\mu_2=\mu_3=\mu_4=\mu\)

\(H_1:\)at least one of the \(\mu_i\) differs

Fixed effect hypothesis:

\(H_0:\tau_i=0\)

\(H_1:\tau_i\neq0\)

Linear effect model:

\(y_{ij}=\mu+\tau_i+\beta_j+e_{ij}\)

library(GAD)
chemical<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
chemical
##  [1] 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4
bolt<-c(seq(1,5),seq(1,5),seq(1,5),seq(1,5))
bolt
##  [1] 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
obs <- c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
obs
##  [1] 73 68 74 71 67 73 67 75 72 70 75 68 78 73 68 73 71 75 75 69
chemical<-as.fixed(chemical)
bolt<-as.fixed(bolt)
model<-lm(obs~chemical+bolt) 
gad(model)
## 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 ***
## Residual 12  21.80   1.817                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Since our calculated p-value (0.1211) is lower than \(\alpha=0.15\) we can reject the null hypothesis.

2 Question 2

\(H_0:\mu_1=\mu_2=\mu_3=\mu_4=\mu\)

\(H_1:\)at least one of the \(\mu_i\) differs

Fixed effect hypothesis:

\(H_0:\tau_i=0\)

\(H_1:\tau_i\neq0\)

Linear effect model:

\(y_{ij}=\mu+\tau_i+e_{ij}\)

chemical<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
chemical
##  [1] 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4
obs <- c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
obs
##  [1] 73 68 74 71 67 73 67 75 72 70 75 68 78 73 68 73 71 75 75 69
chemical<-as.fixed(chemical)
model2<-lm(obs~chemical) 
gad(model2)
## 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
## Residual 16 178.80 11.1750

Since our calculated p-value (0.7644) is greater than \(\alpha=0.15\) we canโ€™t reject the null hypothesis.

3 Question 3

We can see in first question that we used block on bolts, and we got our p value as 0.1211 which was less than 0.15 , hence we reject Null Hypothesis. But on the other hand in Q2) we did not consider block on bolts (replication) where resulted in a p value of 0.7644 which is greater than 0.15, hence we fail to reject Null Hypothesis.

As the error caused by the block (bolts) in the question 1 results was large, by removing this factor, this error will be transferred to the residual, were it will reduce our F value drastically. This indicates that by using block on bolts, we are taking into account a significant source of nuisance variability. Therefore, it makes sense to use blocks in this experiment.