Title: ANOVA TABLE
1ANOVA TABLE
- Factorial Experiment
- Completely Randomized Design
2Anova table for the 3 factor Experiment
3Sum of squares entries
Similar expressions for SSB , and SSC.
Similar expressions for SSBC , and SSAC.
4Sum of squares entries
Finally
5The statistical model for the 3 factor Experiment
6Anova table for the 3 factor Experiment
7- The testing in factorial experiments
- Test first the higher order interactions.
- If an interaction is present there is no need to
test lower order interactions or main effects
involving those factors. All factors in the
interaction affect the response and they interact - The testing continues with lower order
interactions and main effects for factors which
have not yet been determined to affect the
response.
8Examples
9Example
- In this example we are examining the effect of
- the level of protein A (High or Low) and
- the source of protein B (Beef, Cereal, or Pork)
on weight gains (grams) in rats.
We have n 10 test animals randomly assigned to
k 6 diets
10The k 6 diets are the 6 32 Level-Source
combinations
11Table Gains in weight (grams) for rats under six
diets differing in level of protein (High or
Low) and s ource of protein (Beef, Cereal, or
Pork)
Level
of Protein High Protein Low protein
Source of Protein Beef Cereal Pork Beef Cereal P
ork
Diet 1 2 3 4 5 6
73 98 94 90 107 49 102 74 79 76 95 82 118 56
96 90 97 73 104 111 98 64 80 86 81 95 102 86
98 81 107 88 102 51 74 97 100 82 108 72 74 106
87 77 91 90 67 70 117 86 120 95 89 61 111 9
2 105 78 58 82
Mean 100.0 85.9 99.5 79.2 83.9 78.7 Std.
Dev. 15.14 15.02 10.92 13.89 15.71 16.55
12The data as it appears in SPSS
13To perform ANOVA select Analyze-gtGeneral Linear
Model-gt Univariate
14The following dialog box appears
15Select the dependent variable and the fixed
factors
Press OK to perform the Analysis
16The Output
17Example Four factor experiment
- Four factors are studied for their effect on Y
(luster of paint film). The four factors are
1) Film Thickness - (1 or 2 mils)
2) Drying conditions (Regular or Special)
3) Length of wash (10,30,40 or 60 Minutes), and
4) Temperature of wash (92 C or 100 C)
Two observations of film luster (Y) are taken for
each treatment combination
18- The data is tabulated below
- Regular Dry Special Dry
- Minutes 92 ?C 100 ?C 92?C 100 ?C
- 1-mil Thickness
- 20 3.4 3.4 19.6 14.5 2.1 3.8 17.2 13.4
- 30 4.1 4.1 17.5 17.0 4.0 4.6 13.5 14.3
- 40 4.9 4.2 17.6 15.2 5.1 3.3 16.0 17.8
- 60 5.0 4.9 20.9 17.1 8.3 4.3 17.5 13.9
- 2-mil Thickness
- 20 5.5 3.7 26.6 29.5 4.5 4.5 25.6 22.5
- 30 5.7 6.1 31.6 30.2 5.9 5.9 29.2 29.8
- 40 5.5 5.6 30.5 30.2 5.5 5.8 32.6 27.4
- 60 7.2 6.0 31.4 29.6 8.0 9.9 33.5 29.5
19The Data as it appears in SPSS
20The dialog box for performing ANOVA
21The output
22Random Effects and Fixed Effects Factors
23- So far the factors that we have considered are
fixed effects factors - This is the case if the levels of the factor are
a fixed set of levels and the conclusions of any
analysis is in relationship to these levels. - If the levels have been selected at random from a
population of levels the factor is called a
random effects factor - The conclusions of the analysis will be directed
at the population of levels and not only the
levels selected for the experiment
24Example - Fixed Effects
- Source of Protein, Level of Protein, Weight Gain
- Dependent
- Weight Gain
- Independent
- Source of Protein,
- Beef
- Cereal
- Pork
- Level of Protein,
- High
- Low
25Example - Random Effects
- In this Example a Taxi company is interested in
comparing the effects of three brands of tires
(A, B and C) on mileage (mpg). Mileage will also
be effected by driver. The company selects b 4
drivers at random from its collection of drivers.
Each driver has n 3 opportunities to use each
brand of tire in which mileage is measured. - Dependent
- Mileage
- Independent
- Tire brand (A, B, C),
- Fixed Effect Factor
- Driver (1, 2, 3, 4),
- Random Effects factor
26The Model for the fixed effects experiment
- where m, a1, a2, a3, b1, b2, (ab)11 , (ab)21 ,
(ab)31 , (ab)12 , (ab)22 , (ab)32 , are fixed
unknown constants - And eijk is random, normally distributed with
mean 0 and variance s2. - Note
27The Model for the case when factor B is a random
effects factor
- where m, a1, a2, a3, are fixed unknown constants
- And eijk is random, normally distributed with
mean 0 and variance s2. - bj is normal with mean 0 and variance
- and
- (ab)ij is normal with mean 0 and variance
- Note
This model is called a variance components model
28The Anova table for the two factor model
29The Anova table for the two factor model (A, B
fixed)
EMS Expected Mean Square
30The Anova table for the two factor model (A
fixed, B - random)
Note The divisor for testing the main effects of
A is no longer MSError but MSAB.
31Rules for determining Expected Mean Squares (EMS)
in an Anova Table
Both fixed and random effects Formulated by
Schultz1
- Schultz E. F., Jr. Rules of Thumb for
Determining Expectations of Mean Squares in
Analysis of Variance,Biometrics, Vol 11, 1955,
123-48.
32- The EMS for Error is s2.
- The EMS for each ANOVA term contains two or more
terms the first of which is s2. - All other terms in each EMS contain both
coefficients and subscripts (the total number of
letters being one more than the number of
factors) (if number of factors is k 3, then the
number of letters is 4) - The subscript of s2 in the last term of each EMS
is the same as the treatment designation.
33- The subscripts of all s2 other than the first
contain the treatment designation. These are
written with the combination involving the most
letters written first and ending with the
treatment designation. - When a capital letter is omitted from a subscript
, the corresponding small letter appears in the
coefficient. - For each EMS in the table ignore the letter or
letters that designate the effect. If any of the
remaining letters designate a fixed effect,
delete that term from the EMS.
34- Replace s2 whose subscripts are composed entirely
of fixed effects by the appropriate sum.
35- Example 3 factors A, B, C all are random
effects
36- Example 3 factors A fixed, B, C random
37- Example 3 factors A , B fixed, C random
38- Example 3 factors A , B and C fixed
39Example - Random Effects
- In this Example a Taxi company is interested in
comparing the effects of three brands of tires
(A, B and C) on mileage (mpg). Mileage will also
be effected by driver. The company selects at
random b 4 drivers at random from its
collection of drivers. Each driver has n 3
opportunities to use each brand of tire in which
mileage is measured. - Dependent
- Mileage
- Independent
- Tire brand (A, B, C),
- Fixed Effect Factor
- Driver (1, 2, 3, 4),
- Random Effects factor
40The Data
41Asking SPSS to perform Univariate ANOVA
42Select the dependent variable, fixed factors,
random factors
43The Output
The divisor for both the fixed and the random
main effect is MSAB
This is contrary to the advice of some texts
44The Anova table for the two factor model (A
fixed, B - random)
Note The divisor for testing the main effects of
A is no longer MSError but MSAB.
References Guenther, W. C. Analysis of Variance
Prentice Hall, 1964
45The Anova table for the two factor model (A
fixed, B - random)
Note In this case the divisor for testing the
main effects of A is MSAB . This is the approach
used by SPSS.
References Searle Linear Models John Wiley, 1964
46Crossed and Nested Factors
47- The factors A, B are called crossed if every
level of A appears with every level of B in the
treatment combinations.
Levels of B
Levels of A
48- Factor B is said to be nested within factor A if
the levels of B differ for each level of A.
Levels of A
Levels of B
49- Example A company has a 4 plants for producing
paper. Each plant has 6 machines for producing
the paper. The company is interested in how
paper strength (Y) differs from plant to plant
and from machine to machine within plant
Plants
Machines
50- Machines (B) are nested within plants (A)
The model for a two factor experiment with B
nested within A.
51The ANOVA table
Note SSB(A ) SSB SSAB and a(b 1) (b 1)
(a - 1)(b 1)
52- Example A company has a 4 plants for producing
paper. Each plant has 6 machines for producing
the paper. The company is interested in how
paper strength (Y) differs from plant to plant
and from machine to machine within plant. - Also we have n 5 measurements of paper
strength for each of the 24 machines
53The Data
54Anova Table Treating Factors (Plant, Machine) as
crossed
55Anova Table Two factor experiment B(machine)
nested in A (plant)