Handoutn 13 Two-Factor Analysis of Variance.doc

advertisement
Two-Factor Analysis of Variance
Here we look at applying two-factor analysis of variance where we interested in studying the effects of two
factors on a response variable.
Example A horticulturist wants to study the effects of four different pesticides on the yield of fruit from three different
varieties of a citrus tree.
Two Factors: Pesticide and Variety
The factor pesticide has four levels and factor variety has three levels
Response variable: fruit yield
Example A store manager wishes to study the effects of height of shelf display (bottom, middle, top) and width of the
shelf display ( regular, wide) on sales of the bakery's bread.
Two Factors: Height and Width
The factor height has three levels and the factor width has two levels.
Response variable: bread sales
The Castle Bakery Company supplies wrapped Italian Bread to a large number of supermarkets in a
metropolitan area. An experimental study was made of the effects of height of the shelf display (bottom, middle,
top) and the width of the shelf display (regular, wide) on sales of this bakery’s bread (measured in cases) during
the experimental period. Twelve supermarkets, similar in terms of sales volumes and clientale, were utilized in
the study. Two stores were assigned at random to each of the factor level combinations and the sales of the
bread were recorded.
Display Height
Bottom
Middle
Top
Display Width
Regular
Wide
47, 43
46, 40
62, 68
67, 71
41, 39
42, 46
Questions of Interest
1. Are the mean sales different for the three heights?
2. Are the mean sales different for the two widths?
3. Does the effect of display width on sales depend on display height? In other words, do the two factors interact?
What is meant by interaction?
Two Factors A and B are said to interact if the difference in population mean responses for two levels of one factor is not
constant across levels of the second factor.
When the effect of one factor on a response variable y depends on the level of a second factor, we say that the two factors
interact.
Examine the following scenarios. In which of the scenarios does there appear to be interaction between Factors A and B?
B1
n=10 =84
n=10 =92
x
x
A1
A2
A1
A2
A1
A2
n=10
n=10
n=10
n=10
x
x
B1
=84
=74
x
x
B1
=74
=76
B2
n=10 =74
n=10 =83
x
x
n=10
n=10
n=10
n=10
B2
=76
=90
Row Mean
80
82
B2
=75
=90
Row Mean
74.5
83
x
x
x
x
Two-Factor Anova Hypothesis Tests
1. H0: There is no interaction between the two factors
Ha: There is interaction between the two factors
2. H0: The population average response is the same for each level of Factor A
Ha: The population means for the different levels of factor A are not all equal.
3. H0: The population average response is the same for each level of Factor B
Ha: The population means for the different levels of factor B are not all equal.
Assumptions required for F-tests:
The observations on any particular treatment are independently selected from a normal distribution with
variance 2 (the same variance for each treatment), and samples from different treatments are independent of
one another.
Examples of Analysis performed in Two-Factor ANOVA
A company was interested in comparing three different display panels for use by air traffic controllers. Each
display panel was to be examined under five different simulated emergency conditions. Thirty highly trained air
traffic controllers with similar work experience were enlisted for the study. A random assignment of controllers
to display-panel-emergency conditions was made, with two controllers assigned to each factor-level
combination. The time (in seconds) required to stabilize the emergency situation was recorded for each
controller at a panel-emergency condition. These data appear below.
Display Panel
1
2
3
1
18
13
24
16
15
28
Emergency Condition
2
3
31
35
22
27
33
30
24
21
42
46
40
37
4
39
35
52
5
36
38
57
15
10
28
12
16
24
Analysis of Variance for Time
Source
Cond
Panel
Cond*Panel
Error
Total
DF
4
2
8
15
29
Seq SS
2850.13
1227.80
44.87
106.00
4228.80
Adj SS
2850.13
1227.80
44.87
106.00
Adj MS
712.53
613.90
5.61
7.07
F
100.83
86.87
0.79
P
0.000
0.000
0.617
Means with the same letter are not significantly different.
Tukey Grouping
Mean
N
panel
A
37.800
10
3
B
B
B
25.100
10
1
23.500
10
2
Means with the same letter are not significantly different.
Tukey Grouping
Mean
N
conditin
A
42.833
6
4
B
36.167
6
2
C
28.500
6
3
D
D
D
19.000
6
1
17.500
6
5
EXAMPLE An experiment was conducted to examine the effects of different levels of reinforcement and different levels of isolation
on children’s ability to recall. A single analyst was to work with a random sample of 36 children. Two levels of reinforcement (none
and verbal) and three levels of isolation (20, 40, and 60 minutes) were to be used. Students were randomly assigned to the six
treatment groups, with a to total of 6 students being assigned to each group.
Each student was to spend a 30-minute session with the analyst. During this time, the student was to memorize a specific
passage, with reinforcement provided as dictated by the group to which the student was assigned. Following the 30-minute session, the
student was isolated for the time specified for his or her group and then tested for recall of the memorized passage. These data appear
in the accompanying table.
t.00833, 30=2.536
Level of
reinforcement
None
Verbal
20
20
18
15
22
19
28
16
25
Time of Isolation (Minutes)
40
23
25
24
21
30
28
24
27
ANOVA TABLE:
Source
C1
DF
2
SS
181.56
MS
90.778
F
5.80
P
0.007
36
27
26
23
25
24
29
21
6
14
31
34
60
10
17
38
35
11
19
29
30
1
2
30
35
225.00
1016.67
469.33
1892.56
225.000
508.333
15.644
14.38
32.49
0.001
0.000
Interaction Plot - Means for C3
C2
'None'
'Verbal'
'None'
'Verbal'
32
Mean
22
12
'20'
'40'
'60'
C1
Normal Probability Plot for Assessing Normality
Normal Probability Plot of the Residuals
(response is C3)
99
95
90
80
Percent
C2
Interaction
Error
Total
70
60
50
40
30
20
10
5
1
-10
-5
0
Residual
5
10
Plot of Residuals vs. Predicted Values for Assessing Equal Variance Assumption
Residuals Versus the Fitted Values
(response is C3)
8
6
Residual
4
2
0
-2
-4
-6
-8
10
15
20
25
30
35
Fitted Value
Fixed Versus Random Factors
A random factor is a factor whose levels may be regarded as a sample from some large population of levels. A fixed factor
is a factor whose levels are the only ones of interest. When a fixed factor is used, the inferences from the data are for the
levels of the factor actually used in the experiment. When a random factor is used, the inferences from the data in the
experiment are for all levels of the factor in the population from which the levels were selected and not only the levels
used in the experiment.
In ANOVA situations involving two or more factors, the F tests required for making inferences differ depending on
whether all factors are fixed, all factors are random, or some of both are present. In this class, we look at examples that
involve only fixed factors.
Example A study was designed to evaluate the effectiveness of two different sunscreens for protecting the skin of persons
who want to avoid burning or additional tanning while exposed to the sun. A random sample of 40 subjects (ages 20-25)
agreed to participate in the study. For each subject a 1-inch square was marked off on their back, under the shoulder but
above the small of the back. Twenty subjects were randomly assigned to each of the two types of sunscreen. A reading
based on the color of the skin in the designated square was made prior to the application of a fixed amount of the assigned
sunscreen, and then again after application and exposure to the sun for a 2-hour period. The company was concerned that
the measurement of color is extremely variable, and wanted to assess the variability in the readings due to the technician
taking the readings. Thus, the company randomly selected ten technicians from their worldwide staff to participate in the
study. Four subjects, two having sunscreen 1 and 2 having sunscreen 2 were randomly assigned to each technician for
evaluation. The data recorded were differences (postexposure-preexposure) for the subjects in the study.
Fixed factor – sunscreen type
Random Factor - technician
Download