Gasoline Consumption
A researcher wishes to see whether the type of gasoline used and the type of automobile driven have any effect on gasoline consumption. Two types of gasoline, regular and highoctane, will be used, and two types of automobiles, two-wheel- and all-wheel-drive, will be used in each group. There will be two automobiles in each group, for a total of eight automobiles used. Using a two-way analysis of variance, determine if there is an interactive effect, an effect due to the type of gasoline used, and an effect due to the type of vehicle driven.
The data (in miles per gallon) are shown here, and the summary table is given in Table 12-6.
Gas |
Type of automobile | |
Two-wheel-drive | All-wheel-drive | |
Regular | 26.7 | 28.6 |
25.2 | 29.3 | |
High-octane | 32.3 | 26.1 |
32.8 | 24.2 |
TABLE 12–6 ANOVA Summary Table for Example 12–5 | ||||
Source |
SS | d.f. | MS |
F |
Gasoline A |
3.920 |
|||
Automobile B |
9.680 |
|||
Interaction (A × B ) |
54.080 |
|||
Within (error) |
3.300 |
|||
Total |
70.980 |
Step 1 State the hypotheses. The hypotheses for the interaction are
H0 : There is no interaction effect between type of gasoline used and type of automobile a person drives on gasoline consumption.
H1 : There is an interaction effect between type of gasoline used and type of automobile a person drives on gasoline consumption.
The hypotheses for the gasoline types are
H0 : There is no difference between the means of gasoline consumption for two types of gasoline.
H1 : There is a difference between the means of gasoline consumption for two types of gasoline.
The hypotheses for the types of automobile driven are
H0 : There is no difference between the means of gasoline consumption for two-wheel-drive and all-wheel-drive automobiles.
H1 : There is a difference between the means of gasoline consumption for two-wheel-drive and all-wheel-drive automobiles.
Step 2 Find the critical values for each F test. In this case, each independent variable, or factor, has two levels. Hence, a 2×2 ANOVA table is used. Factor A is designated as the gasoline type. It has two levels, regular and high-octane; therefore, a=2. Factor B is designated as the automobile type. It also has two levels; therefore, b=2. The degrees of freedom for each factor are as follows:
Factor A: d.f.N. =a−1=2−1=1
Factor B: d.f.N. =b−1=2−1=1
Interaction (A×B): d.f.N. =(a−1)(b−1)=(2−1)(2−1)=1⋅1=1
Within (error): d.f.D. =ab(n−1)=2⋅2(2−1)=4
where n is the number of data values in each group. In this case, n=2.
The critical value for the FA test is found by using α=0.05, d.f.N. =1, and d.f.D. =4. In this case, FA=7.71. The critical value for the FB test is found by using α=0.05, d.f.N. =1, and d.f.D. =4; also FB is 7.71.
Finally, the critical value for the FA×B test is found by using d.f.N. =1 and d.f.D. =4; it is also 7.71.
Note: If there are different levels of the factors, the critical values will not all be the same. For example, if factor A has three levels and factor b has four levels, and if there are two subjects in each group, then the degrees of freedom are as follows:
d.f.N. d.f.N. d.f.N. d.f.D. =a−1=3−1=2=b−1=4−1=3=(a−1)(b−1)=(3−1)(4−1)=2⋅3=6=ab(n−1)=3⋅4(2−1)=12 factor A factor B factor A×B within (error) factor
Step 3 Complete the ANOVA summary table to get the test values. The mean squares are computed first.
MSAMSBMSA×BMSW=a−1SSA=2−13.920=3.920=b−1SSB=2−19.680=9.680=(a−1)(b−1)SSA×B=(2−1)(2−1)54.080=54.080=ab(n−1)SSW=43.300=0.825
The F values are computed next.
FA=MSWMSA=0.8253.920=4.752FB=MSWMSB=0.8259.680=11.733FA×B=MSWMSA×B=0.82554.080=65.552 d.f.N. =a−1=1 d.f.N. =b−1=1 d.f.N. =(a−1)(b−1)=1 d.f.D. =ab(n−1)=4 d.f.D. =ab(n−1)=4 d.f.D. =ab(n−1)=4
The completed ANOVA table is shown in Table 12-7.
Step 4 Make the decision. Since FB=11.733 and FA×B=65.552 are greater than the critical value 7.71, the null hypotheses concerning the type of automobile driven and the interaction effect should be rejected. Since the interaction effect is statistically significant, no decision should be made about the automobile type without further investigation.
Step 5 Summarize the results. Since the null hypothesis for the interaction effect was rejected, it can be concluded that the combination of type of gasoline and type of automobile does affect gasoline consumption.
TABLE 12–7 | Completed ANOVA Summary Table for Example 12–5 | |||
Source | SS | d.f. | MS | F |
Gasoline A | 3.920 | 1 | 3.920 | 4.752 |
Automobile B | 9.680 | 1 | 9.680 | 11.733 |
Interaction (A × B ) | 54.080 | 1 | 54.080 | 65.552 |
Within (error) | 3.300 | 4 | 0.825 | |
Total | 70.980 | 7 |