18|FACTORIAL ANOVA

Overview

Logic

Terminology

  • Factor
    • The variable that designates the groups being compared
    • Between-participants / within-participants
  • Levels
    • Individual conditions or values that make up a factor
  • Factorial design
    • A study that combines two (or more) factors, each with two (or more) levels
    • Can be manipulated between-participants or within-participants (or mixed-factorial design)
    • E.g. 2x2 between-participants ANOVA

Logic

Factor A
\(A_1\) \(A_2\)
Factor B \(B_1\) \(A_1 B_1\) \(A_2 B_1\)
\(B_2\) \(A_1 B_2\) \(A_2 B_2\)

Logic

Factor A
\(A_1\) \(A_2\)
Factor B \(B_1\) \(A_1 B_1\) \(A_2 B_1\)
\(B_2\) \(A_1 B_2\) \(A_2 B_2\)
  • Three hypotheses tested by three \(F\)-ratios
    1. Main effect of Factor \(A\)

Logic

Factor A
\(A_1\) \(A_2\)
Factor B \(B_1\) \(A_1 B_1\) \(A_2 B_1\)
\(B_2\) \(A_1 B_2\) \(A_2 B_2\)
  • Three hypotheses tested by three \(F\)-ratios
    1. Main effect of Factor \(B\)

Logic

Factor A
\(A_1\) \(A_2\)
Factor B \(B_1\) \(A_1 B_1\) \(A_2 B_1\)
\(B_2\) \(A_1 B_2\) \(A_2 B_2\)
  • Three hypotheses tested by three \(F\)-ratios
    1. Interaction between \(A\) and \(B\)

Logic

Factor A
\(A_1\) \(A_2\)
Factor B \(B_1\) \(A_1 B_1\) \(A_2 B_1\)
\(B_2\) \(A_1 B_2\) \(A_2 B_2\)
  • Three hypotheses tested by three \(F\)-ratios
    • Each tested with same basic \(F\)-ratio structure

\(F = \dfrac{\textrm{variance between treatments}}{\textrm{variance expected with no treatment effect}}\)

Calculations

Example data

Snack
Banana Candy
Test Math 7, 9, 8, 9 5, 3, 4, 4
Reaction time 5, 4, 6, 5 6, 6, 5, 5

Partitioning variance

Total variance

Variance between treatments
\(MS_{between \ treatments}\)

Variance within groups
\(MS_{within}\)

Factor A
\(MS_{A}\)

Factor B
\(MS_{B}\)

Interaction
\(MS_{A*B}\)

Partitioning variance

\(SS_{total}\)

\(SS_{between}\) \(SS_{within}\)

\(SS_A\) \(SS_B\) \(SS_{A*B}\)

\(df_{total}\)

\(df_{between}\) \(df_{within}\)

\(df_A\) \(df_B\) \(df_{A*B}\)

\(SS_{total} = \Sigma X^2 - \dfrac{G^2}{N}\)
\(SS_{within} = \Sigma SS_{within \ each \ treatment}\)
\(SS_{between} = \Sigma \dfrac{T^2}{n} - \dfrac{G^2}{N}\)
\(SS_{A} = \Sigma \dfrac{T^2_{col}}{n_{col}} - \dfrac{G^2}{N}\)
\(SS_{B} = \Sigma \dfrac{T^2_{row}}{n_{row}} - \dfrac{G^2}{N}\)
\(SS_{A*B} = SS_{between}-SS_{A}-SS_{B}\)

\(df_{total} = N-1\)
\(df_{within} = N-k\)
\(df_{between} = k-1\)
\(df_{A} = k_A-1\)
\(df_{B} = k_B-1\)
\(df_{A*B} = df_{between}-df_A-df_B\)

Summary table

Source \(SS\) \(df\) \(MS\) \(F\)
Between treatments
   Factor A
   Factor B
   A * B interaction
Within treatments
Total

Hypothesis test

Step 1. Hypotheses

Snack
Banana Candy
Test Math 7, 9, 8, 9 5, 3, 4, 4
Reaction time 5, 4, 6, 5 6, 6, 5, 5
  • Main effect of Snack Type
    • \(H_0\): \(\mu_{banana} = \mu_{candy}\)
    • \(H_1\): \(\mu_{banana} \ne \mu_{candy}\)
  • Main effect of Test Type
    • \(H_0\): \(\mu_{math} = \mu_{RT}\)
    • \(H_1\): \(\mu_{math} \ne \mu_{RT}\)
  • Snack * Test interaction
    • \(H_0\): No interaction
    • \(H_1\): There is an interaction

Step 2. Critical region

  • Step 2. Critical region
    • Numerators: \(\begin{align} &df_{A} = k_A-1 = 1 \\ &df_{B} = k_B-1 = 1 \\ &df_{A*B} = k-1 - df_A - df_B = 1 \end{align}\)
    • Denominator: \(df_{within} = N-k = 12\)
\(\alpha = .05\)
\(df_{numerator}\)
\(df_{denominator}\) 1 2 3 4 5 6 7 8 9 10
5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 4.77 4.74
6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 4.10 4.06
7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 3.68 3.64
8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 3.39 3.35
9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 3.18 3.14
10 4.96 4.10 3.71 3.48 3.33 3.22 3.13 3.07 3.02 2.98
11 4.84 3.98 3.59 3.36 3.20 3.10 3.01 2.95 2.90 2.85
12 4.75 3.88 3.49 3.26 3.11 3.00 2.91 2.85 2.80 2.75
13 4.67 3.81 3.41 3.18 3.02 2.92 2.83 2.77 2.71 2.67
14 4.60 3.74 3.34 3.11 2.96 2.85 2.76 2.70 2.65 2.60
15 4.54 3.68 3.29 3.06 2.90 2.79 2.71 2.64 2.59 2.54

Step 3. Calculations

Snack
Banana Candy
Test Math \(T = 33\)
\(SS = 2.75\)
\(T = 16\)
\(SS = 2\)
Reaction time \(T = 20\)
\(SS = 2\)
\(T = 22\)
\(SS = 1\)

\(T_{col}\) \(53\) \(38\)

\(T_{row}\)

\(49\)

\(42\)

\(N = 16\)
\(n = 4\)
\(k = 4\)
\(k_A = 2\)
\(k_B = 2\)
\(G = 91\)
\(\Sigma X^2 = 565\)

\[\begin{align} df_{total} &= N-1 = 15 \\ df_{within} &= N-k = 12 \\ df_{between} &= k-1 = 3\\ df_{A} &= k_A-1 = 1\\ df_{B} &= k_B-1 = 1\\ df_{A*B} &= df_{between} - df_A - df_B = 1\\ \end{align}\]

Step 3. Calculations

Snack
Banana Candy
Test Math \(T = 33\)
\(SS = 2.75\)
\(T = 16\)
\(SS = 2\)
Reaction time \(T = 20\)
\(SS = 2\)
\(T = 22\)
\(SS = 1\)

\(T_{col}\) \(53\) \(38\)

\(T_{row}\)

\(49\)

\(42\)

\(N = 16\)
\(n = 4\)
\(k = 4\)
\(k_A = 2\)
\(k_B = 2\)
\(G = 91\)
\(\Sigma X^2 = 565\)

\[\begin{align} SS_{total} &= \Sigma X^2 - \dfrac{G^2}{N} = 47.44\\ SS_{within} &= \Sigma SS_{within \ each \ treatment} = 7.75\\ SS_{between} &= \Sigma \dfrac{T^2}{n} - \dfrac{G^2}{N} = 39.69 \\ \end{align}\]

Step 3. Calculations

Snack
Banana Candy
Test Math \(T = 33\)
\(SS = 2.75\)
\(T = 16\)
\(SS = 2\)
Reaction time \(T = 20\)
\(SS = 2\)
\(T = 22\)
\(SS = 1\)

\(T_{col}\) \(53\) \(38\)

\(T_{row}\)

\(49\)

\(42\)

\(N = 16\)
\(n = 4\)
\(k = 4\)
\(k_A = 2\)
\(k_B = 2\)
\(G = 91\)
\(\Sigma X^2 = 565\)

\[\begin{align} SS_{A} &= \Sigma \dfrac{T^2_{col}}{n_{col}} - \dfrac{G^2}{N} = 14.06\\ SS_{B} &= \Sigma \dfrac{T^2_{row}}{n_{row}} - \dfrac{G^2}{N} = 3.06\\ SS_{A*B} &= \Sigma SS_{between}-SS_A - SS_B = 22.56 \end{align}\]

Step 3. Calculations

Snack
Banana Candy
Test Math \(T = 33\)
\(SS = 2.75\)
\(T = 16\)
\(SS = 2\)
Reaction time \(T = 20\)
\(SS = 2\)
\(T = 22\)
\(SS = 1\)

\(T_{col}\) \(53\) \(38\)

\(T_{row}\)

\(49\)

\(42\)

\(N = 16\)
\(n = 4\)
\(k = 4\)
\(k_A = 2\)
\(k_B = 2\)
\(G = 91\)
\(\Sigma X^2 = 565\)

\(MS_{A} = \dfrac{SS_{A}}{df_{A}} = 14.06 \ \ \ \ \ \ \ \ MS_{B} = \dfrac{SS_{B}}{df_{B}} = 3.06\)

\(MS_{A*B} = \dfrac{SS_{A*B}}{df_{A*B}} = 22.56\)

\(MS_{within} = \dfrac{SS_{within}}{df_{within}} = 0.65\)

Step 3. Calculations

Snack
Banana Candy
Test Math \(T = 33\)
\(SS = 2.75\)
\(T = 16\)
\(SS = 2\)
Reaction time \(T = 20\)
\(SS = 2\)
\(T = 22\)
\(SS = 1\)

\(T_{col}\) \(53\) \(38\)

\(T_{row}\)

\(49\)

\(42\)

\(N = 16\)
\(n = 4\)
\(k = 4\)
\(k_A = 2\)
\(k_B = 2\)
\(G = 91\)
\(\Sigma X^2 = 565\)

\(F_A = \dfrac{MS_{A}}{MS_{within}} = 21.77\)

\(F_B = \dfrac{MS_{B}}{MS_{within}} = 4.74\)

\(F_{A*B} = \dfrac{MS_{A*B}}{MS_{within}} = 34.94\)

Step 4a. Decision

  • For each \(F\)-ratio, reject or fail to reject \(H_0\)
    • Compare calculated \(F\) to corresponding \(F_{critical}\)

Step 4b. Effect size

  • \(\eta^2_{partial}\)
    • Percentage of variability not explained by other factors
    • Separate effect size for each \(F\)-ratio

\(\eta^2_A = \dfrac{SS_A}{SS_{total}-SS_{B} - SS_{A*B}} = 0.64\)

\(\eta^2_B = \dfrac{SS_B}{SS_{total}-SS_{A} - SS_{A*B}} = 0.28\)

\(\eta^2_{A*B} = \dfrac{SS_{A*B}}{SS_{total}-SS_{A} - SS_{B}} = 0.74\)

Step 5. Report results

  • Descriptives (usually in a table or graph)
  • Results of hypothesis test for all three tests

To examine the influence of snack and test type on performance, a 2-factor ANOVA was conducted with test scores as the dependent variable and Snack Type and Test Type as between-participants independent variables. There was no significant main effect of Test Type \((F (1, 12) = 4.74\), \(p > .05)\). There was, however, significant main effect of Snack Type \((F (1, 12) = 21.77\), \(p < .05\), \(\eta^2 = .64)\); overall, performance was superior in the Banana condition. Moreover, there was a significant interaction between Snack Type and Test Type \((F (1, 12) = 34.94\), \(p < .05\), \(\eta^2 = .74)\); performance on the math test was affected by snack type to a greater extent than performance on the reaction time test. The pattern of means and standard deviations is shown in Table 1. Trends are illustrated in Figure 1.

Figure 1. Test performance by snack and test type

Interpretation

Interpreting interaction graphs

  • Slope indicates main effect of factor on x-axis
  • Distance between lines indicates main effect of other factor
  • Parallel lines indicate no interaction

Interpreting interaction graphs

Interpreting interaction graphs

Interpreting interaction graphs

Interpreting interaction graphs

Interpreting interaction graphs

Your turn

  • Come up with your own example
    • 2 IVs with 2 levels each
    • 1 DV (the thing you measure, e.g. test performance)
    • Sketch graph of expected results

Learning checks

  • True or False?
    • Two separate single-factor ANOVAs provide exactly the same information that is obtained from a two-factor analysis of variance
    • A disadvantage of combining 2 factors in an experiment is that you cannot determine how either factor would affect participants’ scores if it were examined in an experiment by itself
    • If a two-factor analysis of variance produces a statistically significant interaction, then you can conclude that either/both main effects for factor A or factor B are also significant