You are on page 1of 25

Analysis of Variance

ANOVA
• to determine whether there are any statistically significant differences between the
means of two or more independent groups
• Note: The one-way ANOVA is also referred to as a between-subjects ANOVA or one-
factor ANOVA. Although it can be used with an independent variable with only two
groups, the independent-samples t-test is typically used in this situation instead. For this
reason, you will come across the one-way ANOVA being described as a test to use when
you have three or more groups (rather than two or more groups).
• Non-parametric equivalent: Kruskal Wallis H test IV is ordinal, and if nominal chi square
Basic Requirements
Assumption 1: You have one dependent variable that is measured at the continuous level.
Assumption #2: You have one independent variable that consists 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 (although
an independent-samples t-test is more commonly used for two groups).
Assumption #3: You should have independence of observations, which means that there is
no relationship between the observations in each group of the independent variable or
between the groups themselves.
Assumptions #4, #5 and #6: (a) there should be no significant outliers in the groups of your
independent variable in terms of the dependent variable; (b) your dependent variable
should be approximately normally distributed for each group of the independent variable;
and (c) you should have homogeneity of variances (i.e., the variance of the dependent
variable is equal in each group of the independent variable)
• It is important to remember that when you run a one-way ANOVA, you are trying to determine whether the
group means are different in the population.

H0: all group population means are equal (i.e., µ1 = µ2 = µ3 = ... = µk)
where µ = population mean and k = number of groups. Therefore, for our physical activity example, we could write:
H0: all physical activity group population means are equal (i.e., µsedentary = µlow = µmoderate = µhigh)

The most common type of post hoc test is one that makes all pairwise comparisons. A pairwise comparison is a
comparison between two separate groups.
Study
Design 1
Study
Design 1
Examples
Study
Design 2
Study
Design 2
Examples
Study Design #3
Determine if there are differences in change scores
Flow Chart

Click and zoom in


Sample Problem
A researcher believes that individuals that are more physically active are
better able to cope with stress in the workplace. To test this theory, the
researcher recruited 31 subjects and measured how many minutes of physical
activity they performed per week and their ability to cope with workplace
stress. The subjects were categorized into four groups based on the number
of minutes of physical activity they performed: namely, "sedentary", "low",
"moderate" and "high" physical activity groups. These groups (levels of
physical activity) formed an independent variable called group. The ability to
cope with workplace stress was assessed as the average score of a series of
Likert items on a questionnaire, which allowed an overall "coping with
workplace stress" score to be calculated; higher scores indicating a greater
ability to cope with workplace-related stress. This dependent variable was
called coping_stress and "ability to cope with workplace-related stress"
abbreviated as "CWWS" score. The researcher would like to know if CWWS
score is dependent on physical activity level. In variable terms, is
mean coping_stress score different for different levels of group?
Step 1: Data Set-up
Step 1: Run Explore to check assumptions
There were no outliers in the
data, as assessed by
inspection of a boxplot.

If there are outliers and you do not want to


remove an outlier or feel you cannot, you have four
choices how to proceed:

1. Run the non-parametric Kruskal-Wallis H test;


2. Modify the outlier by replacing the outlier's value with
one that is less extreme (e.g., the next largest value
instead);
3. Transform the dependent variable; or
4. Include the outlier in the analysis anyway because you
do not believe the result will be materially affected (e.g.,
perhaps determined by comparing the result of the one-
way ANOVA with and without the outlier).
Must be p>.05

CWWS score was normally distributed for the sedentary, low, moderate
and high physical activity groups, as assessed by Shapiro-Wilk's test (p >
.05).
Step 3: ANOVA with post-hoc testing

Taking this route is appropriate if: (a) you have no specific hypotheses about the differences
between the groups of your independent variable before you looked at your data (e.g., a
hypothesis that there is a difference between Group D and Group B); and/or (b) you are
interested in investigating all possible pairwise comparisons (e.g., if you had an independent
variable with three groups there would be three possible comparisons: Group A to Group B,
Group A to Group C and Group B to Group C).
Select Turkey and Games-
Howell.
Note: There are many other options you can select
other than Tukey. For example, the LSD option
means "least significant difference" and it is
basically multiple independent-samples t-tests
between each combination of groups without any
corrections made for multiple comparisons. A
popular option is Bonferroni, which is multiple
independent-samples t-tests, as with "LSD", but
with a Bonferroni correction for multiple
comparisons.
Effect size
1. Click Analyze> General Linear Model > 2. Transfer
Univariate Variables

3.

4. Then Click
OK and
Continue
Interpreting Results

Each row in the table presents statistics on the dependent for The ability to cope with workplace-related
the different groups of the independent variable. You should stress (CWWS score) increased from the
use this table to understand certain aspects of your data, such sedentary (n = 7, M = 4.2, SD = 0.8), to low (n =
as: (a) whether there are an equal number of participants in 9, M = 5.9, SD = 1.7), to moderate (n = 8, M =
each of your groups (the "N" column); (b) which groups had the 7.1, SD = 1.6) to high (n = 7, M = 7.5, SD = 1.2)
higher/lower mean score (the "Mean" column) (and what this physical activity groups, in that order.
means for your results); and (c) if the variation in each group is
similar (e.g., the "Std. Deviation" column).
Interpreting Results
Assumption of Homogeneity of Variances

The important column of the table above is the "Sig." column,


which presents the significance value (i.e., p-value) of the test.
If Levene's test is statistically significant (i.e., p < .05), you do
not have equal variances and have violated the assumption of
homogeneity of variances (i.e., you have heterogeneous
variances). On the other hand, if Levene's test is not statistically
significant (i.e., p > .05), you have equal variances and you have
There was homogeneity of variances, not violated the assumption of homogeneity of variances. In
as assessed by Levene's test for our example, the "Sig." value (i.e., p-value) is .120 (i.e., p =
equality of variances (p = .120). .120), which indicates that the variances are equal (i.e., the
assumption of homogeneity of variances is met).
Interpreting Results
Results when homogeneity of variances is met This column contains the statistical significance value
(i.e., p-value) of the test found in the "Sig." column as
highlighted in the table above. If the ANOVA is
statistically significant (i.e., p < .05), it can be concluded
that not all group means are equal in the
population (i.e., at least one group mean is different to
another group mean). Alternatively, if p > .05, you do
not have any statistically significant differences
between the group means. The p-value in this example
would appear to be .000 but that actually means p <
.0005.

The ability to cope with workplace-related


stress (CWWS score) was statistically
significantly different for different levels
of physical activity group, F(3, 27) =
8.316, p < .001.
Interpreting Results
Tukey post-hoc Check for * and p<.05.
Note that other values are
duplicates, thus identify which is
more appropriate to report.

For example: There was an increase in CWWS


score from the sedentary group (M = 4.2, SD =
0.8) to the group performing a low level of
physical activity (M = 5.9, SD = 1.7), a mean
increase of 1.7, SE = 0.7, which was not
statistically significant (p = .092).

There was an increase in CWWS score from the


sedentary group (M = 4.2, SD = 0.8) to the group
performing a high level of physical activity (M =
7.5, SD = 1.2), a mean increase of 3.4, 95% CI [1.3,
5.4], which was statistically significant (p = .001).
Calculating and reporting an effect size

You can report partial eta squared (η2), which is


found under the "Partial Eta Squared" column in
To make these calculations you need to use the Tests of Between-Subjects Effects table (along
the ANOVA table, as follows: the "group" row), as highlighted below:
Putting it all together
A one-way ANOVA was conducted to determine if the ability to cope with workplace-related stress
(CWWS score) was different for groups with different physical activity levels. Participants were
classified into four groups: sedentary (n = 7), low (n = 9), moderate (n = 8) and high levels of physical
activity (n = 7). There were no outliers, as assessed by boxplot; data was normally distributed for
each group, as assessed by Shapiro-Wilk test (p > .05); and there was homogeneity of variances, as
assessed by Levene's test of homogeneity of variances (p = .120). Data is presented as mean ±
standard deviation. CWWS score was statistically significantly different between different physical
activity groups, F(3, 27) = 8.316, p < .0005, ω2 = 0.42. CWWS score increased from the sedentary
(M = 4.15, SD = 0.77) to the low (M = 5.88, SD = 1.69), moderate (M = 7.12, SD = 1.57) and high (M =
7.51, SD = 1.24) physical activity groups, in that order. Tukey post hoc analysis revealed that the
mean increase from sedentary to moderate (2.97, 95% CI [0.99, 4.96]) was statistically significant (p =
.002), as well as the increase from sedentary to high (3.35, 95% CI [1.30, 5.40], p = .001), but no
other group differences were statistically significant.
The group means were statistically significantly different (p < .05) and, therefore, we can reject the
null hypothesis and accept the alternative hypothesis.

You might also like