Q5.4)

frate <- c(rep("0.20",12),rep("0.25",12),rep("0.30",12))
x <- c("0.15","0.18","0.20","0.25")
dcut <- c(rep(x,9))
res <- c(74,79,82,99,64,68,88,104,60,73,92,96,92,98,99,104,86,104,108,110,88,88,95,99,99,104,108,114,98,99,110,111,102,95,99,107)
dat1 <- data.frame(frate,dcut,res)
dat1$frate <- as.fixed(dat1$frate)
dat1$dcut <-  as.fixed(dat1$dcut)

Q5.4a) Testing at alpha 0.05

Following is model equation

\(Y_{ijk}\) = \(\mu\) + \(\alpha_i\) + \(\beta_j\) + \(\alpha\beta_{ij}\) + \(\epsilon_{ijk}\)

As we know we always test the hypothesis of the larger term first

Here our Hypothesis are ,

Interaction Hypothesis

NUll Hypothesis : \(\alpha\beta_{ij} = 0\) For all ij

Alternative Hypothesis : \(\alpha\beta_{ij} \neq 0\) for some ij

Main effect Hypothesis

NUll Hypothesis : \(\alpha_i = 0\) For all i

Alternative Hypothesis : \(\alpha_i \neq 0\) for some i

NUll Hypothesis : \(\beta_j = 0\) For all j

Alternative Hypothesis : \(\beta_j \neq 0\) for some j

model <-  aov(res~frate+dcut+frate*dcut,data = dat1)
GAD::gad(model)
## Analysis of Variance Table
## 
## Response: res
##            Df  Sum Sq Mean Sq F value    Pr(>F)    
## frate       2 3160.50 1580.25 55.0184 1.086e-09 ***
## dcut        3 2125.11  708.37 24.6628 1.652e-07 ***
## frate:dcut  6  557.06   92.84  3.2324   0.01797 *  
## Residual   24  689.33   28.72                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

From above test as we can see p value for interaction is 0.01797 < 0.05 , hence we can say we reject Null Hypothesis . And claim that there is interaction between the two factors of feed rate and depth of cut

Also the p value of feed rate is 1.086e-06 which claims for alpha 0.05 , it will have significant effect on our model

For p value of depth of cut , it is 1.652e-07 < 0.05 , hence it also will have significant effect on our model.

As we determined that interaction is present hence to complete our test by adding a interaction plot for same

interaction.plot(frate,dcut,res)

Q5.4b) Residual plot and adequacy

plot(model)

We can see from above residual plot that all the residual in NPP falls fairly along striagth line and hence we can say it is almost Normally distributed .

And for residual vs fitted plot we can say the plot shows that varinace can be considered fairly constant

Q5.4 c) Point estimate

mean(dat1$res[1:12])
## [1] 81.58333
var(dat1$res[1:12])
## [1] 205.5379
mean(dat1$res[13:24])
## [1] 97.58333
var(dat1$res[13:24])
## [1] 64.08333
mean(dat1$res[25:36])
## [1] 103.8333
var(dat1$res[25:36])
## [1] 36.87879

We know point estimates are nothing but mean and varinace

Point estimate for feed rate 0.20

mean = 81.58 and varinace =205.53

Point estimate for feed rate 0.25

mean = 97.58 and varinace = 64.08

Point estimate for feed rate 0.30

mean = 103.83 and varinace =36.87

Q5.4 d)P values of test in part a

P values are as follows

For interaction of feedrate and depth of cut -: 0.01797

For main effect of depth of cut -: 1.652e-07

For main effect of feed rate -: 1.086e-09

Q5.34)

Following is model equation

\(Y_{ijkl}\) = \(\mu\) + \(\alpha_i\) + \(\beta_j\) + \(\gamma_k\) + \(\alpha\beta_{ij}\) + \(\epsilon_{ijkl}\)

Here model equation has a new term which is for block i.e \(\gamma_k\)

As we know we always test the hypothesis of the larger term first

Here our Hypothesis are ,

Interaction Hypothesis

NUll Hypothesis : \(\alpha\beta_{ij} = 0\) For all ij

Alternative Hypothesis : \(\alpha\beta_{ij} \neq 0\) for some ij

Main effect Hypothesis

NUll Hypothesis : \(\alpha_i = 0\) For all i

Alternative Hypothesis : \(\alpha_i \neq 0\) for some i

NUll Hypothesis : \(\beta_j = 0\) For all j

Alternative Hypothesis : \(\beta_j \neq 0\) for some j

frate <- c(rep("0.20",12),rep("0.25",12),rep("0.30",12))
x <- c("0.15","0.18","0.20","0.25")
dcut <- c(rep(x,9))
x2 <- c(rep("1",4),rep("2",4),rep("3",4))
block <- c(rep(x2,3))
res <- c(74,79,82,99,64,68,88,104,60,73,92,96,92,98,99,104,86,104,108,110,88,88,95,99,99,104,108,114,98,99,110,111,102,95,99,107)
dat5.34 <- data.frame(frate,dcut,block,res)
dat5.34$frate <- as.fixed(dat5.34$frate)
dat5.34$dcut <-  as.fixed(dat5.34$dcut)
dat5.34$block <- as.factor(dat5.34$block)
model5.34 <-  aov(res~frate+dcut+block+frate*dcut,data = dat5.34)
summary(model5.34)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## frate        2 3160.5  1580.2  68.346 3.64e-10 ***
## dcut         3 2125.1   708.4  30.637 4.89e-08 ***
## block        2  180.7    90.3   3.907  0.03532 *  
## frate:dcut   6  557.1    92.8   4.015  0.00726 ** 
## Residuals   22  508.7    23.1                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

We can see from above that p value of depth and feed interaction is 0.00726 , which is less than 0.05 , which further implies that there is interaction between both factors

we can also see the p value of feed is 3.64e-10 which is less than 0.05 , which implies that the feed has significant effect on our model

we can also see the p value of depth of cut is 4.89e-08 which is less than 0.05 , which implies that the feed has significant effect on our model

We can see p value of block is 0.03532 , which is less than 0.05 , which implies that the blocking was effective as it has significant effect on our model . Hence blocking was effective and also we can see The Sum of squared error without adding block was 689.33 and the SSE with block is 508.7 and In both the cases we reject the null hypothesis because p value was less than 0.05.So, blocking was good idea as its p value shows its significant and also it reduced SSE for us , which will further increase our fstat from 3.23 to 4.015

Variance component of Block

MSB = 90.3

MSE = 23.1

I = 3 and J = 4

i.e IJ = 12

var_b <- (90.3-23.1)/12
var_b
## [1] 5.6

We can see variance component of block is 5.6

As we said that interaction is present hence concluding our test by showing a interaction plot

interaction.plot(frate,dcut,res)

Q13.5) Suppose that in Problem 5.13 the furnace positions were randomly selected, resulting in a mixed model experiment.Reanalyze the data from this experiment under this new assumption. Estimate the appropriate model components using the ANOVA method.

Following is model equation

\(Y_{ijk}\) = \(\mu\) + \(\alpha_i\) + \(\beta_j\) + \(\alpha\beta_{ij}\) + \(\epsilon_{ijk}\)

As we know we always test the hypothesis of the larger term first

Here our Hypothesis are ,

Interaction Hypothesis

NUll Hypothesis : \(\sigma^2_{\alpha\beta} = 0\)

Alternative Hypothesis : \(\sigma^2_{\alpha\beta} \neq 0\)

Main effect Hypothesis

NUll Hypothesis : \(\sigma^2_{\alpha} = 0\)

Alternative Hypothesis : \(\sigma^2_{\alpha} \neq 0\)

NUll Hypothesis : \(\beta_j = 0\) For all j

Alternative Hypothesis : \(\beta_j \neq 0\) for some j

position <- c(rep(1,9),rep(2,9))
y <- c("800","825","850")
temp <- c(rep(y,6))
fresp <- c(570,1063,565,565,1080,510,583,1043,590,528,988,526,547,1026,538,521,1004,532)
dat135 <- data.frame(position,temp,fresp)
dat135$position <- as.random(dat135$position)
dat135$temp <- as.fixed(dat135$temp)
model135 <- aov(fresp~position+temp+position*temp,data = dat135)
GAD::gad(model135)
## Analysis of Variance Table
## 
## Response: fresp
##               Df Sum Sq Mean Sq  F value    Pr(>F)    
## position       1   7160    7160   15.998 0.0017624 ** 
## temp           2 945342  472671 1155.518 0.0008647 ***
## position:temp  2    818     409    0.914 0.4271101    
## Residual      12   5371     448                       
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

We can see from above test interaction p value is 0.427 > 0.05 , which implies that there is no interaction present between two factor .

For p value of position is 0.0017624 and for temperature is 0.0008647 , both are less than 0.05 , which implies both factors have significant effect on our model.

Q13.6) Reanalyze the measurement systems experiment inProblem 13.1, assuming that operators are a fixed factor.Estimate the appropriate model components using the ANOVA method.

Following is model equation

\(Y_{ijk}\) = \(\mu\) + \(\alpha_i\) + \(\beta_j\) + \(\alpha\beta_{ij}\) + \(\epsilon_{ijk}\)

As we know we always test the hypothesis of the larger term first

Here our Hypothesis are ,

Interaction Hypothesis

NUll Hypothesis : \(\sigma^2_{\alpha\beta} = 0\)

Alternative Hypothesis : \(\sigma^2_{\alpha\beta} \neq 0\)

Main effect Hypothesis

NUll Hypothesis : \(\sigma^2_{\alpha} = 0\)

Alternative Hypothesis : \(\sigma^2_{\alpha} \neq 0\)

NUll Hypothesis : \(\beta_j = 0\) For all j

Alternative Hypothesis : \(\beta_j \neq 0\) for some j

part <- c(rep(1,6),rep(2,6),rep(3,6),rep(4,6),rep(5,6),rep(6,6),rep(7,6),rep(8,6),rep(9,6),rep(10,6))
z <- c("1","1","1","2","2","2")
oper <- c(rep(z,10))
#z1 <- c("1","2","3","1","2","3")
#try <-  c(rep(z1,10))
rest <- c(50,49,50,50,48,51,52,52,51,51,51,51,53,50,50,54,52,51,49,51,50,48,50,51,48,49,48,48,49,48,52,50,50,52,50,50,51,51,51,51,50,50,52,50,49,53,48,50,50,51,50,51,48,49,47,46,49,46,47,48)
dat136 <- data.frame(part,oper,rest)
dat136$oper <- as.fixed(dat136$oper)
dat136$part <- as.random(dat136$part)
#dat136$try <- as.random(dat136$try)
model136 <-  aov(rest~part+oper+part*oper,data = dat136)
GAD::gad(model136)
## Analysis of Variance Table
## 
## Response: rest
##           Df Sum Sq Mean Sq F value    Pr(>F)    
## part       9 99.017 11.0019  7.3346 3.216e-06 ***
## oper       1  0.417  0.4167  0.6923    0.4269    
## part:oper  9  5.417  0.6019  0.4012    0.9270    
## Residual  40 60.000  1.5000                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

We can see from above that part and operator interaction p value is 0.927 > 0.05 , which implies that there is no significant interaction between part and operator

P value for part is 3.216e-06 , which is < 0.05 , which implies , part has significant effect on our model

P value for operator is 0.4269 , which is > 0.05 , which implies it does not have significant effect on our model.