Section 3.4 Lecture: Two Way ANOVA Testing (With Interaction)
Overview
Brad Hall explains two-way ANOVA with interaction, adding a third test to determine whether the effect of one categorical factor depends on the level of another. He shows how to fill and interpret interaction ANOVA tables, then works through examples involving baking temperature and dough formulation, tire type and road surface, and an Excel analysis of material blends and curing methods.
Key takeaways
- In a two-way ANOVA with interaction, test the AB interaction before drawing conclusions about factors A and B separately.
- A significant interaction means the effect of one factor depends on the other factor's level, so separate main-effect conclusions may be misleading.
- For a balanced design with R rows, C columns, and W observations per cell, the interaction degrees of freedom are (R - 1)(C - 1), while error degrees of freedom are RC(W - 1).
- The baking example has a nonsignificant interaction p-value of 0.615, but significant main effects for temperature (0.026) and dough formulation (0.025) at alpha = 0.05.
- Excel's two-factor with replication analysis uses rows per sample to specify observations per factor combination; the material-strength example uses 3 replicates per cell and reports interaction p = 0.619.
Chapters
- The previous two-way ANOVA approach tested two categorical factors separately against a continuous response.
- Interaction occurs when the effect of one factor changes across levels of the other, such as departments responding differently to training programs.
- Brad Hall advises checking interaction before interpreting the factors individually.
- Factor A corresponds to columns and factor B to rows in the ANOVA setup.
- The interaction term, written AB, receives its own sum of squares, degrees of freedom, mean square, F statistic, and p-value.
- Estimating interaction separately generally requires more than one observation for each A-by-B level combination; W denotes observations per combination.
- The total sum of squares is partitioned into SSA, SSB, SSAB, and SSE.
- The interaction degrees of freedom are (C - 1)(R - 1), and MSAB is SSAB divided by those degrees of freedom.
- MSE is SSE divided by RC(W - 1); the F tests for A, B, and AB each divide the corresponding mean square by MSE.
- Each F test uses its own numerator degrees of freedom and the shared error denominator degrees of freedom to calculate a p-value.
- The interaction null hypothesis states that there is no interaction between factors A and B.
- If the interaction p-value exceeds alpha, fail to reject the null and proceed to assess the main effects separately.
- If the interaction p-value is at or below alpha, interpret the factors together because their effects depend on one another.
- The product-quality example has three baking temperatures, two dough formulations, and four observations per combination.
- At alpha = 0.05, the interaction p-value of 0.615 is not significant, so the main effects can be examined individually.
- The temperature p-value is 0.026 and the formulation p-value is 0.025, both below 0.05, indicating differences in mean quality across each factor's levels.
- The partially completed table identifies tire type as factor A, represented by columns, and road surface as factor B, represented by rows.
- The completed table has total degrees of freedom 17, with 2 for interaction, 12 for error, 1 for road surface, and 2 for tire type.
- From the provided values, MSB = 60, MSA = 40, MSAB = 7.5, and MSE = 10; the corresponding main-effect F statistics are 6 and 4.
- The total sample size is 18, with two road surfaces and three tire types, giving W = 18 ÷ (2 × 3) = 3 observations per combination.
- The interaction p-value is 0.493, above alpha = 0.05, so there is not sufficient evidence of a statistically significant interaction.
- The tire-type p-value is 0.047 and the road-surface p-value is 0.031, both below 0.05, indicating differences in mean stopping distance across their respective levels.
- The final example studies material blends as factor A, in columns, and curing methods as factor B, in rows.
- The dataset contains 18 observations arranged across three blends and two curing methods, with three observations per combination.
- Excel's two-factor with replication procedure is appropriate because the repeated observations allow the interaction term to be tested.
- In Data Analysis, select two-factor with replication and use input range A1:D7.
- Set rows per sample to 3, matching the three observations in each blend-by-curing-method combination, and set alpha to 0.05.
- Excel produces an ANOVA table with separate rows for the two factors, their interaction, and error.
- The interaction p-value is 0.619, greater than 0.05, so the example proceeds to assess the two main effects separately.
- Both factor p-values are effectively zero at the displayed precision and are below alpha = 0.05.
- Mean strength differs across the levels of both material blend and curing method.
Transcript excerpt
0:01 Hey everyone, this is section 3.4 on two-way ANOVA testing with interaction. This is the second section in the module 4 material and the final section that will conclude the unit 2 material all going towards the unit 2 test. So to motivate this section, we're going to compare it with what we've talked about before. So in the previous section for the two-way ANOVA test without interaction, we talked about how to apply ANOVA testing for two factors or categorical variables that we were using to compare with one another with over some response
0:49 variable, typically a continuous random variable, in order to see how they contribute towards the outcome. And what we did was we applied some ANOVA testing for that. We found that we've applied two p value measures and ultimately tried to determine for each factor ultimately whether for a given factor if the averages between the the populations were significantly different or not. So if we had a p value small enough then that told us that we had a rejection of the null hypothesis and that would tell us that the mean the mean differs among the different levels
1:50 assumption that we that sort of we sort of ignored which we're going to talk about now and that's this interactivity between the two factors. So there is some consideration that we have to take where the two factors the two categorical variables actually interact with one another. So in other words, if the level from one factor or possibly more levels, but at least one level from one factor significantly impacts another factor. So one example, a company wants to compare the mean employee productivity across several training programs and departments. So notice the two factors here, the
2:39 training programs and the departments. Those are two of the categorical
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Brad Hall.