One-way ANOVA
What is this test for?
The one-way analysis of variance (ANOVA) is used to determine whether there are any
significant differences between the means of three or more independent (unrelated) groups. This
guide will provide a brief introduction to the one-way ANOVA, including the assumptions of the
test and when you should use this test. If you are familiar with the one-way ANOVA, you can
skip this guide and go straight to how to run this test in SPSS Statistics by clicking here.
What does this test do?
The one-way ANOVA compares the means between the groups you are interested in and
determines whether any of those means are significantly different from each other. Specifically,
it tests the null hypothesis:
where µ = group mean and k = number of groups. If, however, the one-way ANOVA returns a
significant result, we accept the alternative hypothesis (HA), which is that there are at least 2
group means that are significantly different from each other.
At this point, it is important to realize that the one-way ANOVA is an omnibus test statistic and
cannot tell you which specific groups were significantly different from each other, only that at
least two groups were. To determine which specific groups differed from each other, you need to
use a post hoc test. Post hoc tests are described later in this guide.
When might you need to use this test?
If you are dealing with individuals, you are likely to encounter this situation using two different
types of study design:
One study design is to recruit a group of individuals and then randomly split this group into 3 or
more smaller groups (i.e., each subject is allocated to one, and only one, group). You then get
each group to undertake different tasks (or put them under different conditions) and measure the
outcome/response on the same dependent variable. For example, a researcher wishes to know
whether different pacing strategies affect the time to complete a marathon. The researcher
randomly assigns a group of volunteers to either a group that (a) starts slow and then increases
their speed, (b) starts fast and slows down or (c) runs at a steady pace throughout. The time to
complete the marathon is the outcome (dependent) variable. This study design is illustrated
schematically in the Figure below:
A second study design is to recruit a group of individuals and then split them into groups based
on some independent variable. Again, each individual will be assigned to one group only. This
independent variable is sometimes called an attribute independent variable because you are
splitting the group based on some attribute that they possess (e.g., their level of education; every
individual has a level of education, even if it is "none"). Each group is then measured on the
same dependent variable having undergone the same task or condition (or none at all). For
example, a researcher is interested in determining whether there are differences in leg strength
between amateur, semi-professional and professional rugby players. The force/strength measured
on an isokinetic machine is the dependent variable. This type of study design is illustrated
schematically in the Figure below:
One-way ANOVA in SPSS Statistics (cont...)
SPSS Statistics Output of the one-way ANOVA
SPSS Statistics generates quite a few tables in its one-way ANOVA analysis. In this section, we
show you only the main tables required to understand your results from the one-way ANOVA
and Tukey post-hoc tests. For a complete explanation of the output you have to interpret when
checking your data for the six assumptions required to carry out a one-way ANOVA, see our
enhanced guide here. This includes relevant boxplots, and output from your Shapiro-Wilk test
for normality and test for homogeneity of variances. Also, if your data failed the assumption of
homogeneity of variances, we take you through the results for Welch ANOVA, which you will
have to interpret rather than the standard one-way ANOVA in this guide. Below, we focus on the
descriptives table, as well as the results for the one-way ANOVA and Tukey post-hoc test only.
We will go through each table in turn
SPSS Statisticstop ^
Descriptives Table
The descriptives table (see below) provides some very useful descriptive statistics, including the
mean, standard deviation and 95% confidence intervals for the dependent variable (Time) for
each separate group (Beginners, Intermediate and Advanced), as well as when all groups are
combined (Total). These figures are useful when you need to describe your data.
Published with written permission from SPSS Statistics, IBM Corporation.
SPSS Statisticstop ^
ANOVA Table
This is the table that shows the output of the ANOVA analysis and whether we have a
statistically significant difference between our group means. We can see that the significance
level is 0.021 (p = .021), which is below 0.05. and, therefore, there is a statistically significant
difference in the mean length of time to complete the spreadsheet problem between the different
courses taken. This is great to know, but we do not know which of the specific groups differed.
Luckily, we can find this out in the Multiple Comparisons table which contains the results of
post-hoc tests.
Published with written permission from SPSS Statistics, IBM Corporation.
SPSS Statisticstop ^
Multiple Comparisons Table
From the results so far, we know that there are significant differences between the groups as a
whole. The table below, Multiple Comparisons, shows which groups differed from each other.
The Tukey post-hoc test is generally the preferred test for conducting post-hoc tests on a one-
way ANOVA, but there are many others. We can see from the table below that there is a
significant difference in time to complete the problem between the group that took the beginner
course and the intermediate course (p = 0.046), as well as between the beginner course and
advanced course (p = 0.034). However, there were no differences between the groups that took
the intermediate and advanced course (p = 0.989).
Published with written permission from SPSS Statistics, IBM Corporation.
It is also possible to run comparisons between specific groups that you decided were of interest
before you looked at your results. For example, you might have expressed an interest in knowing
the difference in the completion time between the beginner and intermediate course groups. This
type of comparison is often called a planned contrast or a simple custom contrast. However, you
do not have to confine yourself to the comparison between two time points only. You might have
had an interest in understanding the difference in completion time between the beginner course
group and the average of the intermediate and advanced course groups. This is called a complex
contrast. All these types of custom contrast are available in SPSS Statistics. In our enhanced
guide we show you how to run custom contrasts in SPSS Statistics using syntax (or sometimes a
combination of the graphical user interface and syntax) and how to interpret and report the
results. In addition, we also show how to "trick" SPSS Statistics into applying a Bonferroni
adjustment for multiple comparisons which it would otherwise not do.
SPSS Statisticstop ^
Reporting the output of the one-way ANOVA
Based on the results above, we could report the results of the study as follows (N.B., this does
not include the results from your assumptions tests or effect size calculations):
General
There was a statistically significant difference between groups as determined by one-way
ANOVA (F(2,27) = 4.467, p = .021). A Tukey post-hoc test revealed that the time to complete
the problem was statistically significantly lower after taking the intermediate (23.6 ± 3.3 min, p =
.046) and advanced (23.4 ± 3.2 min, p = .034) course compared to the beginners course (27.2 ±
3.0 min). There were no statistically significant differences between the intermediate and
advanced groups (p = .989).
In our enhanced one-way ANOVA guide, we show you how to write up the results from your
assumptions tests, one-way ANOVA and Tukey post-hoc results if you need to report this in a
dissertation/thesis, assignment or research report. We do this using the Harvard and APA styles
(see here). It is also worth noting that in addition to reporting the results from your assumptions,
one-way ANOVA and Tukey post-hoc test, you are increasingly expected to report "effect sizes".
Whilst there are many different ways you can do this, we show you how to calculate from your
SPSS Statistics results in our enhanced one-way ANOVA guide. Effect sizes are important
because whilst the one-way ANOVA tells you whether differences between group means are
"real" (i.e., different in the population), it does not tell you the "size" of the difference. Providing
the effect size in your results helps to overcome this limitation. You can learn more about our
enhanced one-way ANOVA guide here, or our enhanced content in general here
Introduction
The two-way ANOVA compares the mean differences between groups that have been split on
two independent variables (called factors). The primary purpose of a two-way ANOVA is to
understand if there is an interaction between the two independent variables on the dependent
variable. For example, you could use a two-way ANOVA to understand whether there is an
interaction between gender and educational level on test anxiety amongst university students,
where gender (males/females) and education level (undergraduate/postgraduate) are your
independent variables, and test anxiety is your dependent variable. Alternately, you may want to
determine whether there is an interaction between physical activity level and gender on blood
cholesterol concentration in children, where physical activity (low/moderate/high) and gender
(male/female) are your independent variables, and cholesterol concentration is your dependent
variable.
The interaction term in a two-way ANOVA informs you whether the effect of one of your
independent variables on the dependent variable is the same for all values of your other
independent variable (and vice versa). For example, is the effect of gender (male/female) on test
anxiety influenced by educational level (undergraduate/postgraduate)? Additionally, if a
statistically significant interaction is found, you need to determine whether there are any "simple
main effects", and if there are, what these effects are (we discuss this later in our guide).
Note: If you have three independent variables rather than two, you need a three-way ANOVA.
In this "quick start" guide, we show you how to carry out a two-way ANOVA using SPSS
Statistics, as well as interpret and report the results from this test. However, before we introduce
you to this procedure, you need to understand the different assumptions that your data must meet
in order for a two-way ANOVA to give you a valid result. We discuss these assumptions next.
SPSS Statisticstop ^
Assumptions
When you choose to analyse your data using a two-way ANOVA, part of the process involves
checking to make sure that the data you want to analyse can actually be analysed using a two-
way ANOVA. You need to do this because it is only appropriate to use a two-way ANOVA if
your data "passes" six assumptions that are required for a two-way ANOVA to give you a valid
result. In practice, checking for these six assumptions means that you have a few more
procedures to run through in SPSS Statistics when performing your analysis, as well as spend a
little bit more time thinking about your data, but it is not a difficult task.
Before we introduce you to these six assumptions, do not be surprised if, when analysing your
own data using SPSS Statistics, one or more of these assumptions is violated (i.e., is not met).
This is not uncommon when working with real-world data rather than textbook examples, which
often only show you how to carry out a two-way ANOVA when everything goes well! However,
don’t worry. Even when your data fails certain assumptions, there is often a solution to overcome
this. First, let’s take a look at these six assumptions:
Assumption #1: Your dependent variable should be measured at the continuous level (i.e., they
are interval or ratio variables). Examples of continuous variables include revision time
(measured in hours), intelligence (measured using IQ score), exam performance (measured from
0 to 100), weight (measured in kg), and so forth. You can learn more about interval and ratio
variables in our article: Types of Variable.
Assumption #2: Your two independent variables should each consist of two or more
categorical, independent groups. Example independent variables that meet this criterion
include gender (2 groups: male or female), ethnicity (3 groups: Caucasian, African American and
Hispanic), profession (5 groups: surgeon, doctor, nurse, dentist, therapist), and so forth.
Assumption #3: You should have independence of observations, which means that there is no
relationship between the observations in each group or between the groups themselves. For
example, there must be different participants in each group with no participant being in more
than one group. This is more of a study design issue than something you would test for, but it is
an important assumption of the two-way ANOVA. If your study fails this assumption, you will
need to use another statistical test instead of the two-way ANOVA (e.g., a repeated measures
design). If you are unsure whether your study meets this assumption, you can use our Statistical
Test Selector, which is part of our enhanced guides.
Assumption #4: There should be no significant outliers. Outliers are data points within your
data that do not follow the usual pattern (e.g., in a study of 100 students' IQ scores, where the
mean score was 108 with only a small variation between students, one student had a score of
156, which is very unusual, and may even put her in the top 1% of IQ scores globally). The
problem with outliers is that they can have a negative effect on the two-way ANOVA, reducing
the accuracy of your results. Fortunately, when using SPSS Statistics to run a two-way ANOVA on
your data, you can easily detect possible outliers. In our enhanced two-way ANOVA guide, we:
(a) show you how to detect outliers using SPSS Statistics; and (b) discuss some of the options
you have in order to deal with outliers.
Assumption #5: Your dependent variable should be approximately normally distributed for
each combination of the groups of the two independent variables. Whilst this sounds a little
tricky, it is easily tested for using SPSS Statistics. Also, when we talk about the two-way ANOVA
only requiring approximately normal data, this is because it is quite "robust" to violations of
normality, meaning the assumption can be a little violated and still provide valid results. You can
test for normality using the Shapiro-Wilk test for normality, which is easily tested for using SPSS
Statistics. In addition to showing you how to do this in our enhanced two-way ANOVA guide, we
also explain what you can do if your data fails this assumption (i.e., if it fails it more than a little
bit).
Assumption #6: There needs to be homogeneity of variances for each combination of the
groups of the two independent variables. Again, whilst this sounds a little tricky, you can easily
test this assumption in SPSS Statistics using Levene’s test for homogeneity of variances. In our
enhanced two-way ANOVA guide, we (a) show you how to perform Levene’s test for
homogeneity of variances in SPSS Statistics, (b) explain some of the things you will need to
consider when interpreting your data, and (c) present possible ways to continue with your
analysis if your data fails to meet this assumption.
You can check assumptions #4, #5 and #6 using SPSS Statistics. Before doing this, you should
make sure that your data meets assumptions #1, #2 and #3, although you don’t need SPSS
Statistics to do this. Just remember that if you do not run the statistical tests on these assumptions
correctly, the results you get when running a two-way ANOVA might not be valid. This is why
we dedicate a number of sections of our enhanced two-way ANOVA guide to help you get this
right. You can find out about our enhanced content as a whole here, or more specifically, learn
how we help with testing assumptions here.
In the section, Test Procedure in SPSS Statistics, we illustrate the SPSS Statistics procedure to
perform a two-way ANOVA assuming that no assumptions have been violated. First, we set out
the example we use to explain the two-way ANOVA procedure in SPSS Statistics.
Two-way ANOVA in SPSS Statistics (cont...)
SPSS Statistics Output of the Two-way ANOVA
SPSS Statistics generates quite a few tables in its output from a two-way ANOVA. In this
section, we show you the main tables required to understand your results from the two-way
ANOVA, including descriptives, between-subjects effects, Tukey post hoc tests (multiple
comparisons), a plot of the results, and how to write up these results.
For a complete explanation of the output you have to interpret when checking your data for the
six assumptions required to carry out a two-way ANOVA, see our enhanced guide. This includes
relevant boxplots, and output from your Shapiro-Wilk test for normality and test for
homogeneity of variances.
Finally, if you have a statistically significant interaction, you will also need to report simple main
effects. Alternately, if you do not have a statistically significant interaction, there are other
procedures you will have to follow. We show you these procedures in SPSS Statistics, as well as
how to interpret and write up your results in our enhanced two-way ANOVA guide.
Below, we take you through each of the main tables required to understand your results from the
two-way ANOVA.
SPSS Statisticstop ^
Descriptive statistics
You can find appropriate descriptive statistics for when you report the results of your two-way
ANOVA in the aptly named "Descriptive Statistics" table, as shown below:
Published with written permission from SPSS Statistics, IBM Corporation.
This table is very useful because it provides the mean and standard deviation for each
combination of the groups of the independent variables (what is sometimes referred to as each
"cell" of the design). In addition, the table provides "Total" rows, which allows means and
standard deviations for groups only split by one independent variable, or none at all, to be
known. This might be more useful if you do not have a statistically significant interaction.
SPSS Statisticstop ^
Plot of the results
The plot of the mean "interest in politics" score for each combination of groups of "Gender" and
"Edu_level" are plotted in a line graph, as shown below:
Published with written permission from SPSS Statistics, IBM Corporation.
Although this graph is probably not of sufficient quality to present in your reports (you can edit
its look in SPSS Statistics), it does tend to provide a good graphical illustration of your results.
An interaction effect can usually be seen as a set of non-parallel lines. You can see from this
graph that the lines do not appear to be parallel (with the lines actually crossing). You might
expect there to be a statistically significant interaction, which we can confirm in the next section.
SPSS Statisticstop ^
Statistical significance of the two-way ANOVA
The actual result of the two-way ANOVA – namely, whether either of the two independent
variables or their interaction are statistically significant – is shown in the Tests of Between-
Subjects Effects table, as shown below:
Published with written permission from SPSS Statistics, IBM Corporation.
The particular rows we are interested in are the "Gender", "Edu_Level" and
"Gender*Edu_Level" rows, and these are highlighted above. These rows inform us whether our
independent variables (the "Gender" and "Edu_Level" rows) and their interaction (the
"Gender*Edu_Level" row) have a statistically significant effect on the dependent variable,
"interest in politics". It is important to first look at the "Gender*Edu_Level" interaction as this
will determine how you can interpret your results (see our enhanced guide for more information).
You can see from the "Sig." column that we have a statistically significant interaction at the p
= .014 level. You may also wish to report the results of "Gender" and "Edu_Level", but again,
these need to be interpreted in the context of the interaction result. We can see from the table
above that there was no statistically significant difference in mean interest in politics between
males and females (p = .207), but there were statistically significant differences between
educational levels (p < .0005).
SPSS Statisticstop ^
Post hoc tests – simple main effects in SPSS Statistics
When you have a statistically significant interaction, reporting the main effects can be
misleading. Therefore, you will need to report the simple main effects. In our example, this
would involve determining the mean difference in interest in politics between genders at each
educational level, as well as between educational level for each gender. Unfortunately, SPSS
Statistics does not allow you to do this using the graphical interface you will be familiar with, but
requires you to use syntax. Therefore, in our enhanced two-way ANOVA guide, we show you
the procedure for doing this in SPSS Statistics, as well as explaining how to interpret and write
up the output from your simple main effects.
When you do not have a statistically significant interaction, we explain two options you have, as
well as a procedure you can use in SPSS Statistics to deal with this issue.
SPSS Statisticstop ^
Multiple Comparisons Table
If you do not have a statistically significant interaction, you might interpret the Tukey post hoc
test results for the different levels of education, which can be found in the Multiple
Comparisons table, as shown below:
Published with written permission from SPSS Statistics, IBM Corporation.
You can see from the table above that there is some repetition of the results, but regardless of
which row we choose to read from, we are interested in the differences between (1) School and
College, (2) School and University, and (3) College and University. From the results, we can see
that there is a statistically significant difference between all three different educational levels (p
< .0005).
SPSS Statisticstop ^
Reporting the results of a two-way ANOVA
You should emphasize the results from the interaction first before you mention the main effects.
For example, you might report the result as:
General
A two-way ANOVA was conducted that examined the effect of gender and education level on
interest in politics. There was a statistically significant interaction between the effects of gender
and education level on interest in politics, F (2, 54) = 4.643, p = .014.
If you had a statistically significant interaction term and carried out the procedure for simple
main effects in SPSS Statistics, you would also report these results. Briefly, you might report
these as:
General
Simple main effects analysis showed that males were significantly more interested in politics
than females when educated to university level (p = .002), but there were no differences between
gender when educated to school (p = .465) or college level (p = .793).
In our enhanced two-way ANOVA guide, we show you how to write up the results from your
assumptions tests and two-way ANOVA procedure, including simple main effects, if you need to
report this in a dissertation/thesis, assignment or research report. We do this using the Harvard
and APA styles. You can learn more about our enhanced content here.