6.8)

Hypotheses:

H0_A: Time is not significant

H1_A: Time is significant

H0_B: Culture Medium is not significant

H1_B: Culture Medium is significant

H0_AB: Interaction is not significant

H1_AB: Interaction is significant

I) Read In Data

Time <- c(rep(-1,6),rep(1,6),rep(-1,6),rep(1,6))
Medium <- c(rep(-1,6),rep(-1,6),rep(1,6),rep(1,6))
obs8 <- c(21,22,23,28,20,26,25,26,24,25,29,27,37,39,38,38,35,36,31,34,29,33,30,35)
dat8 <- data.frame(Time,Medium,obs8)

II) ANOVA and Models

model8 <- lm(obs8~Time*Medium, data = dat8)
coef(model8)
## (Intercept)        Time      Medium Time:Medium 
##   29.625000   -0.625000    4.958333   -1.958333
halfnormal(model8)
## Warning in halfnormal.lm(model8): halfnormal not recommended for models with
## more residual df than model df
## 
## Significant effects (alpha=0.05, Lenth method):
## [1] Medium      Time:Medium e8

interaction.plot(Medium,Time,obs8)

anova(model8)
plot(model8)

## hat values (leverages) are all = 0.1666667
##  and there are no factor predictors; no plot no. 5

Conclusions:

We can conclude based on the half-normal plot, the interaction plot, and the ANOVA table that Culture Medium and Interactions are significant. Therefore we reject the null hypothesis for B and AB and fail to reject the null hypothesis for A.

The residuals and NPP show that the data has relatively the same variance between A, B, and AB, and that the data is normal, respectively.

6.12)

Hypotheses:

H0_A: Arsenic Flow Rate is not significant

H1_A: Arsenic Flow Rate is significant

H0_B: Deposition Time is not significant

H1_B: Deposition Time is significant

H0_AB: Interaction is not significant

H1_AB: Interaction is significant

Read In Data

Arsenic <- c(rep(-1,4),rep(1,4),rep(-1,4),rep(1,4))
Deposition <- c(rep(-1,4),rep(-1,4),rep(1,4),rep(1,4))
Thickness <- c(14.037,16.165,13.972,13.907,13.880,13.860,14.032,13.914,14.821,14.757,14.843,14.878,14.888,14.921,14.415,14.932)
dat12 <- data.frame(Arsenic,Deposition,Thickness)

a) Factor Effects

model12 <- lm(Thickness~Arsenic*Deposition, data = dat12)
coef(model12)
##        (Intercept)            Arsenic         Deposition Arsenic:Deposition 
##          14.513875          -0.158625           0.293000           0.140750

The effect estimates are as follows:

(1) = 14.513875

A (Arsenic) = -0.158625

B (Deposition) = 0.293000

AB (Arsenic:Deposition) = 0.140750

b) ANOVA

anova(model12)

Based on the ANOVA table, we can see that the p-value for both factors and their interactions are greater than our alpha of 0.05. Therefore we fail to reject all three null hypotheses and conclude that Arsenic Flow Rate, Deposition Time, and their interaction are not significant

c) Regression Equation

\[ y (Thickness)=14.513875-0.158625(A)+0.293(B)+0.14075(AB)+Error \]

d) Analyze Residuals

plot(model12)

## hat values (leverages) are all = 0.25
##  and there are no factor predictors; no plot no. 5

The Residuals vs. Fitted Plot and the Normality Plot both show an outlier. Furthermore, the Residuals vs. Fitted Plot shows non-consistant variance.

e)

I would run a log or natural log transformation on the data to normalize the variance and hopefully reduce the size of the outlier.

6.21)

Hypotheses:

H0_A: Putt Length is not significant

H1_A: Putt Length is significant

H0_B: Putter Type is not significant

H1_B: Putter Type is significant

H0_C: Putt Break is not significant

H1_C: Putt Break is significant

H0_D: Putt Slope is not significant

H1_D: Putt Slope is significant

H0_AB: Interaction AB is not significant

H1_AB: Interaction AB is significant

H0_AC: Interaction AC is not significant

H1_AC: Interaction AC is significant

H0_AD: Interaction AD is not significant

H1_AD: Interaction AD is significant

H0_BC: Interaction BC is not significant

H1_BC: Interaction BC is significant

H0_BD: Interaction BD is not significant

H1_BD: Interaction BD is significant

H0_CD: Interaction CD is not significant

H1_CD: Interaction CD is significant

H0_ABC: Interaction ABC is not significant

H1_ABC: Interaction ABC is significant

H0_ABD: Interaction ABD is not significant

H1_ABD: Interaction ABD is significant

H0_ACD: Interaction ACD is not significant

H1_ACD: Interaction ACD is significant

H0_BCD: Interaction BCD is not significant

H1_BCD: Interaction BCD is significant

H0_ABCD: Interaction ABCD is not significant

H1_ABCD: Interaction ABCD is significant

Read In Data

Length <- c(rep(-1,7),rep(1,7),rep(-1,7),rep(1,7),rep(-1,7),rep(1,7),rep(-1,7),rep(1,7),rep(-1,7),rep(1,7),rep(-1,7),rep(1,7),rep(-1,7),rep(1,7),rep(-1,7),rep(1,7))

Type <- c(rep(-1,7),rep(-1,7),rep(1,7),rep(1,7),rep(-1,7),rep(-1,7),rep(1,7),rep(1,7),rep(-1,7),rep(-1,7),rep(1,7),rep(1,7),rep(-1,7),rep(-1,7),rep(1,7),rep(1,7))

Break <- c(rep(-1,7),rep(-1,7),rep(-1,7),rep(-1,7),rep(1,7),rep(1,7),rep(1,7),rep(1,7),rep(-1,7),rep(-1,7),rep(-1,7),rep(-1,7),rep(1,7),rep(1,7),rep(1,7),rep(1,7))

Slope <- c(rep(-1,7),rep(-1,7),rep(-1,7),rep(-1,7),rep(-1,7),rep(-1,7),rep(-1,7),rep(-1,7),rep(1,7),rep(1,7),rep(1,7),rep(1,7),rep(1,7),rep(1,7),rep(1,7),rep(1,7))

Distance <- c(10,18,14,12.5,19,16,18.5,
              0,16.5,4.5,17.5,20.5,17.5,33,
              4,6,1,14.5,12,14,5,
              0,10,34,11,25.5,21.5,0,
              0,0,18.5,19.5,16,15,11,
              5,20.5,18,20,29.5,19,10,
              6.5,18.5,7.5,6,0,10,0,
              16.5,4.5,0,23.5,8,8,8,
              4.5,18,14.5,10,0,17.5,6,
              19.5,18,16,5.5,10,7,36,
              15,16,8.5,0,0.5,9,3,
              41.5,39,6.5,3.5,7,8.5,36,
              8,4.5,6.5,10,13,41,14,
              21.5,10.5,6.5,0,15.5,24,16,
              0,0,0,4.5,1,4,6.5,
              18,5,7,10,32.5,18.5,8)
dat21 <- data.frame(Length,Type,Break,Slope,Distance)

a) Halfnormal Data and ANOVA

model21 <- lm(Distance~Length*Type*Break*Slope, data = dat21)
halfnormal(model21)
## Warning in halfnormal.lm(model21): halfnormal not recommended for models with
## more residual df than model df
## 
## Significant effects (alpha=0.05, Lenth method):
## [1] Length e95    e28    e44    e49    Type   e84    e32    e78

anova(model21)

Based on the Halfnormal plot and the ANOVA table, we can see that the only significant factors are the length of the putt and the type of putter. Therefore, we can reject the null hypothesis for A and B, and we fail to reject the rest of the null hypotheses.

b) Residuals

I) Complete Data Plots

plot(model21)

## hat values (leverages) are all = 0.1428571
##  and there are no factor predictors; no plot no. 5

II) Significant Data Plots

model21s <- lm(Distance~Length*Type, data = dat21)
plot(model21s)

## hat values (leverages) are all = 0.03571429
##  and there are no factor predictors; no plot no. 5

The Normality Plot has outliers, and the Residual vs Fitted Plot shows inconsistant variance. As both of these violate the assumptions of ANOVA, this model is inadequate.

6.36)

Hypotheses:

H0_A: Factor A is not significant

H1_A: Factor A is significant

H0_B: Factor B is not significant

H1_B: Factor B is significant

H0_C: Factor C is not significant

H1_C: Factor C is significant

H0_D: Factor D is not significant

H1_D: Factor D is significant

H0_AB: Interaction AB is not significant

H1_AB: Interaction AB is significant

H0_AC: Interaction AC is not significant

H1_AC: Interaction AC is significant

H0_AD: Interaction AD is not significant

H1_AD: Interaction AD is significant

H0_BC: Interaction BC is not significant

H1_BC: Interaction BC is significant

H0_BD: Interaction BD is not significant

H1_BD: Interaction BD is significant

H0_CD: Interaction CD is not significant

H1_CD: Interaction CD is significant

H0_ABC: Interaction ABC is not significant

H1_ABC: Interaction ABC is significant

H0_ABD: Interaction ABD is not significant

H1_ABD: Interaction ABD is significant

H0_ACD: Interaction ACD is not significant

H1_ACD: Interaction ACD is significant

H0_BCD: Interaction BCD is not significant

H1_BCD: Interaction BCD is significant

H0_ABCD: Interaction ABCD is not significant

H1_ABCD: Interaction ABCD is significant

Read In Data

A36 <- c(-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1)
B36 <- c(-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1)
C36 <- c(-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1)
D36 <- c(-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1)
obs36 <- c(1.92,11.28,1.09,5.75,2.13,9.53,1.03,5.35,1.6,11.73,1.16,4.68,2.16,9.11,1.07,5.30)
dat36 <- data.frame(A36,B36,C36,D36,obs36)

a) Factor Effects and Model

I) Factor Effects

model36 <- lm(obs36~A36*B36*C36*D36,data = dat36)
coef(model36)
##     (Intercept)             A36             B36             C36             D36 
##        4.680625        3.160625       -1.501875       -0.220625       -0.079375 
##         A36:B36         A36:C36         B36:C36         A36:D36         B36:D36 
##       -1.069375       -0.298125        0.229375       -0.056875       -0.046875 
##         C36:D36     A36:B36:C36     A36:B36:D36     A36:C36:D36     B36:C36:D36 
##        0.029375        0.344375       -0.096875       -0.010625        0.094375 
## A36:B36:C36:D36 
##        0.141875

The estimated Factor Effects are as follows:

\[ (1)=4.680625 \]

\[ A=3.160625 \]

\[ B=-1.501875 \]

\[ C=-0.220625 \]

\[ D= -0.079375 \]

\[ AB=-1.069375 \]

\[ AC=-0.298125 \]

\[ BC=0.229375 \]

\[ AD=-0.056875 \]

\[ BD=-0.046875 \]

\[ CD= 0.029375 \]

\[ ABC=0.344375 \]

\[ ABD=-0.096875 \]

\[ ACD=-0.010625 \]

\[ BCD=0.094375 \]

\[ABCD= 0.141875\]

II) Significant Factors

halfnormal(model36)
## 
## Significant effects (alpha=0.05, Lenth method):
## [1] A36         B36         A36:B36     A36:B36:C36

Our halfnormal plot indicates that the significant factors are A,B, and AB.

III) Significant Factors Model

Our model is:

\[ y(Resistivity)=4.680625+3.160625(A)-1.501875(B)-1.069375(AB) \]

b)

New Hypotheses:

H0_A: Factor A is not significant

H1_A: Factor A is significant

H0_B: Facto B is not significant

H1_B: Factor B is significant

H0_AB: Interaction AB is not significant

H1_AB: Interaction AB is significant

I) Linear Model and ANOVA

model36n <- lm(obs36~A36*B36,data = dat36)
anova(model36n)

Our ANOVA table supports our rejection of the null hypotheses for A,B, and AB.

II) Check for Adequacy

plot(model36n)

## hat values (leverages) are all = 0.25
##  and there are no factor predictors; no plot no. 5

The residuals vs. fitted plot indicates that the variance of the data is not constant, which breaks the assumption of ANOVA.

The Normality Plot shows large skews at both ends, indicating that the data is not normal. This breaks the assumption of normality for ANOVA

This model is shown by the plots to be inadequate.

c) Data Transformation and Analysis

I) ln Transformation

OBS36 <- log(obs36)

II) Effects

MODEL36 <- lm(OBS36~A36*B36*C36*D36)
coef(MODEL36)
##     (Intercept)             A36             B36             C36             D36 
##     1.185417116     0.812870345    -0.314277554    -0.006408558    -0.018077390 
##         A36:B36         A36:C36         B36:C36         A36:D36         B36:D36 
##    -0.024684570    -0.039723700    -0.004225796    -0.009578245     0.003708723 
##         C36:D36     A36:B36:C36     A36:B36:D36     A36:C36:D36     B36:C36:D36 
##     0.017780432     0.063434408    -0.029875960    -0.003740235     0.003765760 
## A36:B36:C36:D36 
##     0.031322043

III) Significant Factors

halfnormal(MODEL36)
## 
## Significant effects (alpha=0.05, Lenth method):
## [1] A36         B36         A36:B36:C36

The halfnormal plot of the transformed data indicates that only A and B are significant.

IV) Checking for Adequacy

ModeL36n <- lm(OBS36~A36*B36)
plot(ModeL36n)

## hat values (leverages) are all = 0.25
##  and there are no factor predictors; no plot no. 5

The plots using the transformed data are much imporved. They show normality, which is adequate, and the present more constant variance, also adequate.

Overall, the transformation of the data has produced a viable model.

d)

anova(ModeL36n)

The halfnormal plot and ANOVA of the transformed data indicates that only A and B are significant. Therefore our new model is:

\[ y(resistivity)=1.185417116+0.812870345(A)-0.314277554(B) \]

6.39)

Hypotheses:

H0_A: Factor A is not significant

H1_A: Factor A is significant

H0_B: Factor B is not significant

H1_B: Factor B is significant

H0_C: Factor C is not significant

H1_C: Factor C is significant

H0_D: Factor D is not significant

H1_D: Factor D is significant

H0_E: Factor E is not significant

H1_E: Factor E is significant

H0_AB: Interaction AB is not significant

H1_AB: Interaction AB is significant

H0_AC: Interaction AC is not significant

H1_AC: Interaction AC is significant

H0_AD: Interaction AD is not significant

H1_AD: Interaction AD is significant

H0_AE: Interaction AE is not significant

H1_AE: Interaction AE is significant

H0_BC: Interaction BC is not significant

H1_BC: Interaction BC is significant

H0_BD: Interaction BD is not significant

H1_BD: Interaction BD is significant

H0_BE: Interaction BE is not significant

H1_BE: Interaction BE is significant

H0_CD: Interaction CD is not significant

H1_CD: Interaction CD is significant

H0_CE: Interaction CE is not significant

H1_CE: Interaction CE is significant

H0_DE: Interaction DE is not significant

H1_DE: Interaction DE is significant

H0_ABC: Interaction ABC is not significant

H1_ABC: Interaction ABC is significant

H0_ABD: Interaction ABD is not significant

H1_ABD: Interaction ABD is significant

H0_ABE: Interaction ABE is not significant

H1_ABE: Interaction ABE is significant

H0_ACD: Interaction ACD is not significant

H1_ACD: Interaction ACD is significant

H0_ACE: Interaction ACE is not significant

H1_ACE: Interaction ACE is significant

H0_ADE: Interaction ADE is not significant

H1_ADE: Interaction ADE is significant

H0_BCD: Interaction BCD is not significant

H1_BCD: Interaction BCD is significant

H0_BCE: Interaction BCE is not significant

H1_BCE: Interaction BCE is significant

H0_BDE: Interaction BDE is not significant

H1_BDE: Interaction BDE is significant

H0_CDE: Interaction CDE is not significant

H1_CDE: Interaction CDE is significant

H0_ABCD: Interaction ABCD is not significant

H1_ABCD: Interaction ABCD is significant

H0_ABCE: Interaction ABCE is not significant

H1_ABCE: Interaction ABCE is significant

H0_ABDE: Interaction ABDE is not significant

H1_ABDE: Interaction ABDE is significant

H0_ACDE: Interaction ACDE is not significant

H1_ACDE: Interaction ACDE is significant

H0_BCDE: Interaction BCDE is not significant

H1_BCDE: Interaction BCDE is significant

H0_ABCDE: Interaction ABCDE is not significant

H1_ABCDE: Interaction ABCDE is significant

Read In Data

A39 <- c(-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1)
B39 <- c(-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1)
C39 <- c(-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1)
D39 <- c(-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1)
E39 <- c(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
obs39 <- c(8.11,5.56,5.77,5.82,9.17,7.8,3.23,5.69,8.82,14.23,9.2,8.94,8.68,11.49,6.25,9.12,7.93,5,7.47,12,9.86,3.65,6.4,11.61,12.43,17.55,8.87,25.38,13.06,18.85,11.78,26.05)
dat39 <- data.frame(A39,B39,C39,D39,E39,obs39)

a) Analyze Data

Linear Model and Effects

mod39 <- lm(obs39~A39*B39*C39*D39*E39,data=dat39)
coef(mod39)
##         (Intercept)                 A39                 B39                 C39 
##          10.1803125           1.6159375           0.0434375          -0.0121875 
##                 D39                 E39             A39:B39             A39:C39 
##           2.9884375           2.1878125           1.2365625          -0.0015625 
##             B39:C39             A39:D39             B39:D39             C39:D39 
##          -0.1953125           1.6665625          -0.0134375           0.0034375 
##             A39:E39             B39:E39             C39:E39             D39:E39 
##           1.0271875           1.2834375           0.3015625           1.3896875 
##         A39:B39:C39         A39:B39:D39         A39:C39:D39         B39:C39:D39 
##           0.2503125          -0.3453125          -0.0634375           0.3053125 
##         A39:B39:E39         A39:C39:E39         B39:C39:E39         A39:D39:E39 
##           1.1853125          -0.2590625           0.1709375           0.9015625 
##         B39:D39:E39         C39:D39:E39     A39:B39:C39:D39     A39:B39:C39:E39 
##          -0.0396875           0.3959375          -0.0740625          -0.1846875 
##     A39:B39:D39:E39     A39:C39:D39:E39     B39:C39:D39:E39 A39:B39:C39:D39:E39 
##           0.4071875           0.1278125          -0.0746875          -0.3553125
halfnormal(mod39)
## 
## Significant effects (alpha=0.05, Lenth method):
##  [1] D39         E39         A39:D39     A39         D39:E39     B39:E39     
## 
##  [7] A39:B39     A39:B39:E39 A39:E39     A39:D39:E39

The significant factors are A,D, and E

The significant interations are AB, AD, AE, BE, DE, ABE, and ADE

b) Analyze Residuals

model39 <- lm(obs39~A39*B39*D39*E39,data = dat39)
plot(model39)

## hat values (leverages) are all = 0.5
##  and there are no factor predictors; no plot no. 5

Using the significant factors and interactions, we can see that the model has both normality (from the NPP) and constant variance (from the Residuals vs. Fitted Graph). The model is adequate.

c) Analysis of Significant Factors and interactions

halfnormal(model39)
## 
## Significant effects (alpha=0.05, Lenth method):
##  [1] D39         E39         A39:D39     A39         D39:E39     B39:E39     
## 
##  [7] A39:B39     A39:B39:E39 A39:E39     A39:D39:E39 e10

anova(model39)

The analysis of the significant factors and interactions yields the same results as the analysis of all the data. Once again, the halfnormal plot and the ANOVA table indicate that A,D, and E are the significant factors, and that AB, AD, AE, BE, DE, ABE, and ADE are the significant interactions.

d) Ideal Factor Settings

The largest observations are 26.05 and 25.38. At both of these values, A, B, D, and E are at their +1 setting.

Factor A: +1

Factor B: +1

Factor D: +1

Factor E: +1