Question 3.10a
Test Hypothesis
Ho: \(\mu_1 = \mu_2 = \mu_3 = \mu_4 = \mu_5\) - Null Hypothesis
Ha: At least 1 differs - Alternative Hypothesis
w1<-data.frame("cottonstrength"=c(7,7,15,11,9))
w2<-data.frame("cottonstrength"=c(12,17,12,18,18))
w3<-data.frame("cottonstrength"=c(14,19,19,18,18))
w4<-data.frame("cottonstrength"=c(19,25,22,19,23))
w5<-data.frame("cottonstrength"=c(7,10,11,15,11))
cottonlv<-factor(rep(c("lv15%","lv20%","lv25%","lv30%","lv35%"), each=5))
wstrength<-rbind(w1,w2,w3,w4,w5)
wstrength$cottonlv<-cottonlv
str(wstrength)
## 'data.frame': 25 obs. of 2 variables:
## $ cottonstrength: num 7 7 15 11 9 12 17 12 18 18 ...
## $ cottonlv : Factor w/ 5 levels "lv15%","lv20%",..: 1 1 1 1 1 2 2 2 2 2 ...
plot(wstrength$cottonlv, wstrength$cottonstrength, main = "boxplot cotton strength at different weight levels", ylab="cotton strength")
From the plot, it appears that the strength of the cotton content has a positive response to the increment in amount of cotton weight percentages with an exception to the level at 35% cotton weight. Further analysis of the variance can depict a clear picture of the evidence to support the claim that cotton content affects the mean tensile strength
Analysis of variance
wstrength_model<-aov(cottonstrength~cottonlv, data=wstrength)
summary(wstrength_model)
## Df Sum Sq Mean Sq F value Pr(>F)
## cottonlv 4 475.8 118.94 14.76 9.13e-06 ***
## Residuals 20 161.2 8.06
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Critical value
qf(0.95, 4, 20)
## [1] 2.866081
Hence /fo/ = 14.76 > 2.866 \(z\) critical value
Conclusion
From the result /fo/ is 14.76 with a corresponding p-value of 0.00000913 is less than \(\alpha\) = 0.05. Therefore we reject Ho that the means are equal, and conclude that at least one of the means differs. Hence, there is evidence to support the claim that cotton content affects the mean tensile strength
Question 3.7a
Test Hypothesis
Ho: \(\mu_1 = \mu_2 = \mu_3 = \mu_4\) - Null Hypothesis
Ha: At least 1 differs - Alternative Hypothesis
t1<-data.frame("ten_strength"=c(3129,3000,2865,2890))
t2<-data.frame("ten_strength"=c(3200,3300,2975,3150))
t3<-data.frame("ten_strength"=c(2800,2900,2985,3050))
t4<-data.frame("ten_strength"=c(2600,2700,2600,2765))
Mixgroup<-factor(rep(c("mixtr1", "mixtr2", "mixtr3", "mixtr4"), each = 4))
TensileS<-rbind(t1,t2,t3,t4)
TensileS$Mixgroup<-Mixgroup
str(TensileS)
## 'data.frame': 16 obs. of 2 variables:
## $ ten_strength: num 3129 3000 2865 2890 3200 ...
## $ Mixgroup : Factor w/ 4 levels "mixtr1","mixtr2",..: 1 1 1 1 2 2 2 2 3 3 ...
TensileS_model<-aov(ten_strength~Mixgroup, data = TensileS)
summary(TensileS_model)
## Df Sum Sq Mean Sq F value Pr(>F)
## Mixgroup 3 489740 163247 12.73 0.000489 ***
## Residuals 12 153908 12826
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Critical value
qf(0.95, 3, 12)
## [1] 3.490295
Hence /fo/ = 12.73 > 3.490 \(z\) critical value
Conclusion
From the result /fo/ is 12.73 with a corresponding p-value of 0.000489 is less than \(\alpha\) = 0.05. Therefore we reject Ho that the means are equal, and conclude that at least one of the means differs. Hence, there is evidence to support the claim that mixing technique affects the strength of cement
Question 3.20a
Test Hypothesis
Ho: \(\mu_1 = \mu_2 = \mu_3 = \mu_4\) - Null Hypothesis
Ha: At least 1 differs - Alternative Hypothesis
r1<-data.frame("comp_strength"=c(1530,1530,1440))
r2<-data.frame("comp_strength"=c(1610,1650,1500))
r3<-data.frame("comp_strength"=c(1560,1730,1530))
r4<-data.frame("comp_strength"=c(1500,1490,1510))
rodlvs<-factor(rep(c("lv10","lv15","lv20","lv25"), each=3))
ACIdata<-rbind(r1,r2,r3,r4)
ACIdata$rodlvs<-rodlvs
str(ACIdata)
## 'data.frame': 12 obs. of 2 variables:
## $ comp_strength: num 1530 1530 1440 1610 1650 1500 1560 1730 1530 1500 ...
## $ rodlvs : Factor w/ 4 levels "lv10","lv15",..: 1 1 1 2 2 2 3 3 3 4 ...
ACIdata_model<-aov(comp_strength~rodlvs, data = ACIdata)
summary(ACIdata_model)
## Df Sum Sq Mean Sq F value Pr(>F)
## rodlvs 3 28633 9544 1.865 0.214
## Residuals 8 40933 5117
Critical value
qf(0.95, 3, 8)
## [1] 4.066181
Hence /fo/ = 1.865 < 4.066 \(z\) critical value
Conclusion
From the result /fo/ is 1.865 with a corresponding p-value of 0.214 is greater than \(\alpha\) = 0.05. Therefore we fail to reject Ho that the means are equal, and conclude there is no evidence to support the claim that different rodding level affects the comprehensive strength
3b
Calculating p-value
pf(1.865, 3, 8, lower.tail = FALSE)
## [1] 0.2138423
The p-value for \(F\) statistic in part (a) is 0.2138423
Question 3.10a
w1<-data.frame("cottonweight"=c(7,7,15,11,9))
w2<-data.frame("cottonweight"=c(12,17,12,18,18))
w3<-data.frame("cottonweight"=c(14,19,19,18,18))
w4<-data.frame("cottonweight"=c(19,25,22,19,23))
w5<-data.frame("cottonweight"=c(7,10,11,15,11))
cottonlv<-factor(rep(c("lv15%","lv20%","lv25%","lv30%","lv35%"), each=5))
wstrength<-rbind(w1,w2,w3,w4,w5)
wstrength$cottonlv<-cottonlv
str(wstrength)
plot(wstrength$cottonlv, wstrength$cottonweight, main = "boxplot cotton weight at different levels", ylab="cotton weights")
wstrength_model<-aov(cottonweight~cottonlv, data=wstrength)
summary(wstrength_model)
qf(0.95, 4, 20)
Question 3.7a
t1<-data.frame("ten_strength"=c(3129,3000,2865,2890))
t2<-data.frame("ten_strength"=c(3200,3300,2975,3150))
t3<-data.frame("ten_strength"=c(2800,2900,2985,3050))
t4<-data.frame("ten_strength"=c(2600,2700,2600,2765))
Mixgroup<-factor(rep(c("mixtr1", "mixtr2", "mixtr3", "mixtr4"), each = 4))
TensileS<-rbind(t1,t2,t3,t4)
TensileS$Mixgroup<-Mixgroup
str(TensileS)
TensileS_model<-aov(ten_strength~Mixgroup, data = TensileS)
summary(TensileS_model)
qf(0.95, 3, 12)
Question 3.20a
r1<-data.frame("comp_strength"=c(1530,1530,1440))
r2<-data.frame("comp_strength"=c(1610,1650,1500))
r3<-data.frame("comp_strength"=c(1560,1730,1530))
r4<-data.frame("comp_strength"=c(1500,1490,1510))
rodlvs<-factor(rep(c("lv10","lv15","lv20","lv25"), each=3))
ACIdata<-rbind(r1,r2,r3,r4)
ACIdata$rodlvs<-rodlvs
str(ACIdata)
ACIdata_model<-aov(comp_strength~rodlvs, data = ACIdata)
summary(ACIdata_model)
qf(0.95, 3, 8)
Question 3b
pf(1.865, 3, 8, lower.tail = FALSE)