CG9_99_15.1

The Two-Way ANOVA

The ANOVA can be extended to more complex designs, in which there are 2 or more independent variables. With ANOVA, we can take an experiment that has any number of independent variables, and simultaneously examine:

(1) The effect of each variable,

independent of the other variables.

(2) The combined effect of any group of

variables.

Overview

Suppose we’re interested in studying advertising methods. We want to know whether louder advertisements are more persuasive. We could answer this question with a one-factor design, and test it with a one-way ANOVA. For example, we might have one independent variable with 3 levels (soft, medium, loud).

Our design:

Factor A: Volume
Level A1:
Soft / Level A2: Medium / Level A3:
Loud
X / X / X
X / X / X
X / X / X
X / X / X
X / X / X
X / X / X

nA1 = 6 /
nA2 = 6 /
nA3 = 6

But suppose we also thought that there would be a gender difference in ad persuasiveness. In order to test this, we would need a second factor: gender.

Factor B:
Gender / Level B1:
Male / X / X / X / X / X / X /
nB1 = 6
Level B2:
Female / X / X / X / X / X / X /
nB2 = 6

We can use a 2-way design to combine these two factors:

Factor B:
Gender / Factor A: Volume
A1:
Soft / A2: Medium / A3: Loud
B1:
Male / X
X
X

nA1B1= 3 / X
X
X

nA2B1= 3 / X
X
X

nA3B1= 3
B2:
Female / X
X
X

nA1B2= 3 / X
X
X

nA2B2= 3 / X
X
X

nA3B2= 3

This is a 3  2 design: there are 3 levels of the

first factor and 2 levels of the second factor.

This is a complete factorial design: all levels of

one factor are combined with all levels of the other factor.

Each combination of one level of A with one level of B is a cell. We have 6 cells in this experiment.

Why combine both factors into a single experiment, and analyze them at once?

We could study each factor in a separate experiment, but then we would lose something important: the ability to study the interaction between the two variables.

An interaction occurs when the effects of one variable are different for different levels of another variable.

For example, if the volume of an advertisement affected its persuasiveness for men but not for women, we would have an interaction between gender and volume.

In multi-factor ANOVA, we can investigate the effects of each variable, and we can investigate the interaction among the variables.

Computing the Two-Way ANOVA

In the one-way ANOVA, we partitioned the total variance in the data and attributed it to two sources: variance between groups and variance within groups.

In the two-way ANOVA, we further partition the variance between groups. Some of that variance is due to Factor A, some is due to Factor B, and some is due to the interaction between A and B.

So we break down the variance as follows:

SSTotal

SSWithinSSBetween

SSASSBSSAB

The effects of A and B are main effects.

The main effect of a factor is the effect of that factor, ignoring all other factors in the experiment.

For example, to examine the main effect of volume, we ignore the fact that there are 3 men and 3 women at each level of volume; we simply group their 6 scores together.

This is sometimes called “collapsing across Factor B.” For example, we examine the main effect of volume by collapsing across gender.

When we examine interaction effects, we don’t collapse across either of the factors.

In carrying out a two-way ANOVA, we compute a separate F ratio for each main effect and interaction in the experiment.

Our ANOVA summary table:

Source / Sum of Squares / df / Mean square / F
Between
Factor A / SSA / dfA / MSA / Fobt
Factor B / SSB / dfB / MSB / Fobt
A  B / SSAB / dfAB / MSAB / Fobt
Within / SSW / dfW / MSW
Total / SST / dfT

Where:

dfA = kA – 1 = # of levels in A – 1

dfB = kB – 1

dfAB = dfA dfB

dfW = N – (kA kB) = N – total # of cells

dfT = N – 1

Data:

Factor B:
Gender / Factor A: Volume
A1:
Soft / A2: Medium / A3: Loud
B1:
Male / 4
9
11 / 8
12
13 / 18
17
15
B2:
Female / 2
6
4 / 9
10
17 / 6
8
4

CG9_99_15.1

Summary:

Factor A: Volume
A1:
Soft / A2:
Medium / A3:
Loud
B1: M /
X = 24
X2 = 218
n = 3 /
X = 33
X2 = 377
n = 3 /
X = 50
X2 = 838
n = 3 /
X = 107
n = 9
B2: F /
X = 12
X2 = 56
n = 3 /
X = 36
X2 = 470
n = 3 /
X = 18
X2 = 116
n = 3 /
X = 66
n = 9

X = 36
n = 6 /
X = 69
n = 6 /
X = 68
n = 6 /
N = 18

CG9_99_15.1

Steps in the 2-way ANOVA

1. Calculate SST.

2. Calculate SSW.

3. Calculate SSA.

4. Calculate SSB.

5. Calculate SSAB.

6. Calculate MSA, MSB, MSAB, and MSW.

7. Compute F ratios for main effects and

interaction.

8. Evaluate each Fobt against appropriate Fcrit.

Step 1: Calculate SST.

Step 2: Calculate SSW.

Step 3: Calculate SSA.

Step 4: Calculate SSB.

Step 5: Calculate SSAB.

We already know that:

SSA = 117.45SSB = 93.39

So…

SSAB = 1976.33 – 1662.72 – 117.45 – 93.39

= 102.77

Step 6: Calculate Mean Squares

dfA = # of levels in A – 1 = 3 – 1 = 2

dfB = # of levels in B – 1 = 2 – 1 = 1

dfAB = dfA dfB = (2)(1) = 2

dfW = N – total # of cells = 18 – 6 = 12

Step 7: Calculate Fobt for each main effect and

interaction.

Factor A (volume) main effect:

Factor B (gender) main effect:

Interaction effect:

So, the complete ANOVA summary table is:

Source / Sum of Squares / df / Mean square / F
Between
Factor A / 117.45 / 2 / 58.73 / 7.14
Factor B / 93.39 / 1 / 93.39 / 11.36
A  B / 102.77 / 2 / 51.39 / 6.25
Within / 98.67 / 12 / 8.22
Total / 412.28 / 17

Step 8: Evaluate against Fcrit.

Factor A main effect:

 = 0.05

df in numerator = dfA = 2

df in denominator = dfW = 12

Fcrit = 3.88

Fobt > Fcrit there is a significant main

effect of volume

Factor B main effect:

 = 0.05

df in numerator = dfB = 1

df in denominator = dfW = 12

Fcrit = 4.75

Fobt > Fcrit there is a significant main

effect of gender

Interaction effect:

 = 0.05

df in numerator = dfAB = 2

df in denominator = dfW = 12

Fcrit = 3.88

Fobt > Fcrit there is a significant interaction

between volume and gender

Interpreting the Two-Way Experiment

To understand what these results mean, a good first step is to graph the data.

In general, the main effects and interactions can be inferred from graphs of the data, although (of course) the appropriate statistical tests still need to be run.

Consider what the following graphs would reveal (see p. 373 in text):

What does the graph of our data reveal?

To further explore what the data mean, need to do the appropriate multiple comparisons (more on this next week).