Q13

A) Model Equation

\[ y_{ijk} = \mu +\tau_i + \beta_{j(i)} + \gamma_{k(ij)} + \epsilon_{(ijk)l}\\ \tau_i = Effect \; of \;process\\ \beta_{j(i)} = Effect \; of \; batches\\ \gamma_{k(ij)} = Effect \; of \; k^{th} \; batch \; with \; the \; i^{th} \; process\\ \epsilon_{(ijk)l} = Error \; term \; NID(0,\sigma^2) \] # B) Stating the hypothesis

\[ H_0: \mu_{\gamma_{k(ij)}}=0 \\ H_0: \mu_{\gamma_{k(ij)}} \not= 0 \] # C)

library(GAD)
## Loading required package: matrixStats
## Loading required package: R.methodsS3
## R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
values<-c(25,19,15,15,29,23,28,35,24,35,38,25,30,28,17,16,27,24,21,27,25,21,34,29,26,20,14,13,24,21,27,25,20,24,30,33)
batch<-as.random(rep(seq(1,4),9))
Obs<-as.fixed(c(rep(1,12),rep(2,12),rep(3,12)))
process<-as.fixed(rep(c(rep(1,4),rep(2,4),rep(3,4)),3))
dat<-data.frame(process,batch,Obs,values)
dat
##    process batch Obs values
## 1        1     1   1     25
## 2        1     2   1     19
## 3        1     3   1     15
## 4        1     4   1     15
## 5        2     1   1     29
## 6        2     2   1     23
## 7        2     3   1     28
## 8        2     4   1     35
## 9        3     1   1     24
## 10       3     2   1     35
## 11       3     3   1     38
## 12       3     4   1     25
## 13       1     1   2     30
## 14       1     2   2     28
## 15       1     3   2     17
## 16       1     4   2     16
## 17       2     1   2     27
## 18       2     2   2     24
## 19       2     3   2     21
## 20       2     4   2     27
## 21       3     1   2     25
## 22       3     2   2     21
## 23       3     3   2     34
## 24       3     4   2     29
## 25       1     1   3     26
## 26       1     2   3     20
## 27       1     3   3     14
## 28       1     4   3     13
## 29       2     1   3     24
## 30       2     2   3     21
## 31       2     3   3     27
## 32       2     4   3     25
## 33       3     1   3     20
## 34       3     2   3     24
## 35       3     3   3     30
## 36       3     4   3     33
model<-lm(values~process+batch%in%process)
gad(model)
## Analysis of Variance Table
## 
## Response: values
##               Df Sum Sq Mean Sq F value   Pr(>F)   
## process        2 446.06 223.028  3.5365 0.073563 . 
## process:batch  9 567.58  63.065  4.1965 0.002349 **
## Residual      24 360.67  15.028                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(model)

From the statistical analysis result, we can see that the interaction effect of process and batches are statistically significant, with a P-value of 0.002349.

The residual plots shows that the variance is not constant. However, the residual data looks fairly normal distributed.