This report captures work done for the individual homework for Week 9. R code along with the results are provided. The required homework problems were taken from “Design and Analysis of Experiments 8th Edition”:
1) 5.2
2) 5.9
Setting things up:
# setup Libraries
library(tinytex)
library(agricolae)
library(knitr)
library(dplyr)
library(tidyr)
library(GAD)
| Source | DF | SS | MS | F | P |
|---|---|---|---|---|---|
| A | 1 | 0.0002 | 0.0002 | 0.0000101 | 0.998 |
| B | 3 | 180.378 | 60.126 | 3.029 | 0.093 |
| Interaction | 3 | 8.479 | 2.826 | 0.142 | 0.932 |
| Error | 8 | 158.797 | 19.84963 | ||
| Total | 15 | 347.653 |
The formulas used for populating the above table were:
B degrees of freedom = DF(Total) - DF(Error)- DF(Interaction) - DF(A)
= 15 - 8 - 3 - 1 = 3
SSA = MSA * DF(A) = .0002 * 1 = .0002
MSB = SSB / DF(B) = 180.378 / 3 = 60.126
MSAB = SSAB / DF(AB) = 8.479 / 3 = 2.826
MSE = SSE / DF(Error) = 158.797 / 8 = 19.84963
F(A) = MSA / MSE = .0002 / 19.84963 = .0000101
F(B) = MSB / MSE = 60.126 / 19.84963 = 3.0290749
F(AB) = MSAB / MSE = 2.8263 / 19.84963 = .14239
P-values were generated by using a calculator.
The parameters of each were:
P-value for A: DF(numerator) = 1 ; DF(denominator) = 8 ; F-Value = .0000101 = P-value 0.99755
P-value for B: DF(numerator) = 3 ; DF(denominator) = 8 ; F-Value = 3.029 = P-value 0.09335
How many levels were used for factor B?
Levels of B = b = DF(B) + 1 = 3 +1 = 4
How many replicates of the experiment were performed?
DF(Total): 15 = abn -1
24n - 1 = 15
8n = 16 n = 2
What conclusions would you draw about this experiment?
Factor A is insignificant at any reasonable level of alpha
Factor B is significant to an alpha of 0.10
The interaction effect is insignificant.
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 (refer to book for results). Analyze the data and draw conclusions. Use \(\alpha\) = 0.05.
The Linear Effects for this Model are:
\(\quad y_{ijk}\) = \(\mu\) + \(\alpha_i\) + \(\beta_j\) + \(\alpha \beta_{ij}\) \(\epsilon_{ijk}\)
Where:
\(\quad \alpha_i\) is the main effect of the \(\ i^{th}\) treatment of Feed Rate used
\(\quad \beta_j\) is the main effect of the \(\ j^{th}\) treatment of Drill Speed used
\(\quad \alpha \beta_{ij}\) is the interaction effect of the \(\ ij^{th}\) treatment of Feed Rate * Drill Speed, and
\(\quad \epsilon_{ijk}\) is the random error term.
The Hypotheses we will test are:
Feed Rate Main Effect:
\(\quad H_0\) : \(\alpha_i\) = 0 \(\forall\) i
\(\quad H_a\) : \(\alpha_i \neq\) 0 for at least one \(\ i\)
Drill Speed Main Effect:
\(\quad H_0\) : \(\beta_j\) = 0 \(\forall\) j
\(\quad H_a\) : \(\beta_j \neq\) 0 for at least one \(\ j\)
Feed Rate * Drill Speed Interaction Effect:
\(\quad H_0\) : \(\alpha \beta_{ij}\) = 0 \(\forall\) ij
\(\quad H_a\) : \(\alpha \beta_{ij} \neq\) 0 for at least one \(\ ij\)
\(\quad\)at a significance level of \(\alpha\) = 0.05
FeedRate <- rep(seq(1,4),4)
DrillSpeed <- c(rep(1,8),rep(2,8))
ThrustForce <- c(2.70,2.45,2.60,2.75,
2.78,2.49,2.72,2.86,
2.83,2.85,2.86,2.94,
2.86,2.80,2.87,2.88)
mydataframe <- data.frame(FeedRate,DrillSpeed,ThrustForce)
FeedRate <- as.fixed(FeedRate)
DrillSpeed <- as.fixed(DrillSpeed)
model <- aov(ThrustForce~FeedRate+DrillSpeed+FeedRate*DrillSpeed)
GAD::gad(model)
We evaluate the hypothesis for the interaction effect first and find that at a p-value of 0.0256 and a significance level of 0.05, we reject the null hypothesis. There is enough information to conclude that the interaction between Feed Rate and Drill Speed is significant. We stop testing at this point and don’t proceed to the main effects.