252anovaex4 10/25/07 (Open this document in 'page layout' view.)

Example of 3-way ANOVA

We have measurements that describe the mpg gotten by 8 drivers (Factor 1), using 6 cars (Factor 2) during 4 seasons (Factor C). For each combination of factors there are 10 measurements. The SS1 is 700, SS2 is 400, and SS3 is 300. For the interactions SS12 = 50, SS13 = 60 and SS23=70. The within (error or residual) sum of squares is 100 and the total sums of squares is 1700. Set up an ANOVA table showing all interactions. Assume a 5% significance level.

Solution: The sums of squares have been copied into the table below. If we multiply the levels of the factors together and then multiply by the number of measurements per cell, we find a total of measurements. There are a total of 1920 – 1 = 1919 degrees of freedom. Since drivers has 8 levels there are 7 degrees of freedom. Similarly for cars there are 6 – 1 = 5 degrees of freedom and for seasons there are 3 degrees of freedom. These are also shown below.

Source / / / / /
Driver (1) / 700 / 7
Car (2) / 400 / 5
Season (3) / 300 / 3
Interaction (12) / 50
Interaction (13) / 60
Interaction (23) / 70
Interaction (123)
Within / 100 / .
Total / 1700 / 1919

Since the sums of squares must add up, to get the missing sum of squares, subtract the sum of the numbers above the line (1680) from the total sum of squares (1700) and get 20. To get the degrees of freedom for interactions multiply the degrees of freedom for the factors. For example This is shown below.

Source / / / / /
Driver (1) / 700 / 7
Car (2) / 400 / 5
Season (3) / 300 / 3
Interaction (12) / 50 / 35
Interaction (13) / 60 / 21
Interaction (23) / 70 / 15
Interaction (123) / 20 / 105
Within / 100 / .
Total / 1700 / 1919

Since the degrees of freedom must add up, add the degrees of freedom above the line to get 191 and subtract from the total degrees of freedom to get 1919 – 191 = 1728. To get the mean squared column, divide the items in the SS column by the corresponding items in the MS column.

Source / / / / /
Driver (1) / 700 / 7 / 100.00
Car (2) / 400 / 5 / 80.00
Season (3) / 300 / 3 / 100.00
Interaction (12) / 50 / 35 / 1.4286
Interaction (13) / 60 / 21 / 2.8571
Interaction (23) / 70 / 15 / 4.6667
Interaction (123) / 20 / 105 / 0.1905
Within / 100 / 1728 / 0.05787
Total / 1700 / 1919

To get the items in the column for computed Fs, divide the mean squares by the within mean square.

Source / / / / /
Driver (1) / 700 / 7 / 100.00 / 1728
Car (2) / 400 / 5 / 80.00 / 1382
Season (3) / 300 / 3 / 100.00 / 1728
Interaction (12) / 50 / 35 / 1.4286 / 24.68
Interaction (13) / 60 / 21 / 2.8571 / 49.37
Interaction (23) / 70 / 15 / 4.6667 / 80.64
Interaction (123) / 20 / 105 / 0.1905 / 3.29
Within / 100 / 1728 / 0.05787
Total / 1700 / 1919

Now look up values of on the F table. The degrees of freedom for the numerator are given in the DF column. The degrees of freedom for the denominator are 1728.

Source / / / / /
Driver (1) / 700 / 7 / 100.00 / 1728 /
Car (2) / 400 / 5 / 80.00 / 1382 /
Season (3) / 300 / 3 / 100.00 / 1728 /
Interaction (12) / 50 / 35 / 1.4286 / 24.68 /
Interaction (13) / 60 / 21 / 2.8571 / 49.37 /
Interaction (23) / 70 / 15 / 4.6667 / 80.64 /
Interaction (123) / 20 / 105 / 0.1905 / 3.29 /
Within / 100 / 1728 / 0.05787
Total / 1700 / 1919

Look up the table values of F. I have used the parts of the table where the denominator degrees of freedom are 1000 and have come as close as possible for the numerator. We have tested seven null hypotheses. The first three of these are that there are no significant differences between driver, car and season means, and the remaining four are that there is no interaction of the type described. In every case, the null hypothesis was rejected because the computed F exceeded the table F, so the computed F was labeled with an ‘s.’

Source / / / / /
Driver (1) / 700 / 7 / 100.00 / 1728s / =2.02
Car (2) / 400 / 5 / 80.00 / 1382s / = 2.22
Season (3) / 300 / 3 / 100.00 / 1728s / = 2.61
Interaction (12) / 50 / 35 / 1.4286 / 24.68s / =1.44
Interaction (13) / 60 / 21 / 2.8571 / 49.37s / = 1.58
Interaction (23) / 70 / 15 / 4.6667 / 80.64s / = 1.70
Interaction (123) / 20 / 105 / 0.1905 / 3.29s / = 1.26
Within / 100 / 1728 / 0.05787
Total / 1700 / 1919

1