Q6.8

time<-c(rep(c(-1), 12),rep(c(1), 12) )
clt_med<-c(rep(c(rep(-1, 2), rep(1, 2)), 6))
obs<-c(21, 22, 25, 26, 23, 28, 24, 25, 20, 26, 29, 27, 37, 39, 31, 34, 38, 38, 29, 33, 35, 36, 30, 35)
dat<-cbind.data.frame(time, clt_med, obs)

Hypothesis: Null Hypothesis(\(H_o\)), Alternate Hypothesis(\(H_a\)).

\(H_o: \alpha_i = 0\) \(H_a: \alpha_i \neq 0\)

\(H_o: \beta_j = 0\) \(H_a: \beta_j \neq 0\)

\(H_o: \alpha\beta_{ij} = 0\) \(H_a: \alpha\beta_{ij} \neq 0\)

Model Analysis.

aov.model <- aov(obs ~ time + clt_med + time * clt_med, data = dat)
summary(aov.model)
##              Df Sum Sq Mean Sq F value   Pr(>F)    
## time          1  590.0   590.0 115.506 9.29e-10 ***
## clt_med       1    9.4     9.4   1.835 0.190617    
## time:clt_med  1   92.0    92.0  18.018 0.000397 ***
## Residuals    20  102.2     5.1                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Comments: We could see from p-value = 0.000397, The interaction of Time and Cultural Medium significantly differ at level of significance = 0.05, i.e, We reject null hypothesis \(H_o: \alpha\beta_{ij} = 0\).

Plots…

plot(aov.model)

Comments: From Residuals vs Fitted values, we could see that the model is adequatebecause the points are spread randomly below and above zero residual line.There isn’t many data points inorder to tell the model adequate or not. Basically here there are less data points and randomly spread across the zero residula plot. So we can assume that model is adequate.; the normal probability plot of the residuals is normally distributed.

Source code…

time<-c(rep(c(-1), 12),rep(c(1), 12) )
clt_med<-c(rep(c(rep(-1, 2), rep(1, 2)), 6))
obs<-c(21, 22, 25, 26, 23, 28, 24, 25, 20, 26, 29, 27, 37, 39, 31, 34, 38, 38, 29, 33, 35, 36, 30, 35)
dat<-cbind.data.frame(time, clt_med, obs)
aov.model <- aov(obs ~ time + clt_med + time * clt_med, data = dat)
summary(aov.model)
plot(aov.model)

Q6.12

obs2<-
  matrix(c(14.037, 16.165, 13.972, 13.907, 14.037, 16.165, 13.972, 13.907, 14.821,
           14.757, 14.843, 14.878, 14.888, 14.921, 14.415, 14.932)
         ,byrow=T,ncol=4)
A <- rep(c(-1,1),2)
B <- rep(c(-1,-1,1,1),1)
AB <-A*B
Total <- apply(obs2,1,sum)
cbind(A, B, AB, obs2, Total)
##       A  B AB                              Total
## [1,] -1 -1  1 14.037 16.165 13.972 13.907 58.081
## [2,]  1 -1 -1 14.037 16.165 13.972 13.907 58.081
## [3,] -1  1 -1 14.821 14.757 14.843 14.878 59.299
## [4,]  1  1  1 14.888 14.921 14.415 14.932 59.156

(a) Estimate the factor effects.

Effects

n <- 3
Effects <- t(Total) %*% cbind(A,B,AB)/(2*n)
Summary <- rbind( cbind(A,B,AB),Effects )
Summary
##                A          B          AB
## [1,] -1.00000000 -1.0000000  1.00000000
## [2,]  1.00000000 -1.0000000 -1.00000000
## [3,] -1.00000000  1.0000000 -1.00000000
## [4,]  1.00000000  1.0000000  1.00000000
## [5,] -0.02383333  0.3821667 -0.02383333

Hypothesis: Null Hypothesis(\(H_o\)), Alternate Hypothesis(\(H_a\)).

\(H_o: \alpha_i = 0\) \(H_a: \alpha_i \neq 0\)

\(H_o: \beta_j = 0\) \(H_a: \beta_j \neq 0\)

\(H_o: \alpha\beta_{ij} = 0\) \(H_a: \alpha\beta_{ij} \neq 0\)

(b) Conduct an analysis of variance. Which factors are important?

(c) Write down a regression equation that could be used to predict epitaxial layer thickness over the region of arsenic flow rate and deposition time used in this experiment.

Analysis…

obs2_vec <- c(t(obs2))
Af <- rep(as.factor(A),rep(4,4))
Bf <- rep(as.factor(B),rep(4,4))
options(contrasts=c("contr.sum","contr.poly"))
obs2_lm <- lm(obs2_vec ~ Af*Bf)
summary(obs2_lm)
## 
## Call:
## lm(formula = obs2_vec ~ Af * Bf)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.61325 -0.49950 -0.03575  0.10725  1.64475 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 14.663563   0.196666  74.561   <2e-16 ***
## Af1          0.008938   0.196666   0.045    0.965    
## Bf1         -0.143312   0.196666  -0.729    0.480    
## Af1:Bf1     -0.008937   0.196666  -0.045    0.965    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7867 on 12 degrees of freedom
## Multiple R-squared:  0.04269,    Adjusted R-squared:  -0.1966 
## F-statistic: 0.1784 on 3 and 12 DF,  p-value: 0.909
anova(obs2_lm)
## Analysis of Variance Table
## 
## Response: obs2_vec
##           Df Sum Sq Mean Sq F value Pr(>F)
## Af         1 0.0013 0.00128  0.0021 0.9645
## Bf         1 0.3286 0.32862  0.5310 0.4802
## Af:Bf      1 0.0013 0.00128  0.0021 0.9645
## Residuals 12 7.4261 0.61884

Comments: we could see that non of the parameters are significantly differing by comparing the p-values with the level of significance = 0.05. Hence we could say that, We accept the Null Hypothesis - \(H_o: \alpha_i = 0\), \(H_o: \beta_j = 0\), \(H_o: \alpha\beta_{ij} = 0\).

I could say that non of the factor neither arsenic flow rate (A) nor deposition time (B) are significantly differing, i.e, the result of epitaxial layer on polished silicon wafers won’t differ for different A or B combination from the interaction of the factor which is not significantly differing

Regression line = 14.6635 + 0.0089A - 0.143312B.

(d) Analyze the residuals. Are there any residuals that should cause concern?

Plots

plot(obs2_lm)

Comments: As we could see from the Residuals vs Fitted, most of residuals values are group at one place of all for replications.because the points are spread randomly below and above zero residual line.There isn’t many data points inorder to tell the model adequate or not. Basically here there are less data points and randomly spread across the zero residula plot. So we can assume that model is adequate.

From the Residuals vs Fitted plot, we could say that we have few of residuals which may bring the epitaxial layer on polished silicon wafers down, which may led to concern.

(e) Discuss how you might deal with the potential outlier found in part (d)

Answer: By observing the the Residuals vs Fitted, I could say that we have wide range of values of epitaxial layer on polished silicon wafers to choose from, since the combination of A and B are insignificant, we could also select which is cost friendly and a as per our convenience.

Q6.21

Lt_of_pt<-c(rep(c(-1, 1), 8))

Ty_of_ptr<-c(rep(c(-1, -1, 1, 1), 4))

Br_of_pt<-c(rep(c(rep(-1,4), rep(1, 4)), 2))

Slp_of_pt<-c(rep(-1, 8), rep(1, 8))

obs3<-c(10.0, 18.0, 14.0, 12.5, 19.0, 16.0, 18.5, 0.0, 16.5, 4.5, 17.5, 20.5, 17.5, 33.0, 
        4.0, 6.0, 1.0, 14.5, 12.0, 14.0, 5.0, 0.0, 10.0, 34.0, 11.0, 25.5, 21.5, 0.0, 
        0.0, 0.0, 18.5, 19.5, 16.0, 15.0, 11.0, 5.0, 20.5, 18.0, 20.0, 29.5, 19.0, 10.0, 
        6.5, 18.5, 7.5, 6.0, 0.0, 10.0, 0.0, 16.5, 4.5, 0.0, 23.5, 8.0, 8.0, 8.0,
        4.5, 18.0, 14.5, 10.0, 0.0, 17.5, 6.0, 19.5, 18.0, 16.0, 5.5, 10.0, 7.0, 36.0, 
        15.0, 16.0, 8.5, 0.0, 0.5, 9.0, 3.0, 41.5, 39.0, 6.5, 3.5, 7.0, 8.5, 36.0, 
        8.0, 4.5, 6.5, 10.0, 13.0, 41.0, 14.0, 21.5, 10.5, 6.5, 0.0, 15.5, 24.0, 16.0, 
        0.0, 0.0, 0.0, 4.5, 1.0, 4.0, 6.5, 18.0, 5.0, 7.0, 10.0, 32.5, 18.5, 8.0)


Lt_of_pt<- rep(as.factor(Lt_of_pt),rep(7,16))
Ty_of_ptr <- rep(as.factor(Ty_of_ptr),rep(7,16))
Br_of_pt<- rep(as.factor(Br_of_pt),rep(7,16))
Slp_of_pt<- rep(as.factor(Slp_of_pt),rep(7,16))

(a) Analyze the data from this experiment. Which factors significantly affect putting performance.

Hypothesis: Null Hypothesis(\(H_o\)), Alternate Hypothesis(\(H_a\)).

\(H_o: \alpha_i = 0\) \(H_a: \alpha_i \neq 0\)

\(H_o: \beta_j = 0\) \(H_a: \beta_j \neq 0\)

\(H_o: \gamma_k = 0\) \(H_a: \gamma_k \neq 0\)

\(H_o: \delta_l = 0\) \(H_a: \delta_l \neq 0\)

\(H_o: \alpha\beta_{ij} = 0\) \(H_a: \alpha\beta_{ij} \neq 0\)

\(H_o: \alpha\gamma_{ik} = 0\) \(H_a: \alpha\gamma_{ik} \neq 0\)

\(H_o: \beta\gamma_{jk} = 0\) \(H_a: \beta\gamma_{jk} \neq 0\)

\(H_o: \alpha\delta_{il} = 0\) \(H_a: \alpha\delta_{il} \neq 0\)

\(H_o: \beta\delta_{jl} = 0\) \(H_a: \beta\delta_{jl} \neq 0\)

\(H_o: \gamma\delta_{kl} = 0\) \(H_a: \gamma\delta_{kl} \neq 0\)

\(H_o: \alpha\beta\gamma\delta_{ijkl} = 0\) \(H_a: \alpha\beta\gamma\delta_{ijkl} \neq 0\)

(a) Analyze the data from this experiment. Which factors significantly affect putting performance.

Model Analysis

obs3_lm <- lm(obs3 ~ Lt_of_pt*Ty_of_ptr*Br_of_pt*Slp_of_pt)
summary(obs3_lm)
## 
## Call:
## lm(formula = obs3 ~ Lt_of_pt * Ty_of_ptr * Br_of_pt * Slp_of_pt)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -16.786  -6.036  -0.250   4.250  27.143 
## 
## Coefficients:
##                                           Estimate Std. Error t value Pr(>|t|)
## (Intercept)                                12.2991     0.8794  13.985  < 2e-16
## Lt_of_pt1                                  -2.8616     0.8794  -3.254  0.00157
## Ty_of_ptr1                                  1.8616     0.8794   2.117  0.03686
## Br_of_pt1                                   1.1384     0.8794   1.294  0.19862
## Slp_of_pt1                                  0.1116     0.8794   0.127  0.89928
## Lt_of_pt1:Ty_of_ptr1                        1.3973     0.8794   1.589  0.11538
## Lt_of_pt1:Br_of_pt1                        -0.3259     0.8794  -0.371  0.71178
## Ty_of_ptr1:Br_of_pt1                       -1.0134     0.8794  -1.152  0.25205
## Lt_of_pt1:Slp_of_pt1                        0.9152     0.8794   1.041  0.30066
## Ty_of_ptr1:Slp_of_pt1                       0.7098     0.8794   0.807  0.42159
## Br_of_pt1:Slp_of_pt1                       -0.1205     0.8794  -0.137  0.89127
## Lt_of_pt1:Ty_of_ptr1:Br_of_pt1              0.2545     0.8794   0.289  0.77294
## Lt_of_pt1:Ty_of_ptr1:Slp_of_pt1            -1.0045     0.8794  -1.142  0.25623
## Lt_of_pt1:Br_of_pt1:Slp_of_pt1              0.5938     0.8794   0.675  0.50121
## Ty_of_ptr1:Br_of_pt1:Slp_of_pt1             0.5491     0.8794   0.624  0.53386
## Lt_of_pt1:Ty_of_ptr1:Br_of_pt1:Slp_of_pt1   0.9241     0.8794   1.051  0.29599
##                                              
## (Intercept)                               ***
## Lt_of_pt1                                 ** 
## Ty_of_ptr1                                *  
## Br_of_pt1                                    
## Slp_of_pt1                                   
## Lt_of_pt1:Ty_of_ptr1                         
## Lt_of_pt1:Br_of_pt1                          
## Ty_of_ptr1:Br_of_pt1                         
## Lt_of_pt1:Slp_of_pt1                         
## Ty_of_ptr1:Slp_of_pt1                        
## Br_of_pt1:Slp_of_pt1                         
## Lt_of_pt1:Ty_of_ptr1:Br_of_pt1               
## Lt_of_pt1:Ty_of_ptr1:Slp_of_pt1              
## Lt_of_pt1:Br_of_pt1:Slp_of_pt1               
## Ty_of_ptr1:Br_of_pt1:Slp_of_pt1              
## Lt_of_pt1:Ty_of_ptr1:Br_of_pt1:Slp_of_pt1    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.307 on 96 degrees of freedom
## Multiple R-squared:  0.2121, Adjusted R-squared:  0.08898 
## F-statistic: 1.723 on 15 and 96 DF,  p-value: 0.0589
anova(obs3_lm)
## Analysis of Variance Table
## 
## Response: obs3
##                                       Df Sum Sq Mean Sq F value   Pr(>F)   
## Lt_of_pt                               1  917.1  917.15 10.5878 0.001572 **
## Ty_of_ptr                              1  388.1  388.15  4.4809 0.036862 * 
## Br_of_pt                               1  145.1  145.15  1.6756 0.198615   
## Slp_of_pt                              1    1.4    1.40  0.0161 0.899280   
## Lt_of_pt:Ty_of_ptr                     1  218.7  218.68  2.5245 0.115377   
## Lt_of_pt:Br_of_pt                      1   11.9   11.90  0.1373 0.711776   
## Ty_of_ptr:Br_of_pt                     1  115.0  115.02  1.3278 0.252054   
## Lt_of_pt:Slp_of_pt                     1   93.8   93.81  1.0829 0.300658   
## Ty_of_ptr:Slp_of_pt                    1   56.4   56.43  0.6515 0.421588   
## Br_of_pt:Slp_of_pt                     1    1.6    1.63  0.0188 0.891271   
## Lt_of_pt:Ty_of_ptr:Br_of_pt            1    7.3    7.25  0.0837 0.772939   
## Lt_of_pt:Ty_of_ptr:Slp_of_pt           1  113.0  113.00  1.3045 0.256228   
## Lt_of_pt:Br_of_pt:Slp_of_pt            1   39.5   39.48  0.4558 0.501207   
## Ty_of_ptr:Br_of_pt:Slp_of_pt           1   33.8   33.77  0.3899 0.533858   
## Lt_of_pt:Ty_of_ptr:Br_of_pt:Slp_of_pt  1   95.6   95.65  1.1042 0.295994   
## Residuals                             96 8315.8   86.62                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Comments: For the anova table we could see that, non of the interactions are significantly differing at level of significance = 0.05, i.e, we fail to reject Null Hypothesis(\(H_o\)). But Factors Length of putt, Type of putter and Break Slope putt Significantly differ (significantly affect putting performance).

(b) Analyze the residuals from this experiment. Are there any indications of model inadequacy.

plot(obs3_lm)

Comments: From the Residuals vs Fitted Value Plot we could say that the model adequate, we could see that no pattern is seen points are randomly distributed below and above zero residual line.

Q6.36

A <-c(rep(c(-1, 1), 8))
B <-rep(c(-1,-1,1,1),4)
C <-rep(c(-1,-1,-1,-1,1,1,1,1),2)
D <- rep(c(rep(-1,8), rep(1,8)))
observations4 <-c(1.92,11.28,1.09,5.75,2.13,9.53,1.03,5.35,
        1.60,11.73,1.16,4.68,2.16,9.11,1.07,5.30)

(a) Estimate the factor effects. Plot the effect estimates on a normal probability plot and select a tentative model.

Model Analysis.

library(DoE.base)
model1<-aov(observations4 ~ A*B*C*D)
halfnormal(model1) 

model2<-aov(observations4 ~ A+B+A*B+A*B*C)
summary(model2)
##             Df Sum Sq Mean Sq  F value   Pr(>F)    
## A            1 159.83  159.83 1563.061 1.84e-10 ***
## B            1  36.09   36.09  352.937 6.66e-08 ***
## C            1   0.78    0.78    7.616  0.02468 *  
## A:B          1  18.30   18.30  178.933 9.33e-07 ***
## A:C          1   1.42    1.42   13.907  0.00579 ** 
## B:C          1   0.84    0.84    8.232  0.02085 *  
## A:B:C        1   1.90    1.90   18.556  0.00259 ** 
## Residuals    8   0.82    0.10                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

The Effects Factors are A, B, AB and ABC.

(b) Fit the model identified in part (a) and analyze the residuals. Is there any indication of model inadequacy?

plot(model2)

Comments: Form the plots we could conclude that the model is adequate, because the points are spread randomly below and above zero residual line.There isn’t many data points inorder to tell the model adequate or not. Basically here there are less data points and randomly spread across the zero residula plot. So we can assume that model is adequate.

(c) Repeat the analysis from parts (a) and (b) using ln (y) as the response variable. Is there an indication that the transformation has been useful?

Log Transformation of data

obs4_ln<-log(observations4)

ANOVA of Log transformed data

library(DoE.base)
model3<-aov(obs4_ln ~ A*B*C*D)
halfnormal(model3) 
## 
## Significant effects (alpha=0.05, Lenth method):
## [1] A     B     A:B:C

model4<-aov(obs4_ln ~ A+B+A*B*C)
summary(model4)
##             Df Sum Sq Mean Sq  F value   Pr(>F)    
## A            1 10.572  10.572 1994.556 6.98e-11 ***
## B            1  1.580   1.580  298.147 1.29e-07 ***
## C            1  0.001   0.001    0.124  0.73386    
## A:B          1  0.010   0.010    1.839  0.21207    
## A:C          1  0.025   0.025    4.763  0.06063 .  
## B:C          1  0.000   0.000    0.054  0.82223    
## A:B:C        1  0.064   0.064   12.147  0.00826 ** 
## Residuals    8  0.042   0.005                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Plots of Log transformed data.

plot(model4)

Comments: I don’t think Transformation did really helps in finding the factors which are significant, only AB interaction becomes insignificant.

(d) Fit a model in terms of the coded variables that can be used to predict the resistivity.

Fitting Model

#### Non - Transformed data...
mod_lm<-lm(observations4 ~ A*B*C)
summary(mod_lm)
## 
## Call:
## lm.default(formula = observations4 ~ A * B * C)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.53500 -0.06625  0.00000  0.06625  0.53500 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  4.68062    0.07994  58.549 8.04e-12 ***
## A            3.16062    0.07994  39.536 1.84e-10 ***
## B           -1.50187    0.07994 -18.787 6.66e-08 ***
## C           -0.22062    0.07994  -2.760  0.02468 *  
## A:B         -1.06937    0.07994 -13.377 9.33e-07 ***
## A:C         -0.29812    0.07994  -3.729  0.00579 ** 
## B:C          0.22937    0.07994   2.869  0.02085 *  
## A:B:C        0.34437    0.07994   4.308  0.00259 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3198 on 8 degrees of freedom
## Multiple R-squared:  0.9963, Adjusted R-squared:  0.993 
## F-statistic: 306.2 on 7 and 8 DF,  p-value: 4.454e-09
#### Transformed data...
mod2_lm<-lm(obs4_ln ~ A*B*C)
summary(mod2_lm)
## 
## Call:
## lm.default(formula = obs4_ln ~ A * B * C)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.1030 -0.0203  0.0000  0.0203  0.1030 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  1.185417   0.018201  65.129 3.44e-12 ***
## A            0.812870   0.018201  44.660 6.98e-11 ***
## B           -0.314278   0.018201 -17.267 1.29e-07 ***
## C           -0.006409   0.018201  -0.352  0.73386    
## A:B         -0.024685   0.018201  -1.356  0.21207    
## A:C         -0.039724   0.018201  -2.182  0.06063 .  
## B:C         -0.004226   0.018201  -0.232  0.82223    
## A:B:C        0.063434   0.018201   3.485  0.00826 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.0728 on 8 degrees of freedom
## Multiple R-squared:  0.9966, Adjusted R-squared:  0.9935 
## F-statistic: 330.2 on 7 and 8 DF,  p-value: 3.296e-09

Non-Transformed data: 4.68 + 3.16A - 1.5B - 0.22C - 1.069AB - 0.298AC + 0.229BC + 0.344ABC

Transformed data: 1.185 + 0.8128A - 0.314B - 0.0064C - 0.024AB - 0.039AC - 0.0042BC + .063ABC

Q6.39.

A <-c(rep(c(-1, 1), 16))
B <-rep(c(-1,-1,1,1),8)
C <-rep(c(-1,-1,-1,-1,1,1,1,1),4)
D <-c(rep(c(rep(-1,8), rep(1,8)),2))
E <-rep(c(rep(-1,16), rep(1,16)))

observations5<-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)

(a) Analyze the data from this experiment. Identify the significant factors and interactions.

(b) Analyze the residuals from this experiment. Are there any indications of model inadequacy or violations of the assumptions?

Model Analysis

library(DoE.base)
model5<-aov(observations5 ~ A*B*C*D*E)
summary(model5)
##             Df Sum Sq Mean Sq
## A            1  83.56   83.56
## B            1   0.06    0.06
## C            1   0.00    0.00
## D            1 285.78  285.78
## E            1 153.17  153.17
## A:B          1  48.93   48.93
## A:C          1   0.00    0.00
## B:C          1   1.22    1.22
## A:D          1  88.88   88.88
## B:D          1   0.01    0.01
## C:D          1   0.00    0.00
## A:E          1  33.76   33.76
## B:E          1  52.71   52.71
## C:E          1   2.91    2.91
## D:E          1  61.80   61.80
## A:B:C        1   2.01    2.01
## A:B:D        1   3.82    3.82
## A:C:D        1   0.13    0.13
## B:C:D        1   2.98    2.98
## A:B:E        1  44.96   44.96
## A:C:E        1   2.15    2.15
## B:C:E        1   0.94    0.94
## A:D:E        1  26.01   26.01
## B:D:E        1   0.05    0.05
## C:D:E        1   5.02    5.02
## A:B:C:D      1   0.18    0.18
## A:B:C:E      1   1.09    1.09
## A:B:D:E      1   5.31    5.31
## A:C:D:E      1   0.52    0.52
## B:C:D:E      1   0.18    0.18
## A:B:C:D:E    1   4.04    4.04
halfnormal(model5) 

model6<-aov(observations5 ~ A + D + E + A*B + A*D + A*E + B*E + D*E + A*B*E + A*D*E)
summary(model6)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## A            1  83.56   83.56  51.362 6.10e-07 ***
## D            1 285.78  285.78 175.664 2.30e-11 ***
## E            1 153.17  153.17  94.149 5.24e-09 ***
## B            1   0.06    0.06   0.037 0.849178    
## A:B          1  48.93   48.93  30.076 2.28e-05 ***
## A:D          1  88.88   88.88  54.631 3.87e-07 ***
## A:E          1  33.76   33.76  20.754 0.000192 ***
## E:B          1  52.71   52.71  32.400 1.43e-05 ***
## D:E          1  61.80   61.80  37.986 5.07e-06 ***
## A:E:B        1  44.96   44.96  27.635 3.82e-05 ***
## A:D:E        1  26.01   26.01  15.988 0.000706 ***
## Residuals   20  32.54    1.63                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(model6)

From the half normal plot we could see that factor and interactions - A, D, E, AB, AE, BE, DE, ABE, ADE are significantly differing.

Comments: From the residuals plots the we could see that the model is adequate,because the points are spread randomly below and above zero residual line.There isn’t many data points inorder to tell the model adequate or not. Basically here there are less data points and randomly spread across the zero residula plot. So we can assume that model is adequate. ; but normal probability looks normally distributed.

(c) One of the factors from this experiment does not seem to be important. If you drop this factor, what type of design remains? Analyze the data using the full factorial model for only the four active factors. Compare your results with those obtained in part (a).

From the half normal plot shown above we could see that, factor C and non of its interaction are insignificant, so we could drop the factor C for the table.

Full Factor Models

model7<-aov(observations5 ~ A*B*D*E)
summary(model7)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## A            1  83.56   83.56  57.233 1.14e-06 ***
## B            1   0.06    0.06   0.041 0.841418    
## D            1 285.78  285.78 195.742 2.16e-10 ***
## E            1 153.17  153.17 104.910 1.97e-08 ***
## A:B          1  48.93   48.93  33.514 2.77e-05 ***
## A:D          1  88.88   88.88  60.875 7.66e-07 ***
## B:D          1   0.01    0.01   0.004 0.950618    
## A:E          1  33.76   33.76  23.126 0.000193 ***
## B:E          1  52.71   52.71  36.103 1.82e-05 ***
## D:E          1  61.80   61.80  42.328 7.24e-06 ***
## A:B:D        1   3.82    3.82   2.613 0.125501    
## A:B:E        1  44.96   44.96  30.794 4.40e-05 ***
## A:D:E        1  26.01   26.01  17.815 0.000650 ***
## B:D:E        1   0.05    0.05   0.035 0.854935    
## A:B:D:E      1   5.31    5.31   3.634 0.074735 .  
## Residuals   16  23.36    1.46                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Comments: The Summary of the full factorial model for only the four active factors, we could see that F-values are increasing followed by the p-values.

(d)Find settings of the active factors that maximize the predicted response.

model5_lm<-lm(observations5 ~ A + D + E + A*B + A*D + A*E + B*E + D*E + A*B*E + A*D*E)
summary(model5_lm)
## 
## Call:
## lm.default(formula = observations5 ~ A + D + E + A * B + A * 
##     D + A * E + B * E + D * E + A * B * E + A * D * E)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.04875 -0.67375 -0.00687  0.65281  2.25375 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 10.18031    0.22548  45.150  < 2e-16 ***
## A            1.61594    0.22548   7.167 6.10e-07 ***
## D            2.98844    0.22548  13.254 2.30e-11 ***
## E            2.18781    0.22548   9.703 5.24e-09 ***
## B            0.04344    0.22548   0.193 0.849178    
## A:B          1.23656    0.22548   5.484 2.28e-05 ***
## A:D          1.66656    0.22548   7.391 3.87e-07 ***
## A:E          1.02719    0.22548   4.556 0.000192 ***
## E:B          1.28344    0.22548   5.692 1.43e-05 ***
## D:E          1.38969    0.22548   6.163 5.07e-06 ***
## A:E:B        1.18531    0.22548   5.257 3.82e-05 ***
## A:D:E        0.90156    0.22548   3.998 0.000706 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.275 on 20 degrees of freedom
## Multiple R-squared:  0.9643, Adjusted R-squared:  0.9447 
## F-statistic: 49.15 on 11 and 20 DF,  p-value: 5.069e-12

observation5(predicted responce) = 10.18 + 1.615A + 2.988D + 2.187E + 0.0434B + 1.23AB + 1.66AD + 1.027AE + 1.283EB + 1.389DE + 1.185AEB + 0.9015ADE.

The above are the Active factors which maximize the predicted Responce.