Psychology 340 SyllabusStatistics for the Social SciencesIllinois State University |
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.
- What kinds of things might cause the distributions for each of the different experimental conditions to be different from one another (between treatments variability)?
- Treatment/group effects - the treatment caused the differences
- Random (experimental) error - just what it sounds like, random error
- Random (experimental) error
- Treatment/group effects - the treatment caused the differences
- Individual difference effects - differences due to differences in individuals
- Random (experimental) error - just what it sounds like, random error
- Individual difference effects
- Random (experimental) error
- Treatment/group effects - the treatment caused the differences
- Random (experimental) error - just what it sounds like, random error
- Random (experimental) error
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.
Computing Within groups ANOVA
Same notation as one-way independent ANOVA with one addition
- P = person totals (add up all the values for each individual)
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
- H0: m1 =m2 = m3
Ha: not all groups are equal
For this problem let's assume an alpha level = 0.05
Step 2: Figure out the degrees of freedom
- We've now got more degrees of freedom to worry about:
- dftotal = N - 1
- dfbetween treatments = K - 1 (Notice the name change here)
- dfbetween subjects = n - 1 (Notice the formula change here)
- dfwithin = N - K
- dferror = dfwithin - dfbetween subjects
So for our example:
- dftotal = N - 1 = 15 - 1 = 14
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
- As was the case for degrees of freedom, we've got a lot
more Sums of Squares (SS) to compute
- SStotal = S(X - grandmean)2
- SSbetween treatments = Sn(condition mean - grandmean)2 (Notice the name change here)
- SSbetween subjects = (S[person total]2 / K) - (Grand sum)2 / N (Notice the formula change here)
- SSwithin = SSSi
- SSerror = SSwithin - SSbetween subjects
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
- F-ratio = MSbetween
treatments/MSerror = SSerror = 20 / 0.5 = 40.0
- You want to use the two degrees of freedom used in the F-ratio.
So that's the dfbetween treatments & dferror SSerror For this example:
- dfbetween treatments = 2
dferror = 8
So with an alpha level = 0.05 the critical F(2,8) = 4.46
- Since our observed F = 40.0 is greater than the critical F = 4.46, we would reject 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
Using SPSS to do a 1-way repeated measures ANOVA
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.
- Advantages:
- Fewer participants are required
- Experimental time is shorter
- Variability between groups is smaller (statistical advantage)
- Disadvantages
- Carry-over effects - Transfer between conditions is possible
- Effects persist from one condition into another
- Eg. Alcohol vs no alcohol experiment on the effects on hand-eye coordination. Hard to know how long the effects of alcohol may persist.
- Carry-over effects - Transfer between conditions is possible
- Counterbalancing is
probably necessary
- This is used to control for "order effects"
- Practice effects - improvement due to repeated practice
- Fatigue effects - performance deteriorates as participants get bored, tired, distracted
- every possible order (n!, e.g., AB = 2! = 2 orders; ABC = 3! = 6 orders, ABCD = 4! = 24 orders, etc).
- All counterbalancing assumes Symmetrical Transfer
- the assumption that AB and BA have reverse effects and thus cancel out in a counterbalanced design
- Partial counterbalancing
- Latin square designs - a form of partial counterbalancing, so that each group of trials occur in each position an equal number of times
- 1) each condition appears in each position (unbalanced Latin square)
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
- 1) each condition appears in each position (unbalanced Latin square)
- Randomized block designs - if you've got too many possible orders, then you may just randomize the order of your blocks from participant to participant.
- Latin square designs - a form of partial counterbalancing, so that each group of trials occur in each position an equal number of times
- Range effects - (context effects) can cause a problem
- The range of values for your levels may impact performance (typically best performance in middle of range). Since all the participants get the full range of possible values, they may "adapt" their performance (the DV) to this range.
- This is used to control for "order effects"
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).
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
- What is your computed F-ratio?
- What is your H0?
- If we assume a = 0.05, what conclusion will we make about our H0?
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
H0: m1 = m2 = m3
Looking at the p-value, we should reject H0.