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
Calculating p values from obtained f stastic values :
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? we know that degrees of freedom for factor A is I-1 = 1,
degrees of freedom of interaction is (I-1)(J-1) = 3
1*(J-1) = 3,
J=3+1, J=4.
(c) How many replicates of the experiment were performed?
we know thart degrees of freedom of error = IJ(k-1) = 8,
2*4*(k-1) = 8,
k-1 = 1,
k = 2.
So, number of replicates run are k = 2 replicates per level.
(d) What conclusions would you draw about this experiment?
Assuming meeting of constant variance and normality conditions, p value for factor b is 0.09335 < 0.10 we reject null hypothesis (\(H_{0}\)) with 90% confidence. and p values for the interaction and factor A are > 0.1, so we fail to reject null hypothesis.
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.
dat<-read.csv("D:/Dowthyaksai/TTU/DOE/hw week 9.csv")
dat
## X Drill.Speed Feed.Rate Thrust.Force
## 1 1 125 0.015 2.70
## 2 2 125 0.015 2.78
## 3 3 125 0.030 2.45
## 4 4 125 0.030 2.49
## 5 5 125 0.045 2.60
## 6 6 125 0.045 2.72
## 7 7 125 0.060 2.75
## 8 8 125 0.060 2.86
## 9 9 200 0.015 2.83
## 10 10 200 0.015 2.86
## 11 11 200 0.030 2.85
## 12 12 200 0.030 2.80
## 13 13 200 0.045 2.86
## 14 14 200 0.045 2.87
## 15 15 200 0.060 2.94
## 16 16 200 0.060 2.88
Changing the some variables from integer to factors.
dat$Drill.Speed <- as.factor(dat$Drill.Speed)
dat$Feed.Rate <- as.factor(dat$Feed.Rate)
str(dat)
## 'data.frame': 16 obs. of 4 variables:
## $ X : int 1 2 3 4 5 6 7 8 9 10 ...
## $ 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 ...
Analysis of variance model
model <- lm(Thrust.Force ~ Drill.Speed+Feed.Rate+Drill.Speed:Feed.Rate, dat)
anova(model)
## 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
The p-values of both the factors and the interaction < 0.05, we reject null hypothesis(\(H_{0}\)). As the interaction is significant we have to produce interaction graph to observe each interaction.
interaction.plot(x.factor = dat$Feed.Rate, trace.factor = dat$Drill.Speed, response = dat$Thrust.Force, fun = mean, type = "b", col = c("green", "blue"), fixed = TRUE)
#for 5.2)
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
#for 5.9)
dat<-read.csv("D:/Dowthyaksai/TTU/DOE/hw week 9.csv")
dat
## X Drill.Speed Feed.Rate Thrust.Force
## 1 1 125 0.015 2.70
## 2 2 125 0.015 2.78
## 3 3 125 0.030 2.45
## 4 4 125 0.030 2.49
## 5 5 125 0.045 2.60
## 6 6 125 0.045 2.72
## 7 7 125 0.060 2.75
## 8 8 125 0.060 2.86
## 9 9 200 0.015 2.83
## 10 10 200 0.015 2.86
## 11 11 200 0.030 2.85
## 12 12 200 0.030 2.80
## 13 13 200 0.045 2.86
## 14 14 200 0.045 2.87
## 15 15 200 0.060 2.94
## 16 16 200 0.060 2.88
dat$Drill.Speed <- as.factor(dat$Drill.Speed)
dat$Feed.Rate <- as.factor(dat$Feed.Rate)
str(dat)
## 'data.frame': 16 obs. of 4 variables:
## $ X : int 1 2 3 4 5 6 7 8 9 10 ...
## $ 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 ...
model <- lm(Thrust.Force ~ Drill.Speed+Feed.Rate+Drill.Speed:Feed.Rate, dat)
anova(model)
## 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
interaction.plot(x.factor = dat$Feed.Rate, trace.factor = dat$Drill.Speed, response = dat$Thrust.Force, fun = mean, type = "b", col = c("green", "blue"), fixed = TRUE)