Question 5.4
(a) Analyze the data and draw conclusions. Use alpha 0.05.
Model Equation yijk=μ+αi+βj+αβij+ϵijk
library(GAD)
## Warning: package 'GAD' was built under R version 4.2.2
## Loading required package: matrixStats
## Loading required package: R.methodsS3
## R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
Feed_rate <- c(rep(1,12),rep(2,12),rep(3,12))
depth <- rep(seq(1,4),9)
Feed_rate <- as.fixed(Feed_rate)
depth <- as.fixed(depth)
observation <- 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)
Test1 <- aov(observation~Feed_rate+depth+Feed_rate*depth)
summary(Test1)
## Df Sum Sq Mean Sq F value Pr(>F)
## Feed_rate 2 3160.5 1580.2 55.018 1.09e-09 ***
## depth 3 2125.1 708.4 24.663 1.65e-07 ***
## Feed_rate:depth 6 557.1 92.8 3.232 0.018 *
## Residuals 24 689.3 28.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
c) Obtain point estimates of the mean surface finish at each feed
rate.
Feed_rate1 <- c(74,79,82,99,64,68,88,104,60,73,92,96)
Feed_rate2 <- c(92,98,99,104,86,104,108,110,88,88,95,99)
Feed_rate3 <- c(99,104,108,114,98,99,110,111,102,95,99,107)
Feed_rate1_mean <- mean(Feed_rate1)
Feed_rate2_mean <- mean(Feed_rate2)
Feed_rate3_mean <- mean(Feed_rate3)
Feed_rate1_mean
## [1] 81.58333
Feed_rate2_mean
## [1] 97.58333
Feed_rate3_mean
## [1] 103.8333
a) The p-value of interaction is less then level of signifance
(0.05) Therefore we reject the Null Hypothesis.
b) The Residual plots we can conclude that our variance is not
equal
C) point estimate of the mean surface finish at each feed rate
d) p-values
Feed rate = 1.09e-09
Depth = 1.65e-07
Interaction = 0.01797
Question 5.34
library(GAD)
observation <- c(74,79,82,99,92,98,99,104,99,104,108,114,64,68,88,104,86,104,108,110,98,99,110,111,60,73,92,96,88,88,95,99,102,95,99,107)
block <- c(rep(1,12),rep(2,12),rep(3,12))
block
## [1] 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3
Feed_rate <- c(rep(0.20,4),rep(0.25,4),rep(0.30,4))
Feed_rate
## [1] 0.20 0.20 0.20 0.20 0.25 0.25 0.25 0.25 0.30 0.30 0.30 0.30
Feed_rate<- rep(Feed_rate,3)
Feed_rate
## [1] 0.20 0.20 0.20 0.20 0.25 0.25 0.25 0.25 0.30 0.30 0.30 0.30 0.20 0.20 0.20
## [16] 0.20 0.25 0.25 0.25 0.25 0.30 0.30 0.30 0.30 0.20 0.20 0.20 0.20 0.25 0.25
## [31] 0.25 0.25 0.30 0.30 0.30 0.30
depth<- rep(seq(1,4),9)
depth
## [1] 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
block <- as.fixed(block)
Feed_rate<- as.fixed(Feed_rate)
depth <- as.fixed(depth)
Test2<- lm(observation~block+Feed_rate*depth)
gad(Test2)
## Analysis of Variance Table
##
## Response: observation
## Df Sum Sq Mean Sq F value Pr(>F)
## block 2 180.67 90.33 3.9069 0.035322 *
## Feed_rate 2 3160.50 1580.25 68.3463 3.635e-10 ***
## depth 3 2125.11 708.37 30.6373 4.893e-08 ***
## Feed_rate:depth 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
plot(Test2)




block_1 <- c(74,79,82,99,92,98,99,104,99,104,108,114)
block_2 <- c(64,68,88,104,86,104,108,110,98,99,110,111)
block_3 <- c(60,73,92,96,88,88,95,99,102,95,99,107)
block_1 <- var(block_1)
block_2 <- var(block_2)
block_3 <- var(block_3)
block_1
## [1] 146.5455
block_2
## [1] 261.2424
block_3
## [1] 169.6061
The p value of the 0.007258 < level of significance = 0.05
we have sufficient evidence to reject the null hypothesis
Question 13.5
position <- c(rep(1,9),rep(2,9))
temperature <- rep(c("800","825","850"),6)
observation <- c(570,1063,565,565,1080,510,583,1043,590,528,988,526,547,1026,538,521,1004,532)
data<-data.frame(position,temperature,observation)
library(GAD)
position <- as.random(position)
temperature <- as.fixed(temperature)
Test3 <- aov(observation~position+temperature+position*temperature)
GAD::gad(Test3)
## Analysis of Variance Table
##
## Response: observation
## 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 is 0.00176 < 0.05 level of
signifance
The temperature p value 0.0008647< 0.05 level of signifance
Question 13.6
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<-rep(c(rep(1,3), rep(2,3)), 10)
observation<-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)
data1<-data.frame(partno,Operators, observation)
library(GAD)
partno <-as.random(partno)
Operators<-as.fixed(Operators)
Test4<-aov(observation~partno+Operators+partno*Operators)
gad(Test4)
## Analysis of Variance Table
##
## Response: observation
## Df Sum Sq Mean Sq F value Pr(>F)
## partno 9 99.017 11.0019 7.3346 3.216e-06 ***
## Operators 1 0.417 0.4167 0.6923 0.4269
## partno:Operators 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 the Part Number 3.216e-06 < 0.05 level of
signifance so the Part Number is significant effect.
The p value for the Operators of 0.4269 > 0.05 level of
signifance so the Operator does not have a significant effect.