Problem 1
Testing the hypothesis
observations y = μ + τi +βj +ϵi,j
where μ = Grand mean
τi = fixed effects for treatment i
βj = Block effect for j
ϵi,j = Random Error
Null Hypothesis (Ho): U1=U2=U3=U4
Alternative Hypothesis(Ha): Atleast one of the U differs.
It has fixed effects so we can test the hypothesis.
Here Null Hypothesis (Ho)= τi= 0
Alternate Hypothesis (Ha)= τi ≠ 0
Importing and sorting DATA
library(GAD)
## 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.
chem1<-c(73,68,74,71,67)
chem2<-c(73,67,75,72,70)
chem3<-c(75,68,78,73,68)
chem4<-c(73,71,75,75,69)
chemical<-c(chem1,chem2,chem3,chem4)
chem<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
chem<-as.fixed(chem)
bolts<-c(seq(1,5),seq(1,5),seq(1,5),seq(1,5))
bolts<-as.fixed(bolts)
model1<-lm(chemical~chem+bolts)
gad(model1)
## Analysis of Variance Table
##
## Response: chemical
## Df Sum Sq Mean Sq F value Pr(>F)
## chem 3 12.95 4.317 2.3761 0.1211
## bolts 4 157.00 39.250 21.6055 2.059e-05 ***
## Residual 12 21.80 1.817
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Conclusion: Here the p value is 0.121 and the alpha value given is 0.15. So we observe that the p value is less than alpha value. So there is conclusive evidence that we confidently reject the null hypothesis.
Problem 2
Null Hypothesis (Ho): U1=U2=U3=U4
Alternative Hypothesis(Ha): Atleast one of the U differs.
It has fixed effects so we can test the hypothesis.
Here Null Hypothesis (Ho)= τi= 0
Alternate Hypothesis (Ha)= τi ≠ 0
Linear Effects Equation
y = μ + τi + ϵi,j
where μ = Grand mean
τi = fixed effects for treatment i
ϵi,j = Random Error
Importing and sorting DATA
library(GAD)
chem1<-c(73,68,74,71,67)
chem2<-c(73,67,75,72,70)
chem3<-c(75,68,78,73,68)
chem4<-c(73,71,75,75,69)
chemical<-c(chem1,chem2,chem3,chem4)
chem<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
chem<-as.fixed(chem)
bolts<-c(seq(1,5),seq(1,5),seq(1,5),seq(1,5))
bolts<-as.fixed(bolts)
model2<-lm(chemical~chem)
gad(model2)
## Analysis of Variance Table
##
## Response: chemical
## Df Sum Sq Mean Sq F value Pr(>F)
## chem 3 12.95 4.3167 0.3863 0.7644
## Residual 16 178.80 11.1750
Here the p value (0.7644) is greater than alpha (0.15) therefore we fail to reject the null hypothesis. Therefore, the chemicals have the same effect on the strength.
Problem 3
We can clearly see that when blocking occurs there is significant increase in MSE and if we remove the block the nuisance gets taken away which makes a significant difference. The p value in first case with blocking was 0.1211 and in second case without blocking it was 0.7644.
So, we believe that the bolt of cloth represents significant amount of nuisance variablity.