library(GAD)
library(knitr)
library(kableExtra)
An engineer suspects that the surface finishh of a metal part is influenced by the feed rate and the depth of cut. He selects three feed rates and four depths of cut. He then conducts a factorial experiment and obtains the following data.
FeedRate <- c(rep("0.20",12),rep("0.25",12),rep("0.30",12))
DoCs <- c("0.15","0.18","0.20","0.25")
DoC <- c(rep(DoCs,9))
Response <- 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)
FinishData <- data.frame(FeedRate,DoC,Response)
Analyze the data and draw conclusions. Use \(\alpha=0.05\).
\(y_{ijk} + \alpha_i + \beta_j + \alpha\beta_{ij} + \epsilon{ijk}\)
\(H_0: \alpha_i=0\) for all i
\(H_a: \alpha_i\neq0\) for some i
\(H_0: \beta_j=0\) for all j
\(H_a: \beta_j\neq0\) for some j
\(H_0: \alpha\beta_{ij}=0\) for all ij
\(H_a: \alpha\beta_{ij}\neq0\) for some ij
FinishData$FeedRate <- as.fixed(FinishData$FeedRate)
FinishData$DoC <- as.fixed(FinishData$DoC)
FinishDataModel <- aov(Response~FeedRate+DoC+FeedRate*DoC,data=FinishData)
GAD::gad(FinishDataModel)
## Analysis of Variance Table
##
## Response: Response
## Df Sum Sq Mean Sq F value Pr(>F)
## FeedRate 2 3160.50 1580.25 55.0184 1.086e-09 ***
## DoC 3 2125.11 708.37 24.6628 1.652e-07 ***
## FeedRate:DoC 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
GAD resulted in a p-value for Feed Rate of \(1.086*10^{-9} < 0.05\), meaning the Feed Rate is significant and we reject \(H_0\).
GAD resulted in a p-value for Depth of Cut of \(1.652*10^{-7} < 0.05\), meaning the Depth of Cut is significant and we reject \(H_0\).
GAD resulted in a p-value for Feed Rate-Depth of Cut Interaction of \(0.01797 < 0.05\), meaning the Interaction effect is significant and we reject \(H_0\).
Prepare appropriate residual plots and comment on the model’s adequacy.
plot(FinishDataModel,1:2)
The residual plot and normal probability plots tell us that the data has constant variance and is normally distributed, meaning our model is adequate.
Obtain point estimates of the mean surface finish at each feed rate.
mean(FinishData$Response[1:12])
## [1] 81.58333
mean(FinishData$Response[13:24])
## [1] 97.58333
mean(FinishData$Response[25:36])
## [1] 103.8333
The mean surface finish for a Feed Rate of 0.20 in/min is 81.583.
The mean surface finish for a Feed Rate of 0.25 in/min is 97.583.
The mean surface finish for a Feed Rate of 0.30 in/min is 103.833.
Find the P-values for the tests in part (a).
Feed Rate: \(1.086*10^-9\)
Depth of Cut: \(1.652*10^-7\)
Feed Rate - Depth of Cut Interaction: \(0.01797\)
Reconsider the experiment in Problem 5.4 Suppose that this experiment had been conducted in three blocks, with each replicate a block. Assume that the observations in the data table are given in order, that is, the first observation in each cell comes from the first replicate, and so on. Reanalyze the data as a factorial experiment in blocks and estimate the variance component for blocks. Does it appear that blocking was useful in this experiment?
FeedRate <- c(rep("0.20",12),rep("0.25",12),rep("0.30",12))
DoCs <- c("0.15","0.18","0.20","0.25")
DoC <- c(rep(DoCs,9))
Blocks <- c(rep("Block1",4),rep("Block2",4),rep("Block3",4))
Block <- c(rep(Blocks,3))
Response <- 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)
FinishData2 <- data.frame(FeedRate,DoC,Block,Response)
\(H_0: \alpha_i=0\) for all i
\(H_a: \alpha_i\neq0\) for some i
\(H_0: \beta_i=0\) for all j
\(H_a: \beta_i\neq0\) for some j
\(H_0: \gamma_k=0\) for all k
\(H_a: \gamma_k\neq0\) for some k
\(H_0: \alpha\beta_{ij}=0\) for all ij
\(H_a: \alpha\beta_{ij}\neq0\) for some ij
FinishData2$FeedRate <- as.fixed(FinishData2$FeedRate)
FinishData2$DoC <- as.fixed(FinishData2$DoC)
FinishData2$Block <- as.fixed(FinishData2$Block)
FinishDataModel2 <- aov(Response~FeedRate+DoC+Block+FeedRate*DoC,data=FinishData2)
GAD::gad(FinishDataModel2)
## Analysis of Variance Table
##
## Response: Response
## Df Sum Sq Mean Sq F value Pr(>F)
## FeedRate 2 3160.50 1580.25 68.3463 3.635e-10 ***
## DoC 3 2125.11 708.37 30.6373 4.893e-08 ***
## Block 2 180.67 90.33 3.9069 0.035322 *
## FeedRate:DoC 6 557.06 92.84 4.0155 0.007258 **
## Residual 22 508.67 23.12
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
With blocking, GAD resulted in a p-value for Feed Rate of \(3.635*10^{-10} < 0.05\), meaning the Feed Rate is significant and we reject \(H_0\).
With blocking, GAD resulted in a p-value for Depth of Cut of \(4.893*10^{-8} < 0.05\), meaning the Depth of Cut is significant and we reject \(H_0\).
With blocking, GAD resulted in a p-value for Feed Rate-Depth of Cut Interaction of \(0.007258 < 0.05\), meaning the Interaction effect is significant and we reject \(H_0\).
GAD resulted in a p-value for the Block of \(0.035322 < 0.05\), meaning the block has a significant effect.
Blocking did not change any of the conclusions of significance from Problem 5.4, so we can say that it was not very useful in this experiment.
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.
Position <- c(1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2)
Temperature <- c(800,825,850,800,825,850,
800,825,850,800,825,850,
800,825,850,800,825,850)
Density <- c(570,1063,565,565,1080,510,
583,1043,590,528,988,526,
547,1026,538,521,1004,532)
BakingData <- data.frame(Position,Temperature,Density)
Position <- as.random(Position)
Temperature <- as.fixed(Temperature)
BakingModelA <- aov(Density~Position+Temperature+Position*Temperature)
gad(BakingModelA)
## Analysis of Variance Table
##
## Response: Density
## Df Sum Sq Mean Sq F value Pr(>F)
## Position 1 7160 7160 15.998 0.0017624 **
## Temperature 2 945342 472671 1155.518 0.0008647 ***
## Position:Temperature 2 818 409 0.914 0.4271101
## Residual 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The p-value for Position of \(0.0017624 < 0.05\) means the Position does have a significant effect.
The p-value for Temperature \(0.0008647 < 0.05\) means the Temperature does have a significant effect.
The p-value for Position-Temperature Interaction of \(0.4271101 > 0.05\) means the Position-Temperature Interaction is not significant.
Reanalyze the measurement systems experiment in Problem 13.1, assuming that operators are a fixed factor. Estimate the appropriate model components using the ANOVA method.
PartNo <- 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))
Operators <- c("Op1","Op1","Op1","Op2","Op2","Op2")
Operator <- c(rep(Operators,10))
Measurements <- 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(PartNo,Operator,Measurements)
Dat13.6$PartNo <- as.random(Dat13.6$PartNo)
Dat13.6$Operator <- as.fixed(Dat13.6$Operator)
Model13.6 <- aov(Measurements~PartNo+Operator+PartNo*Operator,data=Dat13.6)
gad(Model13.6)
## Analysis of Variance Table
##
## Response: Measurements
## Df Sum Sq Mean Sq F value Pr(>F)
## PartNo 9 99.017 11.0019 7.3346 3.216e-06 ***
## Operator 1 0.417 0.4167 0.6923 0.4269
## PartNo:Operator 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
The p-value for Part Number of \(3.216*10^{-6} < 0.05\) means the Part Number does have a significant effect.
The p-value for Operator of \(0.4269 > 0.05\) means the Operator does not have a significant effect.
The p-value for Part Number - Operator Interaction of \(0..9270 > 0.05\) means the Part Number - Operator Interaction is not significant.