UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
ANALYSIS OF VARIANCE
Definitions
F-distribution
The ratio of two independent chi-square variables divided by their respective degrees of
freedom. If the population variances are equal, this simplifies to be the ratio of the sample
variances.
Analysis of Variance (ANOVA)
A technique used to test a hypothesis concerning the means of three or more populations.
One-Way Analysis of Variance
Analysis of Variance when there is only one independent variable. The null hypothesis will
be that all population means are equal; the alternative hypothesis is that at least one mean
is different.
Between Group Variation
The variation due to the interaction between the samples, denoted SS(B) for Sum of
Squares Between groups. If the sample means are close to each other (and therefore the
Grand Mean) this will be small. There are k samples involved with one data value for each
sample (the sample mean), so there are k-1 degrees of freedom. Degrees of freedom is a
combination of how much data you have and how many parameters you need to estimate.
Between Group Variance
The variance due to the interaction between the samples, denoted MS(B) for Mean Square
Between groups. This is the between group variation divided by its degrees of freedom.
Within Group Variation
The variation due to differences within individual samples, denoted SS(W) for Sum of
Squares Within groups. Each sample is considered independently, no interaction between
samples is involved. The degrees of freedom is equal to the sum of the individual degrees
of freedom for each sample. Since each sample has degrees of freedom equal to one less
than their sample sizes, and there are k samples, the total degrees of freedom is k less than
the total sample size: df = N - k.
Within Group Variance
The variance due to the differences within individual samples, denoted MS(W) for Mean
Square Within groups. This is the within group variation divided by its degrees of freedom.
Scheffe' Test
UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
A test used to find where the differences between means lie when the Analysis of Variance
indicates the means are not all equal. The Scheffe' test is generally used when the sample
sizes are different.
Tukey Test
A test used to find where the differences between the means lie when the Analysis of
Variance indicates the means are all equal. The Tukey test is generally used when the
sample sizes are all the same.
Two-Way Analysis of Variance
An extension to the one-way analysis of variance. There are two independent variables.
There are three sets of hypothesis with the two-way ANOVA. The first null hypothesis is
that there is no interaction between the two factors. The second null hypothesis is that the
population means of the first factor are equal. The third null hypothesis is that the
population means of the second factor are equal.
Factors
The two independent variables in a two-way ANOVA.
Treatment Groups
Groups formed by making all possible combinations of the two factors. For example, if the
first factor has 3 levels and the second factor has 2 levels, then there will be 3x2=6 different
treatment groups.
Interaction Effect
The effect one factor has on the other factor
Main Effect
The effects of the independent variables.
Assumptions (One-way ANOVA)
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
UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
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. You can learn more about interval and ratio
variables in our article: Types of Variable.
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, you can use our Statistical Test
Selector, which is part of our enhanced guides.
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).
Again, you can learn more on our Features: One-way ANOVA page.
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
UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
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 (learn more on our Features: One-way
ANOVA page).
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.
Beginner Intermediate Advanced
22 18 20
25 21 22
24 20 21
28 26 18
27 23 19
28 24 20
27 23 16
29 26 21
29 22 17
33 27 20
SOLUTION:
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.
Why ANOVA - A statistical method for making simultaneous comparisons between three or
more means.
UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
Comparing means- If we are only comparing two means, ANOVA will produce the same results
as the t test for independent & dependent Samples. The t-test can only be used to test differences
between two means. When there are more than two means, it is possible to compare each mean
with each other mean using many t-tests. But conducting such multiple t-tests can lead to severe
complications and in such circumstances we use ANOVA. Thus, this technique is used whenever
an alternative procedure is needed for testing hypotheses concerning means when there are
several populations.
When you choose to analyses your data using a one-way ANOVA, part of the process involves
checking to make sure that the data you want to analyses can actually be analyses 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“following assumptions that are required for a one way ANOVA to give you a
valid result.
Assumptions
Dependent variable should be approximately normally distributed.
There should be no significant outliers.
Should have independence of observations.
Independent variable should consist of two or more categorical, independent groups.
Dependent variable should be measured at the interval or ratio level.
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.
UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
RESULT AND INTERPRETATION
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.
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.
UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
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).
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
UNIVERSITY OF CAGAYAN VALLEY
(Formerly Cagayan Colleges Tuguegarao)
Tuguegarao City, Cagayan, Philippines
SCHOOL OF LIBERAL ARTS AND TEACHER EDUCATION
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).