How to apply the two way ANOVA test in SPSS?

By Priya Chetty on February 14, 2022

Two way ANOVA is the test used in SPSS for understanding how the changes in two groups of elements simultaneously affect the third element. Here, the initial two groups of elements are called ‘independent variables’ whereas the third element is the ‘dependent variable’. Such a comparison is possible when both variables have similar categories or classifications.


To understand whether there is a combined effect of gender and educational level on test anxiety amongst university students. Here, gender (males/females) and education level (undergraduate/postgraduate) are independent variables, and test anxiety is the dependent variable. Similarly, in another case, to determine how physical activity level and gender can be considered together. As the blood cholesterol levels in children differ (concluded from the literature review), the application of the two-way ANOVA test is feasible.

The first step of applying the two way ANOVA test

Click Analyze > General Linear Model > Univariate… on the top menu, as shown below.

The first step of applying the two way ANOVA test
Figure 1: Analyze tab

The second step is to define the variables

Drag the response variable height into the box labelled Dependent variable. Drag the two-factor variables water and sun into the box labelled Fixed Factor, using relevant buttons, as shown below:

Univariate dialogue box
Figure 2: Univariate dialogue box

Add factors

Next, click the Plots button. Drag water into the box labelled Horizontal axis and sun into the box labelled in separate lines. Then click Add. The words water*sun will appear in the box labelled Plots. Then click Continue.

Adding factors for two way anova test
Figure 3: Adding factors

Post Hoc multiple comparisons

Next, click the Post Hoc button. In the new window that pops up, drag the variable sun into the box labelled Post Hoc Tests. Then check the box next to Tukey. Then click Continue.

Applying post hoc test
Figure 4: Applying post hoc test

Calculating estimated marginal means

Next, click the EM Means button. Drag the following variables into the box labelled Display Means for. Then click Continue.

Calculating Estimated marginal means
Figure 5: Calculating Estimated marginal means

Lastly, click OK. The following output window pops up:

Figure 6: Output window

Interpreting two way ANOVA test results in SPSS

Taking a case of a study to find whether an individual’s IQ score is influenced by their level of education and gender. The study incorporated a random sample of participants and asked about their interest in politics. The participants scored from 0 to 100, with higher scores indicating a greater interest in politics. The participants were then divided on the basis of gender and their level of education.

Therefore, the dependent variable was “IQ score”, and the two independent variables were “gender” and “education”. The results of the case are presented below:

Descriptive statistics table showing two-way ANOVA test in SPSS
Figure 7: Descriptive statistics table showing two-way ANOVA test in SPSS

The above table shows the generic statistics of the case, i.e. mean and standard deviation. In our case, the descriptive statistics table shows that among the selected respondents:

  • the average IQ of males is more than that of females at the University level
  • the average IQ of males and females is the same at the College level.

However, as the standard deviation for college-going males is close to 4.5 this shows there is high variability in their data compared to females.

Between subject effects
Figure 8: Between subject effects

The between-subject effects table shows the significance value for interaction between the variables. The significance value should always be less than 0.05 or 0.10 in order to prove an effect. However, in the case of this example, the effect is 0.203 which is more than  0.05. Therefore we must conclude through the two way ANOVA test that gender and education do not affect the IQ score.


Priya is the co-founder and Managing Partner of Project Guru, a research and analytics firm based in Gurgaon. She is responsible for the human resource planning and operations functions. Her expertise in analytics has been used in a number of service-based industries like education and financial services.

Her foundational educational is from St. Xaviers High School (Mumbai). She also holds MBA degree in Marketing and Finance from the Indian Institute of Planning and Management, Delhi (2008).

Some of the notable projects she has worked on include:

  • Using systems thinking to improve sustainability in operations: A study carried out in Malaysia in partnership with Universiti Kuala Lumpur.
  • Assessing customer satisfaction with in-house doctors of Jiva Ayurveda (a project executed for the company)
  • Predicting the potential impact of green hydrogen microgirds (A project executed for the Government of South Africa)

She is a key contributor to the in-house research platform Knowledge Tank.

She currently holds over 300 citations from her contributions to the platform.

She has also been a guest speaker at various institutes such as JIMS (Delhi), BPIT (Delhi), and SVU (Tirupati).



2 thoughts on “How to apply the two way ANOVA test in SPSS?”