2. Friedman test
• 3 or more scores from the same participants
• Builds on the Wilcoxon signed ranks test
• Uses ordinal data (ranks)
3. Wilcoxon Signed Ranks
Church member Pre-Orgazmo Post-Orgazmo Difference Rank of
difference
A 3 7 4 5
B 12 18 6 8
C 9 5 -4 5
D 7 7 0
E 8 12 4 5
F 1 5 4 5
G 15 16 1 1
H 10 12 2 2
I 11 15 4 5
J 10 17 7 9
Data from Lecture 4
4. Wilcoxon Signed Ranks
Church member Pre-Orgazmo Post-Orgazmo Difference Rank of
difference
A 3 7 4 5
B 12 18 6 8
C 9 5 -4 5
D 7 7 0
E 8 12 4 5
F 1 5 4 5
G 15 16 1 1
H 10 12 2 2
I 11 15 4 5
J 10 17 7 9
Data from Lecture 4
Calculate a difference between before
and after scores
5. Wilcoxon Signed Ranks
Church member Pre-Orgazmo Post-Orgazmo Difference Rank of
difference
A 3 7 4 5
B 12 18 6 8
C 9 5 -4 5
D 7 7 0
E 8 12 4 5
F 1 5 4 5
G 15 16 1 1
H 10 12 2 2
I 11 15 4 5
J 10 17 7 9
Data from Lecture 4
Rank those differences from smallest to
largest
6. Friedman test
• We can’t do that with three conditions and
get a meaningful answer
• So instead of calculating the differences and
ranking them…
• …we rank the scores and look for differences
7. Friedman test
• Imagine playing a group of participants the
same song on 3 separate occasions
• After each time we get a rating of how much
they like the song out of 5
• Data looks like this…
8. Participant First listen Second listen Third listen
A 1 3 5
B 2 4 5
C 2 3 2
D 1 1 5
E 1 4 5
F 1 2 5
G 2 3 5
H 1 4 4
I 3 1 5
J 1 3 5
Friedman test
9. • RANK WITHIN PARTICIPANTS!!!
• DO NOT RANK ALL SCORES AT ONCE!!!
• DO NOT RANK DOWN COLUMNS!!!
• DEAL WITH TIES AS USUAL
10. Participant First listen Rank1 Second listen Rank2 Third listen Rank3
A 1 1 3 2 5 3
B 2 1 4 2 5 3
C 2 1.5 3 3 2 1.5
D 1 1.5 1 1.5 5 3
E 1 1 4 2 5 3
F 1 1 2 2 5 3
G 2 1 3 2 5 3
H 1 1 4 2.5 4 2.5
I 3 2 1 1 5 3
J 1 1 3 2 5 3
Friedman test
11. Participant First listen Rank1 Second listen Rank2 Third listen Rank3
A 1 1 3 2 5 3
B 2 1 4 2 5 3
C 2 1.5 3 3 2 1.5
D 1 1.5 1 1.5 5 3
E 1 1 4 2 5 3
F 1 1 2 2 5 3
G 2 1 3 2 5 3
H 1 1 4 2.5 4 2.5
I 3 2 1 1 5 3
J 1 1 3 2 5 3
Total =
12
Total =
20
Total =
28
Friedman test
12. • In Kruskal-Wallis we calculated 2 estimates of the variance
in the population.
• If null hypothesis true then estimates are equal
• We do the same kind of thing in Friedman (very similar
formula too)
Sum of squares, between groups, as determined using ranks
Friedman
13. • In Kruskal-Wallis we calculated 2 estimates of the variance
in the population.
• If null hypothesis true then estimates are equal
• We do the same kind of thing in Friedman (very similar
formula too)
Sum of the squared total ranks per condition, divided by the
number of participants
Friedman
14. • In Kruskal-Wallis we calculated 2 estimates of the variance
in the population.
• If null hypothesis true then estimates are equal
• We do the same kind of thing in Friedman (very similar
formula too)
Sum of the squared total of all ranks, divided by the number
of participants x the number of conditions
Friedman
15. Friedman
• First listen
• Sum of ranks = 12
• Second listen
• Sum of ranks = 20
• Third listen
• Sum of ranks = 28
122+202+ 282
10
= 132.8
16. Friedman
• First listen
• Sum of ranks = 12
• Second listen
• Sum of ranks = 20
• Third listen
• Sum of ranks = 28
12+20+28 2
10 × 3
=120
19. Friedman
• Figure out Χ2
SSbg(R)
k(k+1)/12
• Where k is the number of conditions
• H = 12.8/1
• H = 12.8
• Bigger the Χ2, the less likely it is that the ranks are
distributed as you’d expect if there were no differences
between conditions