Flipped Assignment 11

Shubham Singh, Manas Verma, Renkun Wang

Question 1 :

Equations :

Null Hypothesis -

\[ H_0 : \mu_1 = \mu_2 = \mu_3 = \mu_4 = 0 \]

Identifying the factor Chemical agent 4 levels 1,2,3,4 and

block which is bolt of cloth 5 level 1,2,3,4,5

Linear effect equation

\[ y_{i j} = \mu + \tau_i + \beta j + \varepsilon{ij} \]

library (GAD) 
observation <- c(73,68,74,71,73,67,75,72,75,68,78,73,73,71,75,75)
chem <- c(rep(1,4),rep(2,4),rep(3,4),rep(4,4))
bolt <- c(rep(seq(1,4),4))
bolt <- as.random(bolt)
chem <- as.fixed(chem)

df <- data.frame(observation,chem ,bolt)
model <- lm(observation~chem+ bolt)
gad (model)
## $anova
## Analysis of Variance Table
## 
## Response: observation
##           Df  Sum Sq Mean Sq F value    Pr(>F)    
## chem       3  14.187   4.729  2.7349 0.1057217    
## bolt       3 104.188  34.729 20.0843 0.0002515 ***
## Residuals  9  15.563   1.729                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Conclusion : P value is 0.1057 < 0.15 so we reject null hypothesis

Question 2 :

Equations :

Null Hypothesis -

\[ H_0 : \mu_1 = \mu_2 = \mu_3 = \mu_4 = 0 \]

Identifying the factor Chemical agent 4 levels 1,2,3,4

Linear effect equation

\[ y_{i j} = \mu + \tau_i + \varepsilon{ij} \]

obs2 <- c(73,68,74,71,73,67,75,72,75,68,78,73,73,71,75,75)
mod2 <- lm(obs2~chem)
gad(mod2)
## $anova
## Analysis of Variance Table
## 
## Response: obs2
##           Df  Sum Sq Mean Sq F value Pr(>F)
## chem       3  14.187  4.7292  0.4739 0.7062
## Residuals 12 119.750  9.9792

Conclusion : P value here is 0.7062 >0.15 thus, we fail to reject null hypothesis

Question 3:

Yes the Bolt of cloth represents a significant source of nuisance variability as it changed our decision of rejecting null hypothesis. Since, there was a difference in p values when blocked and un-blocked significantly.

In the CRD causes that variability to inflate the error term, making it harder to detect any real differences among chemicals.

Code :

library (GAD) 
observation <- c(73,68,74,71,73,67,75,72,75,68,78,73,73,71,75,75)
chem <- c(rep(1,4),rep(2,4),rep(3,4),rep(4,4))
bolt <- c(rep(seq(1,4),4))
bolt <- as.random(bolt)
chem <- as.fixed(chem)

df <- data.frame(observation,chem ,bolt)
model <- lm(observation~chem+ bolt)
gad (model)
obs2 <- c(73,68,74,71,73,67,75,72,75,68,78,73,73,71,75,75)
mod2 <- lm(obs2~chem)
gad(mod2)