Question 4.3

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 a = 0.05) and draw appropriate conclusions.

Reading Data

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)
dafr <- data.frame(chem1,chem2,chem3,chem4)
dafr <- stack(dafr)
colnames(dafr) <- c('Numbers','Type')
library(GAD)
dafr$Type <- as.fixed(dafr$Type)
dafr$Bolt <- c(rep(seq(1,5),4))
dafr$Bolt <- as.fixed(dafr$Bolt)

Our linear model effects equation:

\(Y_{i,j}\) = \(\mu\) + \(\tau_i\) + \(\beta_j\) + \(\epsilon_{i,j}\)

Where we are testing to see if \(\tau_i\) (the effect of different chemicals) is equal to 0 or not.

Null Hypothesis: Ho: \(\tau_i=0\)

Alternative Hypothesis: Ha: \(\tau_i\neq0\)

We will perform a Randomized Complete Block Design test, with bolt type being blocked (since we are considering bolt type to be a significant source of nuisance variability), and testing chemical types.

Analysis

model <- lm(Numbers~Type+Bolt,dafr)
gad(model)
## Analysis of Variance Table
## 
## Response: Numbers
##          Df Sum Sq Mean Sq F value    Pr(>F)    
## Type      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

Our p-value is 0.1211, so at 0.05 level of significance we fail to reject Ho, and thus we conclude that different chemical agents do not have a significant effect on the mean strength.

Question 4.16

Assuming that chemical types and bolts are fixed, estimate the model parameters \(\tau_i\) and \(\beta_j\) in Problem 4.3.

By use of excel we can find grand average of all the observations which would serve as a point estimate of grand mean. Also we can calculate through excel, averages of 4 chemical types and of 5 bolt types.

\(\mu=71.75\)

Averages of chemical types:

\(Y_{1,.}=70.6\)

\(Y_{2,.}=71.4\)

\(Y_{3,.}=72.4\)

\(Y_{4,.}=72.6\)

Averages of bolt types:

\(Y_{.,1}=73.5\)

\(Y_{.,2}=68.5\)

\(Y_{.,3}=75.5\)

\(Y_{.,4}=72.75\)

\(Y_{.,5}=68.5\)

Calculating \(\tau_i\):

\(\tau_1\) = \(Y_{1,.}\) - \(\mu\) = -1.15

\(\tau_2\) = \(Y_{2,.}\) - \(\mu\) = -0.35

\(\tau_3\) = \(Y_{3,.}\) - \(\mu\) = 0.65

\(\tau_4\) = \(Y_{4,.}\) - \(\mu\) = 0.85

Calculating \(\beta_j\):

\(\beta_1\) = \(Y_{.,1}\) - \(\mu\) = 1.75

\(\beta_2\) = \(Y_{.,2}\) - \(\mu\) = -3.25

\(\beta_3\) = \(Y_{.,3}\) - \(\mu\) = 3.75

\(\beta_4\) = \(Y_{.,4}\) - \(\mu\) = 1

\(\beta_5\) = \(Y_{.,5}\) - \(\mu\) = -3.25

Question 4.22

The effect of five different ingredients (A, B, C, D, E) on the reaction time of a chemical process is being studied. Each batch of new material is only large enough to permit five runs to be made. Furthermore, each run requires approximately 1.5 hours, so only five runs can be made in one day. The experimenter decides to run the experiment as a Latin square so that day and batch effects may be systematically controlled. She obtains the data that follow.

Reading Data

Obs <- 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 <- c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5)
Day <- c(rep(seq(1,5),5))
Ingredient <- c(1,2,4,3,5,3,5,1,4,2,2,1,3,5,4,4,3,5,2,1,5,4,2,1,3)
Batch <- as.factor(Batch)
Day <- as.factor(Day)
Ingredient <- as.factor(Ingredient)
Data <- data.frame(Obs, Batch, Day, Ingredient)
str(Data)
## 'data.frame':    25 obs. of  4 variables:
##  $ Obs       : num  8 7 1 7 3 11 2 7 3 8 ...
##  $ Batch     : Factor w/ 5 levels "1","2","3","4",..: 1 1 1 1 1 2 2 2 2 2 ...
##  $ Day       : Factor w/ 5 levels "1","2","3","4",..: 1 2 3 4 5 1 2 3 4 5 ...
##  $ Ingredient: Factor w/ 5 levels "1","2","3","4",..: 1 2 4 3 5 3 5 1 4 2 ...

Data is arranged in an orthogonal Latin square.

Our linear model effects equation:

\(Y_{i,j,k}\) = \(\mu\) + \(\tau_i\) + \(\beta_j\) + \(\alpha_k\) + \(\epsilon_{i,j,k}\)

Assuming \(\tau_i\) is the ingredient effect, and thus we define our null and alternative hypotheses as

Null Hypothesis: Ho: \(\tau_i=0\)

Alternative Hypothesis: Ha: \(\tau_i\neq0\)

Analysis

aov.model<-aov(Obs~Ingredient+Batch+Day,data=Data)
summary(aov.model)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## Ingredient   4 141.44   35.36  11.309 0.000488 ***
## Batch        4  15.44    3.86   1.235 0.347618    
## 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

Since our p-value for the ANOVA analysis w.r.t. ingredients is much smaller than 0.05, thus we reject the null hypothesis and thus we conclude that thereโ€™s a significant effect of ingredients on the mean reaction times of chemical processes.