Question 4.3
Testing Hypothesis:
Null Hypothesis:
\(H_0\) : \(\mu_1\) = \(\mu_2\) = \(\mu_3\) = \(\mu_4\)
\(\tau_i\) = 0 \(\forall\) i
Alternate Hypothesis:
\(H_a\) : Atleast one \(\mu_i\) differs
\(\tau_i \neq\) 0 \(\exists\) i
Linear Effects equation :
\(y_{i,j}\) = \(\mu\) + \(\tau_i\) + \(\beta_j\) + \(\epsilon_{ij}\)
\(\mu\) = Grand mean,
\(\tau_i\) = Fixed effects for treatment ‘i’
\(\beta_j\) = Block effect for ‘j’.
\(\epsilon_{i , j}\) = Random error
At \(\alpha\) = 0.05,
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.
obs <- c(73,68,74,71,67,
73,67,75,72,70,
75,68,78,73,68,
73,71,75,75,69)
chem <- c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
bolts <- c(rep(seq(1,5),4))
chem <- as.fixed(chem)
bolts <- as.fixed(bolts)
Running the model with blocked observations
model <- lm(obs~chem+bolts)
gad(model)
## Analysis of Variance Table
##
## Response: obs
## 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 :
As p value is 0.1211 > 0.05, we cannot reject the null hypothesis.
Question 4.16:
By using excel I found out the grand mean as \(\mu\) = 71.75
Averages of types of chemicals :
\(y_1.\) = 70.6
\(y_2.\) = 71.4
\(y_3.\) = 72.4
\(y_4.\) = 72.6
Averages of types of bolts :
\(y_.1\) = 73.5
\(y_.2\) = 68.5
\(y_.3\) = 75.5
\(y_.4\) = 72.75
\(y_.5\) = 68.5
values of \(\tau_i\) :
\(\tau_1\) = -1.15
\(\tau_2\) = -0.35
\(\tau_3\) = 0.65
\(\tau_4\) = 0.85
Values of \(\beta_j\) :
\(\beta_1\) = 1.75
\(\beta_2\) = -3.25
\(\beta_3\) = 3.75
\(\beta_4\) = 1
\(\beta_5\) = -3.25
Question 4.22:
Hypothesis :
Null hypothesis :
\(H_0\) : \(\tau_1\) = \(\tau_2\) = \(\tau_3\) = \(\tau_4\) = \(\tau_5\)
\(\tau_i\) = 0 ( \(\forall\) i )
Alternate Hypothesis :
\(H_a\) = atleast one \(\tau_i\) differs
\(\tau_i\neq\) 0 ( \(\exists\) i)
Linear Effects equation :
\(y_{i,j}\) = \(\mu\) + \(\tau_i\) + \(\beta_j\) + \(\alpha_k\) + \(\epsilon_{ijk}\)
\(\mu\) = Grand mean,
\(\tau_i\) = Effects for treatment ‘i’
\(\beta_j\) = Block-1 effect.
\(\alpha_k\) = Block-2 effect.
\(\epsilon_{ijk}\) = Random error.
i = number of treatments.
j = number of blocks.
k = replications.
At \(\alpha\) = 0.05 :
batch <- c(rep(1,5), rep(2,5), rep(3,5), rep(4,5),rep(5,5))
day <- c(rep(seq(1,5),5))
letter <- c("A", "B", "D", "C", "E",
"C", "E", "A", "D", "B",
"B", "A", "C", "E", "D",
"D", "C", "E", "B", "A",
"E", "D", "B", "A", "C")
observations <- c(8,7,1,7,3,
11,2,7,3,8,
4,9,10,1,5,
6,8,6,6,10,
4,2,3,8,8)
batch <- as.factor(batch)
letter <- as.factor(letter)
day <- as.factor(day)
performing ANOVA analysis:
anova <- aov(observations~batch+letter+day)
summary(anova)
## Df Sum Sq Mean Sq F value Pr(>F)
## batch 4 15.44 3.86 1.235 0.347618
## letter 4 141.44 35.36 11.309 0.000488 ***
## day 4 12.24 3.06 0.979 0.455014
## Residuals 12 37.52 3.13
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
We observe that P- value of letter group is significantly smaller than 0.05. So we conclude that A,B,C,D,E have significant effect on the reaction time.