Problem 1

Background

A chemist wishes to test the effect of four chemical agents on the strength of a particular type of cloth. Because there might be variability from one bolt to another, the chemist decides to use a randomized block design, with the bolts of cloth considered as blocks. She selects five bolts and applies all four chemicals in random order to each bolt. The resulting tensile strengths follow. Analyze the data from this experiment (use α=0.15) and draw appropriate conclusions. Be sure to state the linear effects model and hypotheses being tested.

Problem 1 Set Up

library(GAD)
## Loading required package: matrixStats
## Loading required package: R.methodsS3
## R.methodsS3 v1.8.1 (2020-08-26 16:20:06 UTC) successfully loaded. See ?R.methodsS3 for help.
chemical<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
bolt<-c(seq(1,5),seq(1,5),seq(1,5),seq(1,5))
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)

fixed effect equation: \[x_ij = \mu + \tau_i + \beta_j + \epsilon_ij\] \(\mu\) is average, \(\tau\) is treatment effect, \(\beta\) is block error, and \(\epsilon\) is error

Hypothesis: \[Ho: \mu1 = \mu2 = \mu3 = \mu4\] \[H1: at\ least\ one\ \mu\ is\ not\ equal\]

Problem 1

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

Based on the results of the anova table, chemical has a p-value of .1211 so at the \(\alpha\) = .15 level we reject the null and conclude that chemical has an effect on tensile strength.

Problem 2

Background

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 α=0.15) and draw appropriate conclusions. Be sure to state the linear effects model and hypotheses being tested.

Problem 2

model2<-lm(obs~chemical)
gad(model2)
## Analysis of Variance Table
## 
## Response: obs
##          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

Based on the results of the anova table, chemical has a p-value of .7644 so we would fail to reject the null and conclude that chemical has no effect on tensile strength.

Problem 3

Comment on any differences in the findings from questions 1 and 2. Do you believe that the Bolt of cloth represents a significant amount of nuisance variability?

Based on the differences between the two models, we believe that Bolt of cloth does indeed represent a significant amount of nuisance variability. The strongest evidence in our opinion comes from the first anova table, where the effect of bolt on tensile strength has a p-value of 2.059e-5, indicating that bolt has a significant effect at all levels. Without this block, the significance of the chemical is lost in the nuisance variability of the bolt.

Problem 3

Model3 <- lm(obs~bolt)
gad(Model3)
## Analysis of Variance Table
## 
## Response: obs
##          Df Sum Sq Mean Sq F value    Pr(>F)    
## bolt      4 157.00  39.250  16.942 1.952e-05 ***
## Residual 15  34.75   2.317                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Above statements are confirmed by doing an anova test just looking at tensile strength and bolt.

All Code Used

Below you will find a block containing all of the code used to generate this document

library(GAD)
chemical<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
bolt<-c(seq(1,5),seq(1,5),seq(1,5),seq(1,5))
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)

model2<-lm(obs~chemical)
gad(model2)

Model3 <- lm(obs~bolt)
gad(Model3)