Repeated-Measures and Two-Factor Analysis of Variance
1. Chapter 13
Repeated-Measures and
Two-Factor Analysis of Variance
PowerPoint Lecture Slides
Essentials of Statistics for the
Behavioral Sciences
Eighth Edition
by Frederick J. Gravetter and Larry B. Wallnau
2. Chapter 13 Learning Outcomes
• Understand logic of repeated-measures
ANOVA study1
• Compute repeated-measures ANOVA to
evaluate mean differences for single-factor
repeated-measures study
2
• Measure effect size, perform post hoc tests
and evaluate assumptions required for
single-factor repeated-measures ANOVA
3
3. • Measure effect size, interpret results and
articulate assumptions for two-factor ANOVA
Ch 13 Learning Outcomes
(continued)
• Understand logic of two-factor study and matrix
of group means4
• Describe main effects and interactions from
pattern of group means in two-factor ANOVA5
• Compute two-factor ANOVA to evaluate means
for two-factor independent-measures study6
7
4. Tools You Will Need
• Independent-Measures Analysis of Variance
(Chapter 12)
• Repeated-Measures Designs (Chapter 11)
• Individual Differences
5. 13.1 Overview
• Analysis of Variance
– Evaluated mean differences for two or more
groups
– Limited to one independent variable (IV)
• Complex Analysis of Variance
– Samples are related; not independent
(Repeated-measures ANOVA)
– Two independent variables are manipulated
(Factorial ANOVA; only Two-Factor in this text)
6. 13.2 Repeated-Measures ANOVA
• Independent-measures ANOVA uses multiple
participant samples to test the treatments
• Participant samples may not be identical
• If groups are different, what was responsible?
– Treatment differences?
– Participant group differences?
• Repeated-measures solves this problem by
testing all treatments using one sample of
participants
7. Repeated-Measures ANOVA
• Repeated-Measures ANOVA used to evaluate
mean differences in two general situations
– In an experiment, compare two or more
manipulated treatment conditions using the same
participants in all conditions
– In a nonexperimental study, compare a group of
participants at two or more different times
• Before therapy; After therapy; 6-month follow-up
• Compare vocabulary at age 3, 4 and 5
8. Repeated-Measures ANOVA
Hypotheses
• Null hypothesis: in the population there are no
mean differences among the treatment groups
• Alternate hypothesis: there is one (or more)
mean differences among the treatment groups
...: 3210 H
H1: At least one treatment
mean μ differs from another
9. General structure of the
ANOVA F-Ratio
• F ratio based on variances
– Numerator measures treatment mean differences
– Denominator measures treatment mean
differences when there is no treatment effect
– Large F-ratio greater treatment differences
than would be expected with no treatment effects
effecttreatmentnowithexpectedes)(differencvariance
treatmentsbetweenes)(differencvariance
F
10. Individual differences
• Participant characteristics may vary
considerably from one person to another
• Participant characteristics can influence
measurements (Dependent Variable)
• Repeated measures design allows control of
the effects of participant characteristics
– Eliminated from the numerator by the research
design
– Must be removed from the denominator
statistically
11. Structure of the F-Ratio for
Repeated-Measures ANOVA
ally)mathematicremovedsdifferencel(individua
effecttreatmentnowithexpectedes)(differencvariance
s)differenceindividual(without
eatmentsbetween tres)(differencvariance
F
The biggest change between independent-
measures ANOVA and repeated-measures ANOVA
is the addition of a process to mathematically
remove the individual differences variance
component from the denominator of the F-ratio
12. Repeated-Measures ANOVA
Logic
• Numerator of the F ratio includes
– Systematic differences caused by treatments
– Unsystematic differences caused by random
factors are reduced because the same individuals
are in all treatments
• Denominator estimates variance reasonable
to expect from unsystematic factors
– Effect of individual differences is removed
– Residual (error) variance remains
14. Repeated-Measures ANOVA
Stage One Equations
N
G
XSStotal
2
2
treatmenteachinsidetreatmentswithin SSSS
N
G
n
T
SS treatmentsbetween
22
15. Two Stages of the Repeated-
Measures ANOVA
• First stage
– Identical to independent samples ANOVA
– Compute SStotal, SSbetween treatments and
SSwithin treatments
• Second stage
– Done to remove the individual differences from
the denominator
– Compute SSbetween subjects and subtract it from
SSwithin treatments to find SSerror (also called residual)
17. Degrees of freedom for
Repeated-Measures ANOVA
dftotal = N – 1
dfwithin treatments = Σdfinside each treatment
dfbetween treatments = k – 1
dfbetween subjects = n – 1
dferror = dfwithin treatments – dfbetween subjects
18. Mean squares and F-ratio for
Repeated-Measures ANOVA
error
error
error
df
SS
MS
treatmentsbetween
treatmentsbetween
treatmentsbetween
df
SS
MS
_
_
_
error
mentstreatbetween
MS
MS
F
19. F-Ratio General Structure for
Repeated-Measures ANOVA
)(
)(
sdifferenceindividualwithout
sdifferenceicunsystemat
sdifferenceindividualwithout
sdifferenceicunsystemateffectstreatment
F
20. Effect size for the
Repeated-Measures ANOVA
• Percentage of variance explained by the
treatment differences
• Partial η2 is percentage of variability that has not
already been explained by other factors
or
subjectsbetweentotal
eatmentsbetween tr2
SS SS
SS
errorSSSS
SS
eatmentsbetween tr
eatmentsbetween tr2
21. In the Literature
• Report a summary of descriptive statistics (at
least means and standard deviations)
• Report a concise statement of the ANOVA
results
– E.g., F (3, 18) = 16.72, p<.01, η2 = .859
22. Repeated Measures ANOVA
post hoc tests (posttests)
• Significant F indicates that H0 (“all populations
means are equal”) is wrong in some way
• Use post hoc test to determine exactly where
significant differences exist among more than
two treatment means
– Tukey’s HSD and Scheffé can be used
– Substitute SSerror and dferror in the formulas
23. Repeated-Measures ANOVA
Assumptions
• The observations within each treatment
condition must be independent
• The population distribution within each
treatment must be normal
• The variances of the population distribution
for each treatment should be equivalent
24. Learning Check
• A researcher obtains an F-ratio with df = 2, 12
in a repeated-measures study ANOVA. How
many subjects participated in the study?
• 15A
• 14B
• 13C
• 7D
25. Learning Check - Answer
• A researcher obtains an F-ratio with df = 2, 12
in a repeated-measures study ANOVA. How
many subjects participated in the study?
• 15A
• 14B
• 13C
• 7D
26. Learning Check
• Decide if each of the following statements
is True or False
• For the repeated-measures ANOVA,
degrees of freedom for SSerror could be
written as [(N–k) – (n–1)]
T/F
• The first stage of the repeated-
measures ANOVA is the same as the
independent-measures ANOVA
T/F
27. Learning Check - Answer
• dferror = dfw/i treatments – dfbetwn subjects
• Within treatments df = N-k;
between subjects df = n-1
True
• After the first stage analysis, the
second stage analysis adjusts for
individual differences
True
28. Repeated-Measures ANOVA
Advantages and Disadvantages
• Advantages of repeated-measures designs
– Individual differences among participants do not
influence outcomes
– Smaller number of participants needed to test all
the treatments
• Disadvantages of repeated-measures designs
– Some (unknown) factor other than the treatment
may cause participant’s scores to change
– Practice or experience may affect scores
independently of the actual treatment effect
29. 13.3 Two-Factor ANOVA
• Both independent variables and quasi-
independent variables may be employed as
factors in Two-Factor ANOVA
• An independent variable (factor) is
manipulated in an experiment
• A quasi-independent variable (factor) is not
manipulated but defines the groups of scores
in a nonexperimental study
30. 13.3 Two-Factor ANOVA
• Factorial designs
– Consider more than one factor
• We will study two-factor designs only
• Also limited to situations with equal n’s in each group
– Joint impact of factors is considered
• Three hypotheses tested by three F-ratios
– Each tested with same basic F-ratio structure
effecttreatmentnowithexpectedes)(differencvariance
treatmentsbetweenes)(differencvariance
F
31. Main Effects
• Mean differences among levels of one factor
– Differences are tested for statistical significance
– Each factor is evaluated independently of the
other factor(s) in the study
21
21
:
:
1
0
AA
AA
H
H
21
21
:
:
1
0
BB
BB
H
H
32. Interactions Between Factors
• The mean differences between individuals
treatment conditions, or cells, are different
from what would be predicted from the
overall main effects of the factors
• H0: There is no interaction between
Factors A and B
• H1: There is an interaction between
Factors A and B
33. Interpreting Interactions
• Dependence of factors
– The effect of one factor depends on the level or
value of the other
– Sometimes called “non-additive” effects because
the main effects do not “add” together predictably
• Non-parallel lines (cross, converge or diverge)
in a graph indicate interaction is occurring
• Typically called the A x B interaction
34. Figure 13.2 Group Means Graphed
without (a) and with (b) Interaction
35. Structure of the Two-Factor
Analysis of Variance
• Three distinct tests
– Main effect of Factor A
– Main effect of Factor B
– Interaction of A and B
• A separate F test is conducted for each
• Results of one are independent of the others
effecttreatmentnoisthereifexpectedsdifferencemeanvariance
treatmentsbetweensdifferencemeanvariance
F
)(
)(
36. Two Stages of the Two-Factor
Analysis of Variance
• First stage
– Identical to independent samples ANOVA
– Compute SStotal, SSbetween treatments and
SSwithin treatments
• Second stage
– Partition the SSbetween treatments into three separate
components: differences attributable to Factor A;
to Factor B; and to the AxB interaction
38. Stage One of the Two-Factor
Analysis of Variance
N
G
XSStotal
2
2
menteach treatinsideSSSS treatmentswithin
N
G
n
T
SS treatmentsbetween
22
39. Stage Two of the Two Factor
Analysis of Variance
• This stage determines the numerators for the
three F-ratios by partitioning SSbetween treatments
N
G
n
T
SS
row
row
A
22
N
G
n
T
SS
col
col
B
22
BAtreatmentsbetweenAxB SSSSSSSS
40. Degrees of freedom for
Two-Factor ANOVA
dftotal = N – 1
dfwithin treatments = Σdfinside each treatment
dfbetween treatments = k – 1
dfA = (number of rows) – 1
dfB = (number of columns)– 1
dferror = dfwithin treatments – dfbetween subjects
41. Mean squares and F-ratios for
the Two-Factor ANOVA
reatmentstwithin
reatmentstwithin
reatmentstwithin
df
SS
MS
AxB
AxB
AxB
B
B
B
A
A
A
df
SS
MS
df
SS
MS
df
SS
MS
within
AxB
AxB
within
B
B
within
A
A
MS
MS
F
MS
MS
F
MS
MS
F
42. Two-Factor ANOVA
Summary Table Example
Source SS df MS F
Between treatments 200 3
Factor A 40 1 40 4
Factor B 60 1 60 *6
A x B 100 1 100 **10
Within Treatments 300 20 10
Total 500 23
F.05 (1, 20) = 4.35*
F.01 (1, 20) = 8.10**
(N = 24; n = 6)
43. Two-Factor ANOVA Effect Size
• η2, is computed to show the percentage of
variability not explained by other factors
treatmentswithinA
A
AxBBtotal
A
A
SSSS
SS
SSSSSS
SS
2
treatmentswithinB
B
AxBAtotal
B
B
SSSS
SS
SSSSSS
SS
_
2
treatmentswithinAxB
AxB
BAtotal
AxB
AxB
SSSS
SS
SSSSSS
SS
2
44. In the Literature
• Report mean and standard deviations (usually
in a table or graph due to the complexity of
the design)
• Report results of hypothesis test for all three
terms (A & B main effects; A x B interaction)
• For each term include F, df, p-value & η2
• E.g., F (1, 20) = 6.33, p<.05, η2 = .478
45. Interpreting the Results
• Focus on the overall pattern of results
• Significant interactions require particular
attention because even if you understand the
main effects, interactions go beyond what
main effects alone can explain.
• Extensive practice is typically required to be
able to clearly articulate results which include
a significant interaction
47. Two-Factor ANOVA
Assumptions
• The validity of the ANOVA presented in this
chapter depends on three assumptions
common to other hypothesis tests
– The observations within each sample must be
independent of each other
– The populations from which the samples are
selected must be normally distributed
– The populations from which the samples are
selected must have equal variances
(homogeneity of variance)
48. Learning Check
• If a two-factor analysis of variance produces a
statistically significant interaction, then you
can conclude that _____
• either the main effect for factor A or the main effect
for factor B is also significantA
• neither the main effect for factor A nor the main
effect for factor B is significantB
• both the man effect for factor A and the main effect
for factor B are significantC
• the significance of the main effects is not related to
the significance of the interactionD
49. Learning Check - Answer
• If a two-factor analysis of variance produces a
statistically significant interaction, then you
can conclude that _____
• either the main effect for factor A or the main effect
for factor B is also significantA
• neither the main effect for factor A nor the main
effect for factor B is significantB
• both the man effect for factor A and the main effect
for factor B are significantC
• the significance of the main effects is not related
to the significance of the interactionD
50. Learning Check
• Decide if each of the following statements
is True or False
• Two separate single-factor ANOVAs provide
exactly the same information that is obtained
from a two-factor analysis of variance
T/F
• A disadvantage of combining 2 factors in an
experiment is that you cannot determine how
either factor would affect participants’ scores
if it were examined in an experiment by itself
T/F
51. Learning Check - Answers
• Main effects in Two-Factor ANOVA are
identical to results of two One-Way
ANOVAs; but Two-Factor ANOVA
provides Interaction results too!
False
• The two-factor ANOVA allows you to
determine the effect of one variable
controlling for the effect of the other
False
FIGURE 13.1 The partitioning of variance for a repeated measures experiment.
Interactions are one of the most difficult topics for students to grasp. A vivid and memorable example of an interaction may be used as an example to demonstrate an interaction by instructors with some basic chemistry knowledge. Hydrochloric acid (HCl) is a highly caustic and dangerous substance which will dissolve many materials including metals, woods, plastics and flesh. Sodium Hydroxide (NaOH) is a highly caustic substance which will dissolve hair, fats, and flesh (which makes it a common ingredient in drain cleaners).
The concentration of both substances determines how caustic it is: the higher concentration, the more caustic the substance. This represents a main effect: higher concentrations more caustic effects. But what would happen these two highly caustic substances were combined? How caustic would they be together? Most students (particularly those without a chemistry background) will assume additivity. In other words, if substance A is caustic and substance B is caustic, then adding the two together will be doubly caustic. They expect to predict the joint effect from knowledge of the separate, individual (main) effects. Instructors with a minimum gag reflex might pose these questions: “For 1 million dollars, would you drink a shot glass of HCL?”; “For 1 million dollars, would you drink a shot glass of NaOH?”; and “For 1 million dollars, would you drink a double shot glass of HCL + NaOH?” Generally students respond with a resounding “No!” to all three questions—particularly after the instructor has provided some examples of how caustic these substance are or pictures of burns suffered by people who have accidently spilled either substance one themselves. However, provided a trained chemist provides the exact concentrations and amounts of each substance, the last offer could be a relatively safe path to 1 million dollars. Why? Because of the way acids and bases interact. The interaction of HCl + NaOH produces NaCl + H2O—salty water. A double shot glass of salty water might make you vomit, but it would not harm you like HCl or NaOH. Interactions are different from what would be predicted from simply “adding” together the individual (main) effects of each factor.
FIGURE 13.2 (a) Graph showing the treatment means from Table 13.5, for which there is no interaction. (b) Graph for Table 13.6, for which there is an interaction.
FIGURE 13.3 Structure for the analysis for a two-factor ANOVA.
FIGURE 13.4 Sample means for the data in Example 13.4. The data are quiz scores from a two-factor study examining the effect of studying text on paper versus on a computer screen for either a fixed time or a self-regulated time.
FIGURE 13.5 The ANOVA for an independent-measures two-factor design.
FIGURE 13.6 Portions of the SPSS output for the repeated-measures ANOVA for the study evaluating different strategies for studying in Example 13.1.
FIGURE 13.7 Portions of the SPSS output for the two-factor ANOVA for the study in Example 13.4.