5.4)

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.
FeedRate <- c(rep("0.20",12),rep("0.25",12),rep("0.30",12))
DoC <- c("0.15","0.18","0.20","0.25")
DepthofCut <- c(rep(DoC,9))
SurfaceFinish <- 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.4 <- data.frame(FeedRate,DepthofCut,SurfaceFinish)

a) Analyze the data and draw conclusions. Use alpha=0.05.

Model equation :

\(y_{ij}\) = \(\mu\) + \(\alpha_{i}\) + \(\beta_{j}\) + \(\alpha\beta_{ij}\) + \(\epsilon_{ijk}\)

Interaction Hypothesis :

Null Hypothesis : \(\alpha\beta_{ij}\) = 0 \(\forall\) i

Alternate Hypothesis : \(\alpha\beta_{ij}\) \(\neq\) 0 \(\exists\) i

Main effect Hypothesis :

Null Hypothesis : \(\alpha_{i}\) = 0 \(\forall\) i

Alternate Hypothesis : \(\alpha_{i}\) \(\neq\) 0 \(\exists\) i

Null Hypothesis : \(\beta_{j}\) = 0 \(\forall\) j

Alternate Hypothesis : \(\beta_{j}\) \(\neq\) 0 \(\exists\) j


Manipulating the data:

dat5.4$FeedRate <- as.fixed(dat5.4$FeedRate)
dat5.4$DepthofCut <- as.fixed(dat5.4$DepthofCut)
model5.4 <- aov(dat5.4$SurfaceFinish ~ dat5.4$FeedRate + dat5.4$DepthofCut + dat5.4$FeedRate*dat5.4$DepthofCut)
gad(model5.4)
## Analysis of Variance Table
## 
## Response: dat5.4$SurfaceFinish
##                                   Df  Sum Sq Mean Sq F value    Pr(>F)    
## dat5.4$FeedRate                    2 3160.50 1580.25 55.0184 1.086e-09 ***
## dat5.4$DepthofCut                  3 2125.11  708.37 24.6628 1.652e-07 ***
## dat5.4$FeedRate:dat5.4$DepthofCut  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
interaction.plot(x.factor = dat5.4$FeedRate, trace.factor = dat5.4$DepthofCut,response = dat5.4$SurfaceFinish, col = c("red", "blue"),type = "b")

p-value for interactions is 0.01797 < 0.05, we reject H0 and we can conclude that the interaction between FeedRate and DepthofCut is significant.

As the interaction is significant we don’t check significance for individual factors (Main effects).

b) Prepare appropriate residual plots and comment on the model’s adequacy.

plot(model5.4,1:2)

From the normal probability plot and the residual plot we can observe that the data has constant variance and is normally distributed, so the model is adequate.

C) Obtain point estimates of the mean surface finish at each feed rate.

mean(dat5.4$SurfaceFinish[1:12])
## [1] 81.58333
mean(dat5.4$SurfaceFinish[13:24])
## [1] 97.58333
mean(dat5.4$SurfaceFinish[25:36])
## [1] 103.8333

The mean surface finish at “0.20”Feed Rate is 81.58333

The mean surface finish at “0.25”Feed Rate is 97.58333

The mean surface finish at “0.30”Feed Rate is 103.8333

D)Find the P-values for the tests in part (a).

The p-value for Feed Rate in part a is 1.086e-09.

The p-value for Depth of Cut in part a is 1.652e-07.

The p-value for interaction between Feed Rate and Depth of Cut is 0.01797.

5.34)

library(GAD)
bl <- c(rep("block1",4),rep("block2",4),rep("block3",4))
block <- c(rep(bl,3))
dat5.34 <- data.frame(FeedRate,DepthofCut,block,SurfaceFinish)

Model equation :

\(y_{ij}\) = \(\mu\) + \(\alpha_{i}\) + \(\beta_{j}\) +\(\gamma_{k}\) \(\alpha\beta_{ij}\) + \(\epsilon_{ijkl}\)

Interaction Hypothesis :

Null Hypothesis : \(\alpha\beta_{ij}\) = 0 \(\forall\) i

Alternate Hypothesis : \(\alpha\beta_{ij}\) \(\neq\) 0 \(\exists\) i

Main effect Hypothesis :

Null Hypothesis : \(\alpha_{i}\) = 0 \(\forall\) i

Alternate Hypothesis : \(\alpha_{i}\) \(\neq\) 0 \(\exists\) i

Null Hypothesis : \(\beta_{j}\) = 0 \(\forall\) j

Alternate Hypothesis : \(\beta_{j}\) \(\neq\) 0 \(\exists\) j

manipulating the data:

dat5.34$FeedRate <- as.fixed(dat5.34$FeedRate)
dat5.34$DepthofCut <- as.fixed(dat5.34$DepthofCut)
model5.34 <- aov(dat5.34$SurfaceFinish ~ dat5.34$FeedRate + dat5.34$DepthofCut + dat5.34$block + dat5.34$FeedRate*dat5.34$DepthofCut)
summary(model5.34)
##                                     Df Sum Sq Mean Sq F value   Pr(>F)    
## dat5.34$FeedRate                     2 3160.5  1580.2  68.346 3.64e-10 ***
## dat5.34$DepthofCut                   3 2125.1   708.4  30.637 4.89e-08 ***
## dat5.34$block                        2  180.7    90.3   3.907  0.03532 *  
## dat5.34$FeedRate:dat5.34$DepthofCut  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

The p-value of the blocks is 0.035322.

The p value for the interaction of is 0.007258 < 0.05. So, we reject H0 and conclude that there is significant interaction between feed rate and depth of cut .

It doesn’t appear that blocking was useful(effective) in this experiment.

13.5)

library(GAD)
position <- c(rep("1",9),rep("2",9))
tem <- c("800","825","850")
temp <- c(rep(tem,6))
bdensity <- c(570,1063,565,
              565,1080,510,
              583,1043,590,
              528,988,526,
              547,988,526,
              521,1004,532)
dat13.5 <- data.frame(position,temp,bdensity)

Manipulating the data

dat13.5$position <- as.random(dat13.5$position)
dat13.5$temp <- as.fixed(dat13.5$temp)
model13.5 <- aov(dat13.5$bdensity ~ dat13.5$position + dat13.5$temp + dat13.5$position*dat13.5$temp)
gad(model13.5)
## Analysis of Variance Table
## 
## Response: dat13.5$bdensity
##                               Df Sum Sq Mean Sq  F value    Pr(>F)    
## dat13.5$position               1   9293    9293  23.4025 0.0004067 ***
## dat13.5$temp                   2 924834  462417 683.3190 0.0014613 ** 
## dat13.5$position:dat13.5$temp  2   1353     677   1.7041 0.2231370    
## Residual                      12   4765     397                       
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

The p-value of interaction is 0.2231370 > 0.05. SO, the interaction is insignificant.

The p-value of position is 0.0004067 < 0.05. So, the effect of position is significant.

The p-value of temperature is 0.0014613 < 0.05. So, the temperature have a significant effect in this experiment.

13.6)

library(GAD)
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))
op1 <- c(rep("op1",3),rep("op2",3))
op <- c(rep(op1,10))
units <- 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)
dat13.6 <- data.frame(part,op,units)

Model equation :

\(y_{ij}\) = \(\mu\) + \(\alpha_{i}\) + \(\beta_{j}\) + \(\alpha\beta_{ij}\) + \(\epsilon_{ijk}\)

Interaction Hypothesis :

Null Hypothesis : \(\alpha\beta_{ij}\) = 0 \(\forall\) i

Alternate Hypothesis : \(\alpha\beta_{ij}\) \(\neq\) 0 \(\exists\) i

Main effect Hypothesis :

Null Hypothesis : \(\alpha_{i}\) = 0 \(\forall\) i

Alternate Hypothesis : \(\alpha_{i}\) \(\neq\) 0 \(\exists\) i

Null Hypothesis : \(\beta_{j}\) = 0 \(\forall\) j

Alternate Hypothesis : \(\beta_{j}\) \(\neq\) 0 \(\exists\) j

Manipulating the data:

dat13.6$op <- as.fixed(dat13.6$op)
dat13.6$part <- as.random(dat13.6$part)
model13.6 <- aov(dat13.6$units ~ dat13.6$part + dat13.6$op + dat13.6$part*dat13.6$op)
gad(model13.6)
## Analysis of Variance Table
## 
## Response: dat13.6$units
##                         Df Sum Sq Mean Sq F value    Pr(>F)    
## dat13.6$part             9 99.017 11.0019  7.3346 3.216e-06 ***
## dat13.6$op               1  0.417  0.4167  0.6923    0.4269    
## dat13.6$part:dat13.6$op  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

p-value of interaction is 0.9270 > 0.05. So the interaction between part number and operator is insignificant.

p-value of operator is 0.4269 > 0.05. So, the effect of operator is insignificant in this experiment.

P-value of part is 3.216e-06 < 0.05. So, the part selected is significant i this experiment.