Subject: BIA 654 Experiment Design II
Semester: Fall 2018
HW6
Date: 10/15/2018
- This exercise was inspired by a real problem described in the article “Strategic Testing Stops Leaky
Litter Cartons in Their Tracks” (Packaging Digest, August 2001, Please find this paper in Canvas
to READ). The exercise resembles what the actual company did, but the data are not real.
The makers of “Cats Love It” cat litter are facing a serious problem. Retail customers are reporting
that cartons of the firm’s premium brand cat litter are leaking the product onto store shelves. The
company realizes that while cat lovers are used to cleaning stray sprays of litter tracked through the
house, they are not willing to put up with cartons that leak on the way home.
Management has determined that the problem is with the carton-sealing process. Cartons are filled
and sealed on a production line run by 20 workers. The company decides to perform 3-factor factorial
experiment. A run consists of filling and sealing 200 cartons. The factors to be tested and levels of
each are shown below.
Factor A is line speed with the minus level at 22 cartons per minute and the plus level at 30 cartons
per minute. Factor B is the pressure applied by the gluing machine, with the minus level being lower
pressure and the plus level being higher pressure. Factor C is the amount of glue used, with the plus
level being the current amount and the minus level being 40% less glue.
The response is the proportion(%) of cartons that leak, whose values are observed as 8, 45, 47, 10,
8, 40, 41, 8, listed in the standard order. For the questions below, you can do them either by hands
(recommended) or computer.
(a) Make the design matrix (with ‘+’ and ‘–’ symbols) that includes main effects and two- and threefactor
interactions.
(b) What are the estimated main effects of factor A and B? What is the estimated AC interaction?
(c) Display the effects graphically through main effects of C and interaction plots for BC and AC.
Answer:
A | B | C | AB | AC | BC | ABC | Response | |
Standard Order | Line
Speed |
Pressure | Amount of Glue | |||||
1 | – | – | – | + | + | + | – | 8 |
2 | + | – | – | – | – | + | + | 45 |
3 | – | + | – | – | + | – | + | 47 |
4 | + | + | – | + | – | – | – | 10 |
5 | – | – | + | + | – | – | + | 8 |
6 | + | – | + | – | + | – | – | 40 |
7 | – | + | + | – | – | + | – | 41 |
8 | + | + | + | + | + | + | + | 8 |
B)
Main effect Factor A=(45+10+40+8)/4-(8+47+41+8)/4=-0.25
B= (47+10+41+8)/4-(8+45+8+40)4=1.25
Interaction=(8+47+40+8)/4-(45+10+8+41)/4=-0.25
- C) Sum(y+)/n+=(8+45+47+10)/4=27.5 and Sum(y-)/n-=(8+40+10+8)/4=24.5
10 8
8 8
27.5 24.5
41
47
45 40
+ +
–
+
– –
- (a) Suppose the three real estate appraisers independently examined each of five properties chosen at
random from a particular neighborhood and gave appraised values. The manager of the appraisal
service that employs them suspects that systematic differences among their methods of appraisal
are causing undesirable inconsistencies in appraised values provided by her service. The issue
is whether there are, in fact, systematic differences among the values reported by the three
appraisers. The data, APPRAISED VALUES (In thousands of dollars), are shown below.
Question: What kind of statistical analysis should you perform? Choose from: (Two sample ttest,
pairwise t-test, One-way ANOVA, One-way ANOVA with block, Two-way ANOVA, Factorial
design). If your answer is One-way ANOVA with block, which variable does play a role of block?
Appraiser
Property A B C
1 90 93 92
2 94 96 88
3 91 92 84
4 85 88 83
5 88 90 87
(b) Suppose each of 4 Chardonnay wines of the same vintage was judged by 5 judges. Each wine was
blinded and given to each judge in randomized order. The wines were scored on a 40-point scale,
with higher scores meaning better wine. Based on those scores, we want to test whether there is
a difference between the 4 Chardonnay wines in mean scores.
Question: What kind of statistical analysis should you perform? Choose: (Two sample t-test,
pairwise t-test, One-way ANOVA, One-way ANOVA with block, Two-way ANOVA, Factorial
design). If your answer is One-way ANOVA with block, which variable does play a role of block?
1
(c) A researcher was interested in whether an individual’s interest in politics was influenced by their
level of education and gender. Therefore, the dependent variable (response variable) was “interest
in politics” and the two independent variables were “gender” and “level of education.”
In particular, the researcher wanted to know whether there was an interaction between education
level and gender. Put another way, was the effect of level of education on interest in politics
different for males and females?
To answer this question, a random sample of 60 participants were recruited to take part in the
study–30 males and 30 females–equally split by level of education: school, college and university
(i.e., 10 participants in each group). Each participant in the study completed a questionnaire
that scored their interest in politics on a scale of 0 to 100, with higher scores indicating a greater
interest in politics.
Question: What kind of statistical analysis should you perform to answer for the original question?
(Two sample t-test, pairwise t-test, One-way ANOVA, One-way ANOVA with block, Two-way
ANOVA, Factorial design)
Answer:
a)one way anova c) two way anova
####building matrix for convenience
a <- matrix(
c(90,94,91,85,88,93,96,92,88,90,92,88,84,83,87),
nrow=5,
ncol=3)
A <- a[,1]
B <- a[,2]
C <- a[,3]
####combine data
combine <- data.frame(cbind(A,B,C))
combine
summary(combine)
stack.comb <- stack(combine)
stack.comb
propo <- c(1,2,3,4,5)
###anova
anva <- aov(values~ind,data = stack.comb)
summary(anva)
comb2 <- cbind(stack.comb,propo)
propo1 <- rep(propo,3)
comb2
anva2 <- aov(values~ind+propo1,data=stack.comb)
anva2
> anva
Call:
aov(formula = values ~ ind, data = stack.comb)
Terms:
ind Residuals
Sum of Squares 62.8 132.8
Deg. of Freedom 2 12
Residual standard error: 3.32666
Estimated effects may be unbalanced
> anva2
Call:
aov(formula = values ~ ind + propo1, data = stack.comb)
Terms:
ind propo1 Residuals
Sum of Squares 62.8 58.8 74.0
Deg. of Freedom 2 1 11
Residual standard error: 2.593699
Estimated effects may be unbalanced
- B) two sample t test
> t.test1 <- t.test(a2,b2,alternative = “two.sided”, var.equal = FALSE)
> t.test2 <- t.test(a2,c2,alternative = “two.sided”, var.equal = FALSE)
> t.test3 <- t.test(b2,c2,alternative = “two.sided”, var.equal = FALSE)
> t.test1
Welch Two Sample t-test
data: a2 and b2
t = -2.0327, df = 27.709, p-value = 0.05177
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-4.41809197 0.01809197
sample estimates:
mean of x mean of y
89.6 91.8
> t.test2
Welch Two Sample t-test
data: a2 and c2
t = 2.391, df = 27.905, p-value = 0.02379
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.4007834 5.1992166
sample estimates:
mean of x mean of y
89.6 86.8
> t.test3
Welch Two Sample t-test
data: b2 and c2
t = 4.4696, df = 27.303, p-value = 0.0001239
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
2.705863 7.294137
sample estimates:
mean of x mean of y
91.8 86.8
- Recall the comparison between factorial design and one-factor-at-a-time (OFAT) approach considered in class: In the 22 factorial design (without replications), we conduct a total of 4 runs. The main effects of both factors (say A and B) are estimated by the difference between averages of two observations at the low and the high levels of each factor. Therefore, in order for the OFAT to achieve the same level of precision (that is, to obtain averages of two), one must have 2 runs at each experimental combination. Hence, for the 2 factor case, OFAT requires 2 × 3 = 6 total runs whereas 22 factorial design needs 2 2 = 4 runs. Now, suppose there are 5 factors (A, B, C, D, E), each having two-levels. We know 25 factorial design (without replications), we conduct a total of 32 runs. How many total runs are required in order for the OFAT approach to achieve the same precision? Explain why.
Answer:
Since this is 2^5 factorial OFAT approach needs 96 runs to achieve the similar result. In OFAT approach, we need to change one factor at a time. When change the a factor level, others remains the same. When it comes to 2 factorial design, it needs 4 runs while OFAT is 6. In Three factors it takes 2^3 runs, and 16 runs in OFAT. For 4 factorial design, it needs 2^4=16 runs and 40 runs for OFAT. So 2,4,6. 3,8,16. 4,16,40. We can conclude that it need 2^(n-1) *(n+1) times OFAT so 5 factors needs 96 runs.