The following output was obtained from a computer program that performed a two-factor ANOVA on a factorial experiment.
Two-way ANOVA: y versus A, B Source DF SS MS F P A 1 _____ 0.0002 ______ ______ B __ 180.378 ______ ______ ______ Interaction 3 8.479 ______ ______ 0.932 Error 8 158.797 ______ Total 15 347.653
(a) Fill in the blanks in the ANOVA table. You can use bounds on the P-values.
Source DF SS MS F P A 1 0.0002 0.0002 1.0076e-5 0.9975 B 3 180.378 60.126 3.0290 0.09335 Interaction 3 8.479 2.826 0.1424 0.9317 Error 8 158.797 19.850 Total 15 347.653
#calculate some p values from f ratios
pf(0.000010076,1,8, lower.tail = FALSE)
## [1] 0.997545
pf(3.0290,3,8, lower.tail = FALSE)
## [1] 0.09335136
pf(0.1424,3,8, lower.tail = FALSE)
## [1] 0.9316887
(b) How many levels were used for factor B?
If (I-1) = 1 and (I-1)(J-1)=3, then (J-1)=3 and J=4 levels.
(c) How many replicates of the experiment were performed?
Replicates are runs with the same levels/factor combination, i.e. k=2 replicates per level set.
(d) What conclusions would you draw about this experiment?
Assuming constant variance and normality conditions are met, the interaction and factor A p values are < 0.10, so we cannot conclude that the interaction nor factor A are significant but the p value for factor b is < 0.10, so we can reject H0 with 90% confidence, so factor B is likely significant.
A mechanical engineer is studying the thrust force developed by a drill press. He suspects that the drilling speed and the feed rate of the material are the most important factors. He selects four feed rates and uses a high and low drill speed chosen to represent the extreme operating conditions. He obtains the following results.
# Read in the data table for 5.9
dat59<-read.csv("https://raw.githubusercontent.com/forestwhite/RStatistics/main/59Table.csv")
dat59
## Drill.Speed Feed.Rate Thrust.Force
## 1 125 0.015 2.70
## 2 125 0.015 2.78
## 3 125 0.030 2.45
## 4 125 0.030 2.49
## 5 125 0.045 2.60
## 6 125 0.045 2.72
## 7 125 0.060 2.75
## 8 125 0.060 2.86
## 9 200 0.015 2.83
## 10 200 0.015 2.86
## 11 200 0.030 2.85
## 12 200 0.030 2.80
## 13 200 0.045 2.86
## 14 200 0.045 2.87
## 15 200 0.060 2.94
## 16 200 0.060 2.88
Analyze the data and draw conclusions. Use α = 0.05.
With P-values < 0.05 for both factors and the interaction factor, we reject H0 and conclude that the drill speed, feed rate, and the interaction are significant. Because the interaction is significant, we must produce an interaction graph to determine the significance of each interaction.
# change factor variables into factors
dat59$Drill.Speed <- as.factor(dat59$Drill.Speed)
dat59$Feed.Rate <- as.factor(dat59$Feed.Rate)
str(dat59)
## 'data.frame': 16 obs. of 3 variables:
## $ Drill.Speed : Factor w/ 2 levels "125","200": 1 1 1 1 1 1 1 1 2 2 ...
## $ Feed.Rate : Factor w/ 4 levels "0.015","0.03",..: 1 1 2 2 3 3 4 4 1 1 ...
## $ Thrust.Force: num 2.7 2.78 2.45 2.49 2.6 2.72 2.75 2.86 2.83 2.86 ...
# Apply analysis of variance model
model59 <- lm(Thrust.Force ~ Drill.Speed+Feed.Rate+Drill.Speed:Feed.Rate, dat59)
anova(model59)
## Analysis of Variance Table
##
## Response: Thrust.Force
## Df Sum Sq Mean Sq F value Pr(>F)
## Drill.Speed 1 0.148225 0.148225 57.0096 6.605e-05 ***
## Feed.Rate 3 0.092500 0.030833 11.8590 0.002582 **
## Drill.Speed:Feed.Rate 3 0.041875 0.013958 5.3686 0.025567 *
## Residuals 8 0.020800 0.002600
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Produce an interaction plot
interaction.plot(x.factor = dat59$Feed.Rate,
trace.factor = dat59$Drill.Speed,
response = dat59$Thrust.Force,
fun = mean,
type="b", ### Show plot points as symbols
col=c("steelblue","firebrick2"), ### Colors for levels of trace var.
pch=c(19, 17, 15), ### Symbols for levels of trace var.
fixed=TRUE, ### Order by factor order in data
leg.bty = "o") ### Legend box
Here we display the complete R code used in this analysis.
#calculate some p values from f ratios
pf(0.000010076,1,8, lower.tail = FALSE)
pf(3.0290,3,8, lower.tail = FALSE)
pf(0.1424,3,8, lower.tail = FALSE)
# Read in the data table for 5.9
dat59<-read.csv("https://raw.githubusercontent.com/forestwhite/RStatistics/main/59Table.csv")
dat59
# change factor variables into factors
dat59$Drill.Speed <- as.factor(dat59$Drill.Speed)
dat59$Feed.Rate <- as.factor(dat59$Feed.Rate)
str(dat59)
# Apply analysis of variance model
model59 <- lm(Thrust.Force ~ Drill.Speed+Feed.Rate+Drill.Speed:Feed.Rate, dat59)
anova(model59)
# Produce an interaction plot
interaction.plot(x.factor = dat59$Feed.Rate,
trace.factor = dat59$Drill.Speed,
response = dat59$Thrust.Force,
fun = mean,
type="b", ### Show plot points as symbols
col=c("steelblue","firebrick2"), ### Colors for levels of trace var.
pch=c(19, 17, 15), ### Symbols for levels of trace var.
fixed=TRUE, ### Order by factor order in data
leg.bty = "o") ### Legend box