Problem No.1

The surface finish of metal parts made on four randomly selected machines is being studied. An experiment is conducted in which each machine is run by three different operators and two specimens from each operator are collected and tested. Because of the location of the machines, different operators are used on each machine, and the operators are chosen at random. The data are shown in the table below. The machines and operators are denoted by M and O, respectively.

  1. Describe completely the design structure and treatment structure used in the experiment.

The design structure of the experiment involves the random selection of the machines which are considered as the blocks, these blocks are the larger experimental units wherein the smaller experimental units within these blocks are the three different operators which are chosen at random. However, these operators are not the same from each blocks which can be defined as the treatment structure of the experiment.

  1. Write the appropriate model for this experiment and define each term in the model accordingly.

\(Y_ijk=μ+α_i+β_{j(i)}+ϵ_{k(ij)}\)

where:
\(Y_{ijk}\) = the observed response for the \(k^{th}\) unit in the \(j^{th}\) level of B within the \(i^{th}\) level of A, \(i=1,2,⋯,a;j=1,2,⋯,b;k=1,2,⋯,r\) ,
\(μ\) = the overall mean,
\(α_i\) = the effect of the \(i^{th}\) level of A,
\(β_{j(i)}\) = the effect of the \(^{jth}\) level of B within the \(i^{th}\) level of A,
\(ϵ_{k(ij)}\) = random error associated with the \(k^{th}\) unit in the \(j^{th}\) level of B within the \(i^{th}\) level of A.

  1. Derive the expected mean squares for each term in the model.

\(E[MSA]=br\sigma^2_\alpha+r\sigma^2_{\beta(\alpha)}+\sigma^2_\epsilon\)

\(E[MSB(A)]=r\sigma^2_{\beta(\alpha)}+\sigma^2_\epsilon\) \(E[MSE]=\sigma^2_\epsilon\)

  1. Construct the ANOVA table and perform the necessary tests of hypotheses at α=0.05. Use the results in (c) for the correct F ratios. Draw appropriate conclusions.
problem1 <- read.csv("problem1.csv")

problem1$Machine <- as.factor(problem1$Machine)
problem1$Operator <- as.factor(problem1$Operator)

answer <- aov(Specimen ~ Machine/Operator, data= problem1)

knitr::kable(anova(answer))
Df Sum Sq Mean Sq F value Pr(>F)
Machine 3 3617.667 1205.8889 14.270874 0.0002910
Machine:Operator 8 2817.667 352.2083 4.168146 0.0134083
Residuals 12 1014.000 84.5000 NA NA

The Revised ANOVA.

Source of Variation df SS MSE F p-value
Machine 3 3617.667 1205.8889 3.424 0.05253732
Machine:Operator 8 2817.667 352.2083 4.170 0.01338585
Residual 12 1014.000 84.5000
Total 23 7449.334

Effects of A:
\(H_0:\sigma^2_\alpha=0\)
\(H_1:\sigma^2_\alpha>0\)
\(\alpha=0.05\)
Test Statistics: \(F=\frac{MSA}{MSB(A)}=\frac{1205.8889}{352.2083}\approx3.424\)
Decision Rule: We reject \(H_0\) if p-value is less than \(\alpha\), and otherwise.
Decision: We cannot reject the null since our p-value=0.05253732>0.05=\(alpha\).
Conclusion: At the 5% level of significance, there is no significant difference on the surface finish of metal parts among the machines.

Effects of B:
\(H_0:\sigma^2_{\beta(\alpha)}=0\)
\(H_1:\sigma^2_{\beta(\alpha)}>0\)
\(\alpha=0.05\)
Test Statistic: \(F=\frac{MSB(A)}{MSE}=\frac{352.2083}{84.5}\approx4.170\)
Decision Rule: We reject \(H_0\) if p-value is less than \(\alpha\), and otherwise.
Decision: We will reject the null since our p-value=0.01338585<0.05=\(alpha\).
Conclusion: At the 5% level of significance, there is a significant difference on the surface finish of metal parts among operators within the selected machines.

  1. If possible, identify which operators differ in which machines. Summarize your answer in a table.
emmeans::emmeans(answer, pairwise ~ Operator | Machine, adjust = "bonferroni")
## NOTE: A nesting structure was detected in the fitted model:
##     Operator %in% Machine
## $emmeans
## Machine = M1:
##  Operator emmean  SE df lower.CL upper.CL
##  O1         70.5 6.5 12     56.3     84.7
##  O2         84.0 6.5 12     69.8     98.2
##  O3         51.5 6.5 12     37.3     65.7
## 
## Machine = M2:
##  Operator emmean  SE df lower.CL upper.CL
##  O4         95.5 6.5 12     81.3    109.7
##  O5         82.0 6.5 12     67.8     96.2
##  O6         72.0 6.5 12     57.8     86.2
## 
## Machine = M3:
##  Operator emmean  SE df lower.CL upper.CL
##  O7         81.5 6.5 12     67.3     95.7
##  O8         54.5 6.5 12     40.3     68.7
##  O9         51.5 6.5 12     37.3     65.7
## 
## Machine = M4:
##  Operator emmean  SE df lower.CL upper.CL
##  O10        44.5 6.5 12     30.3     58.7
##  O11        48.0 6.5 12     33.8     62.2
##  O12        54.5 6.5 12     40.3     68.7
## 
## Confidence level used: 0.95 
## 
## $contrasts
## Machine = M1:
##  contrast  estimate   SE df t.ratio p.value
##  O1 - O2      -13.5 9.19 12  -1.469  0.5030
##  O1 - O3       19.0 9.19 12   2.067  0.1831
##  O2 - O3       32.5 9.19 12   3.536  0.0123
## 
## Machine = M2:
##  contrast  estimate   SE df t.ratio p.value
##  O4 - O5       13.5 9.19 12   1.469  0.5030
##  O4 - O6       23.5 9.19 12   2.556  0.0755
##  O5 - O6       10.0 9.19 12   1.088  0.8941
## 
## Machine = M3:
##  contrast  estimate   SE df t.ratio p.value
##  O7 - O8       27.0 9.19 12   2.937  0.0373
##  O7 - O9       30.0 9.19 12   3.264  0.0204
##  O8 - O9        3.0 9.19 12   0.326  1.0000
## 
## Machine = M4:
##  contrast  estimate   SE df t.ratio p.value
##  O10 - O11     -3.5 9.19 12  -0.381  1.0000
##  O10 - O12    -10.0 9.19 12  -1.088  0.8941
##  O11 - O12     -6.5 9.19 12  -0.707  1.0000
## 
## P value adjustment: bonferroni method for 3 tests
Machine Operator Means
Machine 1 Operator1 \(70.5^{ab}\)
Operator2 \(84.0^a\)
Operator3 \(51.5^b\)
Machine 2 Operator4 \(95.5^a\)
Operator5 \(82.0^{ab}\)
Operator6 \(72.0^b\)
Machine 3 Operator7 \(81.5^a\)
Operator8 \(54.5^b\)
Operator9 \(51.5^b\)
Machine 4 Operator10 \(44.5^a\)
Operator11 \(48.0^a\)
Operator12 \(54.5^a\)
  1. Estimate the variance components.

\(MSE=84.50\)
\(MSA=brσ^2_α+rσ^2_{β(α)}+σ^2_ϵ\)
\(MSB(A)=rσ^2_{β(α)}+σ^2_ϵ\)

\(a=4,b=9,r=2\)

\(MSB(A)=rσ^2_{β(α)}+σ^2_ϵ\)
\(352.21=(2)σ^2_{β(α)}+84.50\)
\(σ^2_{β(α)}=352.21−84.502\)
\(σ^2_{β(α)}=133.855\)

\(MSA=brσ^2_α+rσ^2_{β(α)}+σ^2_ϵ\)
\(MSA=brσ^2_α+MSB(A)\)
\(1205.89=9(2)σ^2_α+352.21\)
\(σ^2_α=1205.89−352.2118\)
\(σ^2_α=47.42667\)

hence we have an estimated variance component of:

\(V(Y_{ijk})=σ^2_{β(α)}+σ^2_α+σ^2_ϵ\)
\(V(Y_{ijk})=133.855+47.42667+84.50\)
\(V(Y_{ijk})=265.7817\)

The estimated variance component is 265.7817.

Problem No. 2

An experimenter is designing an experiment in which she plans to compare nine different formulations of a meat product. One factor, F, is percent fat (10%, 15%, 20%) in the meat. The other factor, C, is cooking method (broil, bake, fry). She will prepare samples of each of the nine combinations and present them to tasters who will score the samples based on various criteria. Four tasters are available for the study. Each taster will taste nine samples. There are taster-to-taster differences, but the order in which the samples are tasted will not influence the taste scores. The samples will be prepared in the following manner so that the meat samples can be prepared and kept warm for the tasters. A portion of meat containing 10% fat will be divided into three equal portions. Each of the three methods of cooking will then be randomly assigned to one of the three portions. This procedure will be repeated for meat samples having 15% and 20% fat. The nine meat samples will then be tasted and scored by the taster. The whole process is repeated for the other three tasters. The taste scores (0 to 100) are given in the following table.

  1. Describe completely the design structure and treatment structure used in the experiment.

The design structure of the experiment uses a split-plot design. It includes two factors wherein factor F (percent of fat in the meat) is the main plot factor and factor C (cooking method) is the subplot factor. However, the treatment structure comes at which the levels of factor F were randomized over the main plots and after which, the levels of factor C were also randomized over the subplots within each main plot.

  1. Construct the ANOVA table and perform the necessary tests of hypothesis at α=0.01 . Draw appropriate conclusions.
problem2 <- read.csv("problem2.csv")
library(ExpDes)
with(problem2,split2.rbd(fat,Cooking,Taster,Score,
                             quali= c(TRUE,TRUE),
                             mcomp = "tukey",
                             fac.names = c("Fat Percentage","Cooking Method"),
                             sigT = 0.01,
                             sigF = 0.01,
                             unfold = NULL))
## ------------------------------------------------------------------------
## Legend:
## FACTOR 1 (plot):  Fat Percentage 
## FACTOR 2 (split-plot):  Cooking Method 
## ------------------------------------------------------------------------
## 
## ------------------------------------------------------------------------
## Analysis of Variance Table
## ------------------------------------------------------------------------
##                               DF      SS     MS     Fc  Pr(>Fc)    
## Fat Percentage                 2  804.39 402.19 31.822 0.000639 ***
## Block                          3  539.00 179.67 14.215 0.003910 ** 
## Error a                        6   75.83  12.64                    
## Cooking Method                 2  369.06 184.53 27.077    4e-06 ***
## Fat Percentage*Cooking Method  4    4.94   1.24  0.181 0.945068    
## Error b                       18  122.67   6.81                    
## Total                         35 1915.89                           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## ------------------------------------------------------------------------
## CV 1 = 4.44699 %
## CV 2 = 3.265418 %
## 
## No significant interaction: analyzing the simple effects
## ------------------------------------------------------------------------
## Fat Percentage
## Tukey's test
## ------------------------------------------------------------------------
## Groups Treatments Means
## a     20      86.08333 
##  b    15      79.16667 
##  b    10      74.58333 
## ------------------------------------------------------------------------
## 
## Cooking Method
## Tukey's test
## ------------------------------------------------------------------------
## Groups Treatments Means
## a     3   83.75 
##  b    2   80.16667 
##   c   1   75.91667 
## ------------------------------------------------------------------------
## 
## 
## 
## 
## Significant interaction: analyzing the interaction
## ------------------------------------------------------------------------
## 
## Analyzing  Fat Percentage  inside of each level of  Cooking Method 
## ------------------------------------------------------------------------
##                                          DF       SS         MS       Fc
## Fat Percentage : Cooking Method 1   2.00000 265.1667 132.583333 15.14170
## Fat Percentage : Cooking Method 2   2.00000 290.6667 145.333333 16.59781
## Fat Percentage : Cooking Method 3   2.00000 253.5000 126.750000 14.47550
## Pooled Error                       18.67788 163.5468   8.756173       NA
##                                     p.value
## Fat Percentage : Cooking Method 1  0.000123
## Fat Percentage : Cooking Method 2  0.000072
## Fat Percentage : Cooking Method 3  0.000160
## Pooled Error                             NA
## ------------------------------------------------------------------------
## 
## 
##  Fat Percentage inside of Cooking Method 1
## ------------------------------------------------------------------------
## Tukey's test
## ------------------------------------------------------------------------
## Groups Treatments Means
## a     20      82.25 
##  b    15      74.5 
##  b    10      71 
## ------------------------------------------------------------------------
## 
##  Fat Percentage inside of Cooking Method 2
## ------------------------------------------------------------------------
## Tukey's test
## ------------------------------------------------------------------------
## Groups Treatments Means
## a     20      86.5 
##  b    15      79.5 
##  b    10      74.5 
## ------------------------------------------------------------------------
## 
##  Fat Percentage inside of Cooking Method 3
## ------------------------------------------------------------------------
## Tukey's test
## ------------------------------------------------------------------------
## Groups Treatments Means
## a     20      89.5 
## ab    15      83.5 
##  b    10      78.25 
## ------------------------------------------------------------------------
## 
## 
## Analyzing  Cooking Method  inside of each level of  Fat Percentage 
## ------------------------------------------------------------------------
##                                     DF       SS        MS        Fc  p.value
## Cooking Method : Fat Percentage 10   2 105.1667 52.583333  7.716032 0.003802
## Cooking Method : Fat Percentage 15   2 162.6667 81.333333 11.934782 0.000502
## Cooking Method : Fat Percentage 20   2 106.1667 53.083333  7.789402 0.003655
## Error b                             18 122.6667  6.814815        NA       NA
## ------------------------------------------------------------------------
## 
## 
##  Cooking Method inside of Fat Percentage 10
## ------------------------------------------------------------------------
## Tukey's test
## ------------------------------------------------------------------------
## Groups Treatments Means
## a     3   78.25 
## ab    2   74.5 
##  b    1   71 
## ------------------------------------------------------------------------
## ------------------------------------------------------------------------
## 
## 
##  Cooking Method inside of Fat Percentage 15
## ------------------------------------------------------------------------
## Tukey's test
## ------------------------------------------------------------------------
## Groups Treatments Means
## a     3   83.5 
## ab    2   79.5 
##  b    1   74.5 
## ------------------------------------------------------------------------
## ------------------------------------------------------------------------
## 
## 
##  Cooking Method inside of Fat Percentage 20
## ------------------------------------------------------------------------
## Tukey's test
## ------------------------------------------------------------------------
## Groups Treatments Means
## a     3   89.5 
## ab    2   86.5 
##  b    1   82.25 
## ------------------------------------------------------------------------
## ------------------------------------------------------------------------

Block effects:
\(H_o:ρ_j=0\)
\(H_a:ρ_j>0\)
\(\alpha=0.01\)
Test Statistics:
\(F−value=31.822\)
\(p−value=0.000639\)
Decision on \(H_o\):
We reject the null since, pvalue=0.003910<0.01=\(\alpha\).
Conclusion:
There is significant block effect (p−value<0.01). Blocking strategy is effective.

Interaction Effects:
\(H_o:(αβ)_{ik}=0\)
\(H_a:(αβ)_{ik}>0\)
\(\alpha=0.01\)
Test Statistics:
\(F−value=0.181\)
\(p−value=0945068\)
Decision on \(H_o\):
We fail to reject the null, since pvalue=0.945068>0.01=\(\alpha\).
Conclusion:
There is no interaction between the Fat Percentage and Cooking Method.

Fat Percentage Effects:
\(H_o:α_i=0\)
\(H_a:α_i>0\)
\(\alpha=0.01\)
Test Statistics:
\(F−value=31.822\)
\(p−value=0.000639\)
Decision on \(H_o\):
We reject the null, since pval<significance level.
Conclusion:
There is a significant effect on Fat percentage.

Post hoc on Fat Percentage means:

Fat Percentage Mean
20% \(86.083^a\)
15% \(79.167^b\)
10% \(74.583^b\)

Cooking Method Effects:
\(H_o:β_k=0\)
\(H_a:β_k>0\)
\(\alpha=0.01\)
Test Statistics:
\(F−value=27.077\)
\(p−value<0.001\)
Decision on Ho:
We reject the null, since pvalue<significance level.
Conclusion:
There is a significant difference on the cooking method.

post hoc on Cooking Method Effect:

Cooking Method Mean
Fry \(83.75^a\)
Bake \(80.167^b\)
Boil \(75.917^c\)
  1. Test at the 1% level of significance if there are significant taster-to-taster differences.