Q.7.12

we will test first highest order interaction effects hypothesis

Null Hypothesis(H0):\(\alpha\beta\gamma\delta_{ijkl}=0\) For all ijkl

Alternative Hypothesis(Ha):\(\alpha\beta\gamma\delta_{ijkl}\neq0\) For some ijkl

According to question, analyzing each replicate as a block

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

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

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

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

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

block<-c(rep(1,16),rep(2,16),rep(3,16),rep(4,16),rep(5,16),rep(6,16),rep(7,16))

df<-data.frame(dist,lofp,tofp,bofp,sofp)
df
##     dist lofp tofp bofp sofp
## 1   10.0   -1   -1   -1   -1
## 2   18.0   -1   -1   -1   -1
## 3   14.0   -1   -1   -1   -1
## 4   12.5   -1   -1   -1   -1
## 5   19.0   -1   -1   -1   -1
## 6   16.0   -1   -1   -1   -1
## 7   18.5   -1   -1   -1   -1
## 8    0.0    1   -1   -1   -1
## 9   16.5    1   -1   -1   -1
## 10   4.5    1   -1   -1   -1
## 11  17.5    1   -1   -1   -1
## 12  20.5    1   -1   -1   -1
## 13  17.5    1   -1   -1   -1
## 14  33.0    1   -1   -1   -1
## 15   4.0   -1    1   -1   -1
## 16   6.0   -1    1   -1   -1
## 17   1.0   -1    1   -1   -1
## 18  14.5   -1    1   -1   -1
## 19  12.0   -1    1   -1   -1
## 20  14.0   -1    1   -1   -1
## 21   5.0   -1    1   -1   -1
## 22   0.0    1    1   -1   -1
## 23  10.0    1    1   -1   -1
## 24  34.0    1    1   -1   -1
## 25  11.0    1    1   -1   -1
## 26  25.5    1    1   -1   -1
## 27  21.5    1    1   -1   -1
## 28   0.0    1    1   -1   -1
## 29   0.0   -1   -1    1   -1
## 30   0.0   -1   -1    1   -1
## 31  18.5   -1   -1    1   -1
## 32  19.5   -1   -1    1   -1
## 33  16.0   -1   -1    1   -1
## 34  15.0   -1   -1    1   -1
## 35  11.0   -1   -1    1   -1
## 36   5.0    1   -1    1   -1
## 37  20.5    1   -1    1   -1
## 38  18.0    1   -1    1   -1
## 39  20.0    1   -1    1   -1
## 40  29.5    1   -1    1   -1
## 41  19.0    1   -1    1   -1
## 42  10.0    1   -1    1   -1
## 43   6.5   -1    1    1   -1
## 44  18.5   -1    1    1   -1
## 45   7.5   -1    1    1   -1
## 46   6.0   -1    1    1   -1
## 47   0.0   -1    1    1   -1
## 48  10.0   -1    1    1   -1
## 49   0.0   -1    1    1   -1
## 50  16.5    1    1    1   -1
## 51   4.5    1    1    1   -1
## 52   0.0    1    1    1   -1
## 53  23.5    1    1    1   -1
## 54   8.0    1    1    1   -1
## 55   8.0    1    1    1   -1
## 56   8.0    1    1    1   -1
## 57   4.5   -1   -1   -1    1
## 58  18.0   -1   -1   -1    1
## 59  14.5   -1   -1   -1    1
## 60  10.0   -1   -1   -1    1
## 61   0.0   -1   -1   -1    1
## 62  17.5   -1   -1   -1    1
## 63   6.0   -1   -1   -1    1
## 64  19.5    1   -1   -1    1
## 65  18.0    1   -1   -1    1
## 66  16.0    1   -1   -1    1
## 67   5.5    1   -1   -1    1
## 68  10.0    1   -1   -1    1
## 69   7.0    1   -1   -1    1
## 70  36.0    1   -1   -1    1
## 71  15.0   -1    1   -1    1
## 72  16.0   -1    1   -1    1
## 73   8.5   -1    1   -1    1
## 74   0.0   -1    1   -1    1
## 75   0.5   -1    1   -1    1
## 76   9.0   -1    1   -1    1
## 77   3.0   -1    1   -1    1
## 78  41.5    1    1   -1    1
## 79  39.0    1    1   -1    1
## 80   6.5    1    1   -1    1
## 81   3.5    1    1   -1    1
## 82   7.0    1    1   -1    1
## 83   8.5    1    1   -1    1
## 84  36.0    1    1   -1    1
## 85   8.0   -1   -1    1    1
## 86   4.5   -1   -1    1    1
## 87   6.5   -1   -1    1    1
## 88  10.0   -1   -1    1    1
## 89  13.0   -1   -1    1    1
## 90  41.0   -1   -1    1    1
## 91  14.0   -1   -1    1    1
## 92  21.5    1   -1    1    1
## 93  10.5    1   -1    1    1
## 94   6.5    1   -1    1    1
## 95   0.0    1   -1    1    1
## 96  15.5    1   -1    1    1
## 97  24.0    1   -1    1    1
## 98  16.0    1   -1    1    1
## 99   0.0   -1    1    1    1
## 100  0.0   -1    1    1    1
## 101  0.0   -1    1    1    1
## 102  4.5   -1    1    1    1
## 103  1.0   -1    1    1    1
## 104  4.0   -1    1    1    1
## 105  6.5   -1    1    1    1
## 106 18.0    1    1    1    1
## 107  5.0    1    1    1    1
## 108  7.0    1    1    1    1
## 109 10.0    1    1    1    1
## 110 32.5    1    1    1    1
## 111 18.5    1    1    1    1
## 112  8.0    1    1    1    1
model<-aov(dist~lofp*tofp*bofp*sofp, data = df)
summary(model)
##                     Df Sum Sq Mean Sq F value  Pr(>F)   
## lofp                 1    917   917.1  10.588 0.00157 **
## tofp                 1    388   388.1   4.481 0.03686 * 
## bofp                 1    145   145.1   1.676 0.19862   
## sofp                 1      1     1.4   0.016 0.89928   
## lofp:tofp            1    219   218.7   2.525 0.11538   
## lofp:bofp            1     12    11.9   0.137 0.71178   
## tofp:bofp            1    115   115.0   1.328 0.25205   
## lofp:sofp            1     94    93.8   1.083 0.30066   
## tofp:sofp            1     56    56.4   0.651 0.42159   
## bofp:sofp            1      2     1.6   0.019 0.89127   
## lofp:tofp:bofp       1      7     7.3   0.084 0.77294   
## lofp:tofp:sofp       1    113   113.0   1.305 0.25623   
## lofp:bofp:sofp       1     39    39.5   0.456 0.50121   
## tofp:bofp:sofp       1     34    33.8   0.390 0.53386   
## lofp:tofp:bofp:sofp  1     96    95.6   1.104 0.29599   
## Residuals           96   8316    86.6                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(model)

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

model1<-aov(dist~lofp*tofp*bofp*sofp+block, data = df)
summary(model1)
##                     Df Sum Sq Mean Sq F value  Pr(>F)   
## lofp                 1    917   917.1  10.492 0.00165 **
## tofp                 1    388   388.1   4.440 0.03773 * 
## bofp                 1    145   145.1   1.660 0.20067   
## sofp                 1      1     1.4   0.016 0.89974   
## block                1      6     6.1   0.069 0.79300   
## lofp:tofp            1    219   218.7   2.502 0.11705   
## lofp:bofp            1     12    11.9   0.136 0.71303   
## tofp:bofp            1    115   115.0   1.316 0.25423   
## lofp:sofp            1     94    93.8   1.073 0.30287   
## tofp:sofp            1     56    56.4   0.646 0.42371   
## bofp:sofp            1      2     1.6   0.019 0.89176   
## lofp:tofp:bofp       1      7     7.3   0.083 0.77395   
## lofp:tofp:sofp       1    107   106.9   1.223 0.27147   
## lofp:bofp:sofp       1     51    50.9   0.583 0.44715   
## tofp:bofp:sofp       1     34    33.8   0.386 0.53573   
## lofp:tofp:bofp:sofp  1     96    95.6   1.094 0.29821   
## Residuals           95   8304    87.4                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(model1)

From the results of anova, the p-value highest level of interaction that is lofp:tofp:bofp:sofp is 0.29821, which is greater than the \(\alpha\)=0.05.Hence we conclude that we failed to reject the null hypothesis. Hence we must stop exploration on the associated factors

According to ANOVA results considering blocking, we conclude that the p-value of lofp and tofp 0.00165 and 0.03773 respectively. As, p-value is lesser than 0.05, hence we conclude that we reject the null hypothesis.Factor lofp (Factor A= Length of put) and Factor tofp (Factor B= Type of put) are significant factors

From the residual plots after blocking we can conclude that data is normally distributed except some outliners in the end and variances are widely spread in other end

Q.7.20

According to the question we have to design an experiment for confounding a 2^6 factorial in four blocks and 2^p blocks.

Hence here (Number of factors, k)=6, and P =2

So, we will have 2^(k-p) designs, therefore, 2^(6-2)= 16, so our design will have 64 factors divided in four blocks equally (16 in each block)

B1<-c('1','ab','acd','bcd','ce','abce','ade','bde','acf','bcf','df','abdf','aef','bef','cdef','abcdef')
B2<-c('c','abc','ad','bd','e','abe','acde','bcde','af','bf','cdf','abcdf','acef','bcef','def','abdef')
B3<-c('ac','bc','d','abd','ae','be','cde','abcde','f','abf','acdf','bcdf','cef','abcef','adef','bdef')
B4<-c('a','b','cd','abcd','ace','bce','de','abde','cf','abcf','adf','bdf','ef','abef','acdef','bcdef')


B<-cbind(B1,B2,B3,B4)
print(B)
##       B1       B2      B3      B4     
##  [1,] "1"      "c"     "ac"    "a"    
##  [2,] "ab"     "abc"   "bc"    "b"    
##  [3,] "acd"    "ad"    "d"     "cd"   
##  [4,] "bcd"    "bd"    "abd"   "abcd" 
##  [5,] "ce"     "e"     "ae"    "ace"  
##  [6,] "abce"   "abe"   "be"    "bce"  
##  [7,] "ade"    "acde"  "cde"   "de"   
##  [8,] "bde"    "bcde"  "abcde" "abde" 
##  [9,] "acf"    "af"    "f"     "cf"   
## [10,] "bcf"    "bf"    "abf"   "abcf" 
## [11,] "df"     "cdf"   "acdf"  "adf"  
## [12,] "abdf"   "abcdf" "bcdf"  "bdf"  
## [13,] "aef"    "acef"  "cef"   "ef"   
## [14,] "bef"    "bcef"  "abcef" "abef" 
## [15,] "cdef"   "def"   "adef"  "acdef"
## [16,] "abcdef" "abdef" "bdef"  "bcdef"

Here we will choose ABCE and ABDF which can also confound CDEF

Q.7.21

According to the question we have to design an experiment for confounding a 2^6 factorial in 8 blocks and 2^p blocks.

Hence here (Number of factors, k)=6, and P =3

So, we will have 2^(k-p) designs, therefore, 2^(6-3)= 8, so our design will have 64 factors divided in 8 blocks equally (8 in each block)

B1<-c('1','abcd','bce','ade','acf','bdf','abef','cdef')
B2<-c('abc','d','ae','bcde','bf','acdf','cef','abdef')
B3<-c('a','bcd','abce','de','cf','abdf','def','acdef')
B4<-c('c','abd','be','acde','af','bcdf','abcef','def')
B5<-c('ac','bd','abe','cde','f','abcdf','bcef','adef')
B6<-c('b','acd','ce','abde','abcf','de','aef','bcdef')
B7<-c('bc','ad','e','abcde','abf','cdf','acef','bdef')
B8<-c('ab','cd','ace','bde','bcf','adf','ef','abcdef')
B<-cbind(B1,B2,B3,B4,B5,B6,B7,B8)
print(B)
##      B1     B2      B3      B4      B5      B6      B7      B8      
## [1,] "1"    "abc"   "a"     "c"     "ac"    "b"     "bc"    "ab"    
## [2,] "abcd" "d"     "bcd"   "abd"   "bd"    "acd"   "ad"    "cd"    
## [3,] "bce"  "ae"    "abce"  "be"    "abe"   "ce"    "e"     "ace"   
## [4,] "ade"  "bcde"  "de"    "acde"  "cde"   "abde"  "abcde" "bde"   
## [5,] "acf"  "bf"    "cf"    "af"    "f"     "abcf"  "abf"   "bcf"   
## [6,] "bdf"  "acdf"  "abdf"  "bcdf"  "abcdf" "de"    "cdf"   "adf"   
## [7,] "abef" "cef"   "def"   "abcef" "bcef"  "aef"   "acef"  "ef"    
## [8,] "cdef" "abdef" "acdef" "def"   "adef"  "bcdef" "bdef"  "abcdef"

As per given information in the question ABCD, ACE, and ABEF as the independent effects chosen to be confounded with blocks.

Multiplying the independent effects ABCD and ACE, we get A^2 X C^2 X BDE, hence BDE should be confounded.

Multiplying the independent effects ACE and ABEF, we get A^2 X E^2 X CBF, hence CBF should be confounded.

Multiplying the independent effects ABCD and ABEF, we get A^2 X B^2 X CDEF, hence CDEF should be confounded.

Multiplying the independent effects ABCD, ACE and ABEF, we get A^2 X A X B^2X E^2 X C^2 X CDEF, hence ADF should be confounded.

The factors that are confounded with blocks other than ABCD,ACE and ABEF are BDE, CBF, CDEF and ADF.

All code

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

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

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

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

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

block<-c(rep(1,16),rep(2,16),rep(3,16),rep(4,16),rep(5,16),rep(6,16),rep(7,16))

df<-data.frame(dist,lofp,tofp,bofp,sofp)
df
model<-aov(dist~lofp*tofp*bofp*sofp, data = df)
summary(model)
plot(model)
model1<-aov(dist~lofp*tofp*bofp*sofp+block, data = df)
summary(model1)
plot(model1)
B1<-c('1','ab','acd','bcd','ce','abce','ade','bde','acf','bcf','df','abdf','aef','bef','cdef','abcdef')
B2<-c('c','abc','ad','bd','e','abe','acde','bcde','af','bf','cdf','abcdf','acef','bcef','def','abdef')
B3<-c('ac','bc','d','abd','ae','be','cde','abcde','f','abf','acdf','bcdf','cef','abcef','adef','bdef')
B4<-c('a','b','cd','abcd','ace','bce','de','abde','cf','abcf','adf','bdf','ef','abef','acdef','bcdef')


B<-cbind(B1,B2,B3,B4)
print(B)
B1<-c('1','abcd','bce','ade','acf','bdf','abef','cdef')
B2<-c('abc','d','ae','bcde','bf','acdf','cef','abdef')
B3<-c('a','bcd','abce','de','cf','abdf','def','acdef')
B4<-c('c','abd','be','acde','af','bcdf','abcef','def')
B5<-c('ac','bd','abe','cde','f','abcdf','bcef','adef')
B6<-c('b','acd','ce','abde','abcf','de','aef','bcdef')
B7<-c('bc','ad','e','abcde','abf','cdf','acef','bdef')
B8<-c('ab','cd','ace','bde','bcf','adf','ef','abcdef')
B<-cbind(B1,B2,B3,B4,B5,B6,B7,B8)
print(B)