We are testing the Null hypothesis:
\[ H_{0}: \mu _{1} = \mu _{2} = \mu _{3} = \mu _{4} \]
Or \[\tau _{i}=0\forall "i"\]
Compared to the alternative hypothesis:
\(H_{1}:\) One of the \(\mu _{1}\) differs
Compared to \[\tau _{i}\neq 0\exists "i"\]
Linear Effect Equation: \[X_{ij}= \mu + \tau _{i}+\beta _{j}+\epsilon _{ijk}\]
For the experiment when alpha is 0.5
μ is the grand mean value
τi is the fixed effects for treatment i
Where βj is the block effect for j
Where ϵij is the random error
Getting our our data we have
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.
chemical<- c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
bolt<- c(rep(seq(1,5),4))
obs<- c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
chemical <- as.fixed(chemical)
bolt<- as.fixed(bolt)
model <- lm(obs~chemical+bolt)
gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical 3 12.95 4.317 2.3761 0.1211
## bolt 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: With a P value (0.1211) less than 0.15, we reject the Null hypothesis
Assume now that she didn’t block on Bolt and rather ran the experiment at a completely randomized design on random pieces of cloth, resulting in the following data. Analyze the data from this experiment (use alpha=0.15) and draw appropriate conclusions. Be sure to state the linear effects model and hypotheses being tested.
We are testing the Null hypothesis:
\[ H_{0}: \mu _{1} = \mu _{2} = \mu _{3} = \mu _{4} \]
Or \[\tau _{i}=0\forall "i"\]
Compared to the alternative hypothesis:
\(H_{1}:\) One of the \(\mu _{1}\) differs
Compared to \[\tau _{i}\neq 0\exists "i"\]
Linear Effect Equation: \[Y_{ij}= \mu + \tau _{i}+\epsilon _{ij}\]
for the experiment when alpha is 0.15 (Unblocked Observation)
observation2 <- c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
model2 <- lm(observation2~chemical)
gad(model2)
## Analysis of Variance Table
##
## Response: observation2
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical 3 12.95 4.3167 0.3863 0.7644
## Residual 16 178.80 11.1750
Our P value (0.7644) is greater than 0.15 so we do not reject the null hypothesis.
Here are some info and conclusion about the two questions:
We can conclude from this that there are nuisance variability when we block so we reject the hypothesis.
#Loading the experiment for question 1
chemical<- c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
bolt<- c(rep(seq(1,5),4))
obs<- c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
library(GAD)
chemical <- as.fixed(chemical)
bolt<- as.fixed(bolt)
model <- lm(obs~chemical+bolt)
gad(model)
#Question 2
observation <- c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
model2 <- lm(observation~chemical)
gad(model2)