Consider the following research description:
| Person | pre-test | 4 week test | 16 week test |
| A | 2 | 4 | 6 |
| B | 0 | 2 | 4 |
| C | 1 | 3 | 5 |
| D | 3 | 6 | 6 |
| E | 4 | 5 | 9 |
One might be tempted to analyze this data set using the ANOVA process that we discussed last time. But that's not the appropriate analysis to do because the data in the different conditions are not independent. This design is referred to as a within-subjects or repeated measures ANOVA design. What this means is that the everybody in the experiment participates in all levels of the factor (independent variable).
So when is an ANOVA the appropriate analysis? Check the decision tree.
Find the string of decisions that lead to a 1-way between groups Analysis of Variance.
Find the string of decisions that lead to a 1-way within groups (repeated measures) Analysis of Variance.
The difference is whether or not the data in the different experimental conditions are independent or not.
Why would we decide to design our experiment as a repeated measures design instead of a between subjects? By using participants as their own comparison group we can remove the variance due to subjects from the overall variance due to treatments.
Now let's consider the sources of variance in our design.
Notice the major difference between this breakdown and the breakdown we did for 1-way between groups ANOVA. Because we are using the same participants in all of the experimental conditions, we are able to remove the variance due to individual differences.
The result is that we may dramatically reduce the overall variability in the test statistic, which in turn will dramatically increase the statistical power of our test. This is the main reason why repeated measures designs are used.
| 1-way between groups ANOVA between treatments variability
|
1-way within groups ANOVA between treatments variability
|
The computations for the two 1 factor ANOVAs are similar. The 1-way between groups ANOVA partitions the total variance into two parts: a between subjects part and a within subjects part.
The 1-way repeated measures ANOVA partitions the total variance into three parts: a between subjects part and a within subjects part and a between treatments part. This is accomplished by doing the same basic computations that we did for the 1-way between groups ANOVA, but then we further partition the within groups variance.
Same notation as one-way independent ANOVA with one addition
| Person | pre-test | 4 week test | 16 week test | person totals |
| A | 2 | 4 | 6 | 12 |
| B | 0 | 2 | 4 | 6 |
| C | 1 | 3 | 5 | 9 |
| D | 3 | 6 | 6 | 15 |
| E | 4 | 5 | 9 | 18 |
| Totals | 10 | 20 | 30 | |
| means | 2.0 | 4.0 | 6.0 | |
| SS | 10 | 10 | 14 | |
| n | 5 | 5 | 5 |
N = 15
K = 3
G = 60
Grand mean = 60/15 = 4.0
SStotal = S(X -
grandmean)2 = 74
Step 1: State the hypotheses & set the alpha-level
For this problem let's assume an alpha level = 0.05
Step 2: Figure out the degrees of freedom
So for our example:
dfbetween treatments = K - 1 = 3 - 1 = 2
dfbetween subjects = n - 1 = 5 - 1 = 4
dfwithin = N - K = 15 - 3 = 12
dferror = dfwithin - dfbetween subjects = 12 - 4 = 8
SStotal = S(X - grandmean)2 = 74
SSbetween treatments = Sn(condition mean - grandmean)2 = 40
SSbetween subjects = (S[person total]2 / K) - (Grand sum)2 / N = 122/3 + 62/3 + ... + 182/3 - 602/15 = 30
SSwithin = SSSi = 34
SSerror = SSwithin - SSbetween subjects = 34 - 30 = 4
MSbetween treatments = SSbetween treatments / dfbetween treatments = 40 / 2 = 20
MSbetween subjects = SSbetween subjects / dfbetween subjects = 30 / 4 = 7.5
MSwithin = SSwithin / dfwithin = 34 /
12 = 2.83
MSerror = SSerror / dferror = 4 / 8 =
0.5
So with an alpha level = 0.05 the critical F(2,8) = 4.46
Step 5: Make a decision about the null hypothesis
Source SS df MS Between treatments 40 2 20.0 F = 40.00 Within treatments 34 12 2.83 Between subjects 30 4 7.5 Error 4 8 0.5 Total 74 14Often the two Means Squares that you see in blue aren't reported
| As was the case with match-samples t-test, repeated-measures designs require that the data be considered together. That is, all of a single participant's data need be grouped. As a result, the SPSS file needs to have a separate column of data for each level of the within-groups variable. | ![]() |
| The repeated measures ANOVA is run through the General Linear Model submenu of the analyze menu. | ![]() |
| You will use this option for both 1-way repeated measures designs and factorial (more than 1 factor) repeated measures designs. So you must specify what the factors and levels of the factors are. |
![]() |
You get a lot of output (even more than what is pictured below). For now, this is the only one that we're interested in.
Additional Information about Within subjects designs.
| A | B | C | D |
| B | C | D | A |
| C | D | A | B |
| D | A | B | C |
2) each condition appears before and after all others (with #1 - balanced Latin square)
| A | B | D | C |
| B | C | A | D |
| C | D | B | A |
| D | A | C | B |
An example
A psychologist is asked by a dog food manufacturer to determine if animals
will show a preference among three new food mixes recently developed. The
psychologist takes a sample of n = 6 dogs. They are deprived of food
overnight and presented simultaneously with three bowls of the mixes on the
next morning. After 10 mins, the bowls are rmoved and the amount of food
eaten is measured. The data are presented below. Perform the appropriate
test with an alpha level = 0.05. Use SPSS or by
hand to perform the One-way ANOVA (repeated measures).
H0: m1 = m2 = m3
Looking at the p-value, we should reject H0.
Food type
Dog
Mix A
Mix B
Mix C
A
3
2
1
B
0
5
1
C
2
4
3
D
0
7
5
E
0
3
3
F
1
3
5
Source SS df MS F
Between treatments 28 2 14 4.67
Within treatments 40 15
Between subjects 10 5
Error 30 10 3
Total 68 17