One-Way ANOVA: What Is This Test For?

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

One-way ANOVA

What is this test for?


The one-way analysis of variance (ANOVA) is used to determine whether there are
any statistically 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, but would like to carry out a
one-way ANOVA analysis

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 statistically 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 statistically significant result, we accept the alternative hypothesis (H A),
which is that there are at least two group means that are statistically 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 statistically 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.

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 three or more smaller groups (i.e., each participant 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.

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. 

Why not compare groups with multiple t-tests?


Every time you conduct a t-test there is a chance that you will make a Type I error.
This error is usually 5%. By running two t-tests on the same data you will have
increased your chance of "making a mistake" to 10%. The formula for determining
the new error rate for multiple t-tests is not as simple as multiplying 5% by the
number of tests. However, if you are only making a few multiple comparisons, the
results are very similar if you do. As such, three t-tests would be 15% (actually,
14.3%) and so on. These are unacceptable errors. An ANOVA controls for these
errors so that the Type I error remains at 5% and you can be more confident that any
statistically significant result you find is not just running lots of tests. See our guide
on hypothesis testing for more information on Type I errors.

What assumptions does the test make?


There are three main assumptions, listed here:

1. The dependent variable is normally distributed in each group that is being


compared in the one-way ANOVA (technically, it is the residuals that need to
be normally distributed, but the results will be the same). So, for example, if
we were comparing three groups (e.g., amateur, semi-professional and
professional rugby players) on their leg strength, their leg strength values
(dependent variable) would have to be normally distributed for the amateur
group of players, normally distributed for the semi-professionals and normally
distributed for the professional players. You can test for normality in SPSS
Statistics

2. There is homogeneity of variances. This means that the population variances


in each group are equal. If you use SPSS Statistics, Levene's Test for
Homogeneity of Variances is included in the output when you run a one-way
ANOVA in SPSS Statistics Independence of observations. This is mostly a
study design issue and, as such, you will need to determine whether you
believe it is possible that your observations are not independent based on
your study design (e.g., group work/families/etc).

What happens if my data fail these assumptions?


Firstly, don't panic! The first two of these assumptions are easily fixable, even if the
last assumption is not. Lets go through the options as above:

1. The one-way ANOVA is considered a robust test against the normality


assumption. This means that it tolerates violations to its normality assumption
rather well. As regards the normality of group data, the one-way ANOVA can
tolerate data that is non-normal (skewed or kurtotic distributions) with only a
small effect on the Type I error rate. However, platykurtosis can have a
profound effect when your group sizes are small. This leaves you with two
options: (1) transform your data using various algorithms so that the shape of
your distributions become normally distributed or (2) choose the
nonparametric Kruskal-Wallis H Test which does not require the assumption
of normality.

2. There are two tests that you can run that are applicable when the assumption
of homogeneity of variances has been violated: (1) Welch or (2) Brown and
Forsythe test. Alternatively, you could run a Kruskal-Wallis H Test. For most
situations it has been shown that the Welch test is best. Both the Welch and
Brown and Forsythe tests are available in SPSS Statistics
3. A lack of independence of cases has been stated as the most serious
assumption to fail. Often, there is little you can do that offers a good solution
to this problem.

How do I run a one-way ANOVA?


There are numerous ways to run a one-way ANOVA. However, we provide a
comprehensive, step-by-step guide on how to do this using SPSS Statistics.

How do I report the results of a one-way ANOVA?


You will have calculated the following results or obtained them from SPSS Statistics:

Structure of results:

Source SS df MS F Sig.

Between SSb k-1 MSb MSb/MSw p value

Within SSw N-k MSw    

Total SSb + SSw N-1      

An example:

Source SS df MS F Sig.

Between 91.476 2 45.733 4.467 .021

Within 276.400 27 10.237    

Total 367.867 29      

You will want to report this as follows:


There was a statistically significant difference between groups as determined by
one-way ANOVA (F(2,27) = 4.467, p = .021). This is all you will need to write for the
one-way ANOVA per se. However, in reality you will probably also want to report
means ± standard deviations for your groups, as well as follow up a statistically
significant result with a post hoc test. If you use SPSS Statistics, these descriptive
statistics will be reported in the output along with the result from the one-way
ANOVA. The general form of writing the result of a one-way ANOVA is as follows:

where df = degrees of freedom.

You should not report the result as "significant difference", but instead report it as
"statistically significant difference". This is because your decision as to whether the
result is significant or not should not be based solely on your statistical test.
Therefore, to indicate to readers that this "significance" is a statistical one, include
this is your sentence.

My p-value is greater than 0.05, what do I do now?


Report the result of the one-way ANOVA (e.g., "There were no statistically significant
differences between group means as determined by one-way ANOVA (F(2,27) =
1.397, p = .15)"). Not achieving a statistically significant result does not mean you
should not report group means ± standard deviation also. However, running a post
hoc test is usually not warranted and should not be carried out.

My p-value is less than 0.05, what do I do now?


Firstly, you need to report your results as highlighted in the "How do I report the
results of a one-way ANOVA?" section on the previous page. You then need to
follow-up the one-way ANOVA by running a post hoc test.
Homogeneity of variances was violated. How do I
continue?
You need to perform the same procedures as in the above three sections, but add
into your results section that this assumption was violated and you needed to run a
Welch F test.

What are post hoc tests?


Recall from earlier that the ANOVA test tells you whether you have an overall
difference between your groups, but it does not tell you which specific groups
differed – post hoc tests do. Because post hoc tests are run to confirm where the
differences occurred between groups, they should only be run when you have a
shown an overall statistically significant difference in group means (i.e., a statistically
significant one-way ANOVA result). Post hoc tests attempt to control the
experimentwise error rate (usually alpha = 0.05) in the same manner that the one-
way ANOVA is used instead of multiple t-tests. Post hoc tests are termed a
posteriori tests; that is, performed after the event (the event in this case being a
study).

Which post hoc test should I use?


There are a great number of different post hoc tests that you can use. However, you
should only run one post hoc test – do not run multiple post hoc tests. For a one-way
ANOVA, you will probably find that just two tests need to be considered. If your data
met the assumption of homogeneity of variances, use Tukey's honestly significant
difference (HSD) post hoc test. Note that if you use SPSS Statistics, Tukey's HSD
test is simply referred to as "Tukey" in the post hoc multiple comparisons dialogue
box). If your data did not meet the homogeneity of variances assumption, you should
consider running the Games Howell post hoc test.

How should I graphically present my results?


First off, it is not essential that you present your results in a graphical form. However,
it can add a lot of clarity to your results. There are a few key points to producing a
good graph. Firstly, you need to present error bars for each group mean. It is
customary to use the standard deviation of each group, but standard error and
confidence limits are also used in the literature. You should also make sure that the
scale is appropriate for what you are measuring. Generally, if graphically presenting
data from an ANOVA, we recommend using a bar chart with standard deviation bars.

What to do now?
Now that you understand the one-way ANOVA, you can go to our guide on
how to run the test in SPSS Statistics: One-way ANOVA in SPSS Statistics.

One-way ANOVA in SPSS


Statistics
Introduction
The one-way analysis of variance (ANOVA) is used to determine whether there are
any statistically significant differences between the means of two or more
independent (unrelated) groups (although you tend to only see it used when there
are a minimum of three, rather than two groups). For example, you could use a one-
way ANOVA to understand whether exam performance differed based on test
anxiety levels amongst students, dividing students into three independent groups
(e.g., low, medium and high-stressed students). Also, it is important to realize that
the one-way ANOVA is an omnibus test statistic and cannot tell you which specific
groups were statistically significantly different from each other; it only tells you that at
least two groups were different. Since you may have three, four, five or more groups
in your study design, determining which of these groups differ from each other is
important. You can do this using a post hoc test (N.B., we discuss post hoc tests
later in this guide).

Note: If your study design not only involves one dependent variable and one
independent variable, but also a third variable (known as a "covariate") that you
want to "statistically control", you may need to perform an ANCOVA (analysis of
covariance), which can be thought of as an extension of the one-way ANOVA. To
learn more, see our SPSS Statistics guide on ANCOVA. Alternatively, if your
dependent variable is the time until an event happens, you might need to run
a Kaplan-Meier analysis.
This "quick start" guide shows you how to carry out a one-way ANOVA using SPSS
Statistics, as well as interpret and report the results from this test. Since the one-way
ANOVA is often followed up with a post hoc test, we also show you how to carry out
a post hoc test using SPSS Statistics. However, before we introduce you to this
procedure, you need to understand the different assumptions that your data must
meet in order for a one-way ANOVA to give you a valid result. We discuss these
assumptions next.

SPSS Statistics
Assumptions
When you choose to analyse your data using a one-way ANOVA, part of the process
involves checking to make sure that the data you want to analyse can actually be
analysed using a one-way ANOVA. You need to do this because it is only
appropriate to use a one-way ANOVA if your data "passes" six assumptions that are
required for a one-way ANOVA to give you a valid result. In practice, checking for
these six assumptions just adds a little bit more time to your analysis, requiring you
to click a few more buttons in SPSS Statistics when performing your analysis, as well
as think a little bit more 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 one-
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:

o Assumption #1: Your dependent variable should be measured at


the interval or ratio level (i.e., they are continuous). Examples of variables that
meet this criterion 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.
o Assumption #2: Your independent variable should consist of two or more
categorical, independent groups. Typically, a one-way ANOVA is used when you
have three or more categorical, independent groups, but it can be used for just two
groups (but an independent-samples t-test is more commonly used for two groups).
Example independent variables that meet this criterion include ethnicity (e.g., 3
groups: Caucasian, African American and Hispanic), physical activity level (e.g., 4
groups: sedentary, low, moderate and high), profession (e.g., 5 groups: surgeon,
doctor, nurse, dentist, therapist), and so forth.
o 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 can test for, but it is an important assumption of the
one-way ANOVA. If your study fails this assumption, you will need to use another
statistical test instead of the one-way ANOVA (e.g., a repeated measures design). If
you are unsure whether your study meets this assumption,
o Assumption #4: There should be no significant outliers. Outliers are simply
single 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 one-way ANOVA, reducing the validity
of your results. Fortunately, when using SPSS Statistics to run a one-way ANOVA on
your data, you can easily detect possible outliers. In our enhanced one-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..
o Assumption #5: Your dependent variable should be approximately
normally distributed for each category of the independent variable. We talk
about the one-way ANOVA only requiring approximately normal data because it is
quite "robust" to violations of normality, meaning that assumption can be a little
violated and still provide valid results. You can test for normality using the Shapiro-
Wilk test of normality, which is easily tested for using SPSS Statistics. In addition to
showing you how to do this in our enhanced one-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).
o Assumption #6: There needs to be homogeneity of variances. You can
test this assumption in SPSS Statistics using Levene's test for homogeneity of
variances. If your data fails this assumption, you will need to not only carry out a
Welch ANOVA instead of a one-way ANOVA, which you can do using SPSS
Statistics, but also use a different post hoc test. In our enhanced one-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, including running a Welch ANOVA in SPSS
Statistics instead of a one-way ANOVA, and a Games-Howell test instead of a Tukey
post hoc test.

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. Remember that if you do not run the
statistical tests on these assumptions correctly, the results you get when running a
one-way ANOVA might not be valid. This is why we dedicate a number of sections of
our enhanced one-way ANOVA guide to help you get this right.

In the section, Test Procedure in SPSS Statistics, we illustrate the SPSS Statistics


procedure to perform a one-way ANOVA assuming that no assumptions have been
violated. First, we set out the example we use to explain the one-way ANOVA
procedure in SPSS Statistics.

SPSS Statistics
Example

A manager wants to raise the productivity at his company by increasing the speed at
which his employees can use a particular spreadsheet program. As he does not
have the skills in-house, he employs an external agency which provides training in
this spreadsheet program. They offer 3 courses: a beginner, intermediate and
advanced course. He is unsure which course is needed for the type of work they do
at his company, so he sends 10 employees on the beginner course, 10 on the
intermediate and 10 on the advanced course. When they all return from the training,
he gives them a problem to solve using the spreadsheet program, and times how
long it takes them to complete the problem. He then compares the three courses
(beginner, intermediate, advanced) to see if there are any differences in the average
time it took to complete the problem.

SPSS Statistics
Setup in SPSS Statistics
In SPSS Statistics, we separated the groups for analysis by creating a grouping
variable called  Course  (i.e., the independent variable), and gave the beginners
course a value of "1", the intermediate course a value of "2" and the advanced
course a value of "3". Time to complete the set problem was entered under the
variable name  Time  (i.e., the dependent variable). In our enhanced one-way ANOVA
guide, we show you how to correctly enter data in SPSS Statistics to run a one-way
ANOVA (see on our Features: One-way ANOVA page). You can learn about our
enhanced data setup content in general on our Features: Data Setup. Alternately,
see our generic, "quick start" guide: Entering Data in SPSS Statistics.

SPSS Statistics
Test Procedure in SPSS Statistics

The eight steps below show you how to analyse your data using a one-way ANOVA
in SPSS Statistics when the six assumptions in the previous section, Assumptions,
have not been violated. At the end of these eight steps, we show you how to
interpret the results from this test. If you are looking for help to make sure your data
meets assumptions #4, #5 and #6, which are required when using a one-way
ANOVA, and can be tested using SPSS Statistics,

Click Analyze > Compare Means > One-Way ANOVA... on the top menu,


as shown below.
Published with written permission from SPSS Statistics, IBM Corporation.

1. You will be presented with the One-Way ANOVA dialogue box:


Published with written permission from SPSS Statistics, IBM Corporation.

2. Transfer the dependent variable,  Time , into the Dependent List: box and


the independent variable,  Course , into the Factor: box using the

appropriate   buttons (or drag-and-drop the variables into the


boxes), as shown below:
Published with written permission from SPSS Statistics, IBM Corporation.

3. Click on the   button. Tick the Tukey checkbox as shown


below:
Published with written permission from SPSS Statistics, IBM Corporation.

4. Click on the   button.

5. Click on the   button. Tick the Descriptive checkbox in the –


Statistics– area, as shown below:
Published with written permission from SPSS Statistics, IBM Corporation.

NOTE: When testing for some of the assumptions of the one-way ANOVA,


you will need to tick more of these checkboxes. We take you through this,
including how to interpret the output, in our enhanced one-way ANOVA guide.
6. Click on the   button.

7. Click on the   button.

Go to the next page for the SPSS Statistics output and an explanation of


the output.

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 test. 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 Features: One-way ANOVA page.
This includes relevant boxplots, and output from the 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 Statistics
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 Statistics
ANOVA Table
This is the table that shows the output of the ANOVA analysis and whether there is a
statistically significant difference between our group means. We can see that the
significance value is 0.021 (i.e., 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 the Tukey post hoc
test.

SPSS Statistics
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 Statistics
ANOVA Table
This is the table that shows the output of the ANOVA analysis and whether there is a
statistically significant difference between our group means. We can see that the
significance value is 0.021 (i.e., 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 the Tukey post hoc
test.

Published with written permission from SPSS Statistics, IBM Corporation.

SPSS Statistics
Multiple Comparisons Table
From the results so far, we know that there are statistically 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 statistically 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 you how to
"trick" SPSS Statistics into applying a Bonferroni adjustment for multiple
comparisons which it would otherwise not do.

SPSS Statistics
Reporting the output of the one-way ANOVA
Based on the results above, you 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 was no statistically
significant difference 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 our Features: One-way ANOVA page to
learn more). 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 an effect size. Whilst there are many different ways you can do
this, we show you how to calculate an effect size 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
an effect size in your results helps to overcome this limitation.

You might also like