PART A:
---> Finding degrees of freedom for source B:
Dof_total<-15
Dof_error<-8
Dof_interaction<-3
Dof_A<-1
Dof_B<-Dof_total-Dof_error-Dof_interaction-Dof_A
print(Dof_B)
## [1] 3
---> Finding SSA:
MSA<-0.0002
SSA<-MSA*Dof_A
print(SSA)
## [1] 2e-04
---> Finding MSB, MSAB and MSE:
SSB<-180.378
SSAB<-8.479
SSE<-158.797
MSB<-SSB/Dof_B
MSAB<-SSAB/Dof_interaction
MSE<-SSE/Dof_error
print(MSB)
## [1] 60.126
print(MSAB)
## [1] 2.826333
print(MSE)
## [1] 19.84962
----> Finding F-Statistic Values:
Fa<-MSA/MSE
Fb<-MSB/MSE
Fab<-MSAB/MSE
print(Fa)
## [1] 1.007576e-05
print(Fb)
## [1] 3.029075
print(Fab)
## [1] 0.1423872
----> Finding P-Values:
pf(0.00001007576,1,8, lower.tail = FALSE)
## [1] 0.9975451
pf(3.0290,3,8, lower.tail = FALSE)
## [1] 0.09335136
PART B: (Levels of Source B)
LevelsofB<-Dof_B+1
b<-LevelsofB
print(b)
## [1] 4
---> Levels of B = 4
PART C: (Replicates of the Experiment)
LevelsofA<-Dof_A+1
a<-LevelsofA
#Dof_Total: 15 = a*b*n - 1
#a*b*n = 16
#n=16/a*b
n<-16/(a*b)
print(n)
## [1] 2
---> Replicates are runs with the same levels/factor combination, i.e. k=2 replicates per level set
PART D: (Conclusions)
Comparing F-Statistic Values with Critical Values of F:
Testing Interaction Effect:
Fcritical_interaction=qf(0.9317,3,8)
print(Fcritical_interaction)
## [1] 3.52881
—> Since F-Statistic (0.1424) < F-Critical (3.528), we fail to reject Null Hypothesis and say that interaction is insignificant.
Testing Main Effects:
Fcritical_A=qf(0.998,1,8)
print(Fcritical_A)
## [1] 20.25712
—> Since F-Statistic (0.00000101) < F-Critical (20.25), we fail to reject Null Hypothesis and say that Factor A is insignificant at any reasonable level of alpha.
Fcritical_B=qf(0.093,3,8)
print(Fcritical_B)
## [1] 0.180005
—> Since F-Statistic (3.029) > F-Critical (0.18), we reject Null Hypothesis and say that Factor B is significant.
Effects Model Equation:
\[ y_{i,j,k}=\mu+\alpha_{i}+\beta_{j}+\alpha\beta_{i,j}+\epsilon_{i,j,k} \]
where,
\(\alpha_{i}\) is the main effect of the ith treatment of Feed Rate used
\(\beta_{j}\) is the main effect of the
jth treatment of Drill Speed used
\(\alpha\beta_{i,j}\) is the
interaction effect of the ijth treatment of Feed Rate * Drill Speed,
and
\(\epsilon_{i,j,k}\) is the random
error term
Hypothesis:
Feed Rate Main Effect:
\[ H_o: \alpha_{i}=0 \space\forall\space"i" \]
\[H_a:
\alpha_{i}\neq0\space"for\space ateast\space
one\space"i"\]
Drill Speed Main Effect:
\[ H_o:\beta_{j}=0\space\forall "i" \]
\[ H_a: \beta_{i}\neq0\space"for\space ateast\space one\space"j"\]
Feed Rate * Drill Speed Interaction Effect:
\[ H_o:\alpha\beta_{i,j}=0\space \forall\space"i" \]
\[\alpha\beta_{i,j}\neq0\space"for\space
ateast\space one\space"i,j"\]
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)
dataframe1 <- data.frame(FeedRate,DrillSpeed,ThrustForce)
library(GAD)
FeedRate <- as.fixed(FeedRate)
DrillSpeed <- as.fixed(DrillSpeed)
model <- aov(ThrustForce~FeedRate+DrillSpeed+FeedRate*DrillSpeed)
GAD::gad(model)
## Analysis of Variance Table
##
## Response: ThrustForce
## Df Sum Sq Mean Sq F value Pr(>F)
## FeedRate 3 0.092500 0.030833 11.8590 0.002582 **
## DrillSpeed 1 0.148225 0.148225 57.0096 6.605e-05 ***
## FeedRate:DrillSpeed 3 0.041875 0.013958 5.3686 0.025567 *
## Residual 8 0.020800 0.002600
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Conclusion:
—> 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.