# Two-way factorial ANOVA in PASW (SPSS)

When do we do Two-way factorial ANOVA?
We run two-way factorial ANOVA when we want to study the effect of two independent categorical variables on the dependent variable. In a two-way factorial ANOVA, we can test the main effect of each independent variable. We can also test if the effect of one indpendent variable on the dependent variable is the same across all level of the other independent variable, that is, if there is any interaction between the independent variables.

Example Scenario
A professor of a statistics course was interested in the effect of proximity to the final exam (5 weeks away, 1 week) on the stress levels of psychology and business students. He measured their level of perceived stress on a standardized questionnaire. In this scenario, stress is the dependent variable while proximity and students' field of study are independent variables.

In this example, we have three sets of hypotheses.

• Hypothesis 1
• Null hypothesis: Proximity to the final exam has no effect on students' stress level.
• Alternative hypothesis: Proximity to the final exam has an effect on students' stress level.
• Hypothesis 2
• Null hypothesis: The stress levels of psychology students and business students are the same.
• Alternative hypothesis: The stress levels of psychology students and business students are not the same.
• Hypothesis 3
• Null hypothesis: There is no interaction between students' field of study and proximity to the final exam. That is, the effect of proximity to the final exam is the same for psychology student and business student.
• Alternative hypothesis: There is an interaction between students' field of study and proximity to the final exam. That is, the effect of proximity to the final exam is different for psychology student and business student.

In the data, the first column is stress score, the second column is field of study and the third is proximity to the final exam. The dataset can be obtained here. Step 1
Select "Analyze -> General Linear Model -> Univariate". A new window pops out. The three variables "Stress", "Field of study" and "Proximity" will be shown on the list on the left.

Step 2
Select "Stress" as "Dependent Variable" and "Field of study" and "Proximity" as "Fixed Factor(s)". Now click "Model" on the right. A new window pops out. Make sure that the "Full factorial" box at the top is checked. Click "Continue". The window will the be closed. In two-way factorial ANOVA, the interaction plots are very useful for interpreting interaction effects. In this case, the interaction plot will help us to interpret the combined effect of field of study and proximity to the final exam. We can obtain these plots by clicking "Plots" on the right. A new window pops out. Select "Proximity" as "Horizontal Axis" and "Field of study" as "Separate Lines". In fact, it doesn't matter which way round the variables are plotted; you should use your discretion as to which way produces the most sensible plot. Click "Add" and then "Continue" The window will then be closed. Now click "OK" in the original window.

Step 3
The results now pop out in the "Output" window. Step 4
We can now interpret the result. From A in the second table, the p-value for the main effect of field of study is 0.682 and therefore the effect of field of study is not significant. We can conclude that on average, the stress levels of psychology students and business students are the same. From B, the p-value for proximity is 0.028; we can therefore conclude that the main effect of proximity is significant. From C, the p-value for the interaction is 0.039; the interaction is significant and we can conclude that the effect of proximity on stress levels for psychology students and business students are not the same. The interaction plot below suggest that as the final exam approaches, the stress level of business students soars but that of psychology students remains pretty much the same.  © Maths-Statistics-Tutor.com 2010 Web Development Team.