Question No: 3.7
Tensile_Strength<-c(3129,3000,2865,2890,3200,3300,2975,3150,2800,2900,2985,3050,2600,2700,2600,2765)
Mixing_Technique<-c(rep(1,4),rep(2,4),rep(3,4),rep(4,4))
Mixing_Technique<-as.factor(Mixing_Technique)
dat<-cbind.data.frame(Tensile_Strength,Mixing_Technique)
Answer to the Question No: 3.7(c)
library(agricolae)
## Warning: package 'agricolae' was built under R version 4.1.3
model_aov<-aov(Tensile_Strength~Mixing_Technique, data = dat)
model_LSD<-LSD.test(model_aov, "Mixing_Technique", console = TRUE)
##
## Study: model_aov ~ "Mixing_Technique"
##
## LSD t Test for Tensile_Strength
##
## Mean Square Error: 12825.69
##
## Mixing_Technique, means and individual ( 95 %) CI
##
## Tensile_Strength std r LCL UCL Min Max
## 1 2971.00 120.55704 4 2847.624 3094.376 2865 3129
## 2 3156.25 135.97641 4 3032.874 3279.626 2975 3300
## 3 2933.75 108.27242 4 2810.374 3057.126 2800 3050
## 4 2666.25 80.97067 4 2542.874 2789.626 2600 2765
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 2.178813
##
## least Significant Difference: 174.4798
##
## Treatments with the same letter are not significantly different.
##
## Tensile_Strength groups
## 2 3156.25 a
## 1 2971.00 b
## 3 2933.75 b
## 4 2666.25 c
plot(model_LSD)
Hypothesis: Null Hypothesis (Ho): u1 = u2, u1 = u3, u1 = u4, u2 = u3, u2 = u4, u3 = u4.
Alternative Hypothesis (Ha): one of mean ui differ. From the LSD test and plots we can conclude that:
u1 = u3 - we fail to reject Null Hypothesis (Ho). u1=?u2, u1 =?u4, u2 =?u3, u2 =?u4, u3 =?u4
Answer to The Question No 3.7(d)
plot(model_aov)
Comment: The normal probability plot of the residuals is normally distributed as we could see, there is a strong normality assumption.
Answer to The Question No 3.7(e)
residuals <- resid(model_aov)
qqplot(dat$Tensile_Strength, residuals, main = "Residuals vs Tensile Strength", xlab = "Tensile Strength", ylab = "Residuals")
qqline(dat$Tensile_Strength, residuals)
## Warning in if (datax) {: the condition has length > 1 and only the first element
## will be used
Comment: The plot has the residuals values ranging form -150 to 150, the points are barely on the line.
Answer to The Question No: 3.7(f)
plot(Tensile_Strength, ylab = "Tensile Strength")
Comments: Scatter Plot of of the results to aid the interpretation of the results of the experiment.
Question: 3.10:
Observations<-c(7, 7, 15, 11, 9, 12, 17, 12, 18, 18, 14, 19, 19, 18, 18, 19, 25, 22, 19, 23, 7, 10, 11, 15, 11)
Cotton_Weight_percent<-c(rep(15,5),rep(20,5),rep(25,5),rep(30,5),rep(35,5))
Cotton_Weight_percent<-as.factor(Cotton_Weight_percent)
dat2<-cbind.data.frame(Observations, Cotton_Weight_percent)
Answer to the Question 3.10(b)
model_aov<-aov(Observations~Cotton_Weight_percent , data = dat2)
model_LSD<-LSD.test(model_aov, "Cotton_Weight_percent", console = TRUE)
##
## Study: model_aov ~ "Cotton_Weight_percent"
##
## LSD t Test for Observations
##
## Mean Square Error: 8.06
##
## Cotton_Weight_percent, means and individual ( 95 %) CI
##
## Observations std r LCL UCL Min Max
## 15 9.8 3.346640 5 7.151566 12.44843 7 15
## 20 15.4 3.130495 5 12.751566 18.04843 12 18
## 25 17.6 2.073644 5 14.951566 20.24843 14 19
## 30 21.6 2.607681 5 18.951566 24.24843 19 25
## 35 10.8 2.863564 5 8.151566 13.44843 7 15
##
## Alpha: 0.05 ; DF Error: 20
## Critical Value of t: 2.085963
##
## least Significant Difference: 3.745452
##
## Treatments with the same letter are not significantly different.
##
## Observations groups
## 30 21.6 a
## 25 17.6 b
## 20 15.4 b
## 35 10.8 c
## 15 9.8 c
plot(model_LSD)
Hypothesis: Null Hypothesis (Ho): u1 = u2, u1 = u3, u1 = u4, u1 = u5, u2 = u3, u2 = u4, u2 = u5, u3 = u4, u3 = u5, u4 = u5. Alternative Hypothesis (Ha): one of ui differ.
Concluding from the LSD test and plots. u1 = u5, u2 = u3 - we fail to reject Null Hypothesis (Ho).
u1 =? u2, u1 =? u3, u1 =? u4, u2 =? u4, u2 =? u5, u3 =? u4, u3 =? u5, u4 =? u5 - we reject Null Hypothesis (Ho).
where:
u1 = Mean of 15% Cotton Weight.
u2 = Mean of 20% Cotton Weight.
u3 = Mean of 25% Cotton Weight.
u4 = Mean of 30% Cotton Weight.
u5 = Mean of 35% Cotton Weight.
Answer to The Question No 3.10(c)
plot(model_aov)
Comments: The model seem inadequate, because of the shorter Residuals range of the few samples (25 and 20) and scattered arrangement.
Answer to The Question No: 3.44
library(pwr)
## Warning: package 'pwr' was built under R version 4.1.3
pwr.anova.test(k = 4, n = NULL, f = 2, sig.level = 0.05, power = 0.9)
##
## Balanced one-way analysis of variance power calculation
##
## k = 4
## n = 2.170367
## f = 2
## sig.level = 0.05
## power = 0.9
##
## NOTE: n is number in each group
Number of samples to choose from the given values is n = 2.17 ~ 3.
Answer to The Question No: 3.45(a)
pwr.anova.test(k = 4, n = NULL, f = sqrt(((60-50)^2)/36), sig.level = 0.05, power = 0.9)
##
## Balanced one-way analysis of variance power calculation
##
## k = 4
## n = 2.518782
## f = 1.666667
## sig.level = 0.05
## power = 0.9
##
## NOTE: n is number in each group
Number of samples to choose from the given values is n = 2.52 ~ 3.
Answer to The Question No: 3.45(b)
pwr.anova.test(k = 4, n = NULL, f = sqrt(((60-50)^2)/49), sig.level = 0.05, power = 0.9)
##
## Balanced one-way analysis of variance power calculation
##
## k = 4
## n = 2.939789
## f = 1.428571
## sig.level = 0.05
## power = 0.9
##
## NOTE: n is number in each group
Number of samples to choose from the given values is n = 2.94 ~ 3.
Answer to the Question No: 3.45(c)
From the analysis we could see that by increasing the values of sigma the number of samples required is increasing with increase in sigma and we are getting closer to the rounded-off value for the given values of u’s, power, and alpha, and effect size will also go down.
Answer to the Question No: 3.45(d)
The increase in the sigma is increasing the number of samples and decreasing the effect size. we could use this to get the close accurate results.