Professional Documents
Culture Documents
Friedman Test Example
Friedman Test Example
Introduction
The Friedman test, also known as Friedman’s ANOVA, is the non-parametric alternative to the
one-way repeated measures ANOVA test and is used to determine whether there are any statistically
significant differences between the distributions of three or more related groups. The groups are related as
they contain the same cases (e.g., participants) in each group and each group represents a repeated
measurement on the same dependent variable. This test is mostly used if the OR the dependent variable is
measured on an ordinal scale.
The following characterized Friedman test:
o There is one dependent variable that is measured at the continuous (when the assumption of
normality is markedly violated) OR measured at the ordinal level (no assumptions on the data).
o There is one independent variable that consists of three or more categorical, related groups or
matched cases.
A Friedman test is most often used for four types of study design: (a) to determine if there are
differences between three or more time points; (b) to determine if there are differences between conditions;
(c) to determine if there are differences in change scores; and (d) to determine if there are differences
between measurements.
Example
A psychologist was interested in the effects of television programs on domestic life. She
hypothesized that through ‘learning by watching’, certain programs might actually encourage people to
behave like the characters within them. This in turn could affect the viewer’s own relationships (depending
on whether the program depicted harmonious or dysfunctional relationships). She took episodes of three TV
shows and showed them to 54 couples, after which the couple were left alone in the room for an hour. The
experimenter measured the number of times the couple argued. Each couple viewed all three of the TV
programs at different points in time (a week apart) and the order in which the programs were viewed was
counterbalanced over couples. The TV programs selected were EastEnders (which typically portrays the
lives of extremely miserable, argumentative, London folk who like nothing more than to beat each other up,
lie to each other, sleep with each other’s wives and generally show no evidence of any consideration to their
fellow humans), Friends (which portrays a group of unrealistically considerate and nice people who love
each other oh so very much), and a National Geographic program about whales (this was a control).
Hypotheses
H0: There is no difference in the number of times the couples argued who watched the TV
programs.
H1: There is a difference in the number of times the couples argued who watched the TV programs.
Data Set
Use the data set Friedman Test. Notice that this data set has 54 records, which represent the 54
couples in the study. In this data set, the data in columns 1, 2 and 3, represent the number of times the
couples argued after watching the TV programs EastEnders, Friends, and National Geographic program on
whales, respectively. The data are arranged this way just for visual clarity; the order of the records has no
bearing on the statistical results.
1|rtqcasem2022
Based on study design, the test appropriate for the case is one-way repeated measures ANOVA. So, we
have to check the other assumptions of this test. There are five assumptions of one-way repeated measures
ANOVA, the first two (based on the number and type of variables and level of data) are inherent in the study
design, while the last three (outliers, normality and sphericity) are dependent on the nature of data gathered.
Now, we check whether the assumptions about the data are satisfied.
Figure 1 Figure 2
Figure 3
The boxplots generated show that there are outliers in the EastEnders data, the data entries #25
and 29 which are both equal to 15 as shown in Figure 4a (also highlighted in red box in Figure 4d).
Table 1 also shows that all the three sets of data are not normal ( p values are all less than 0.05). So, we
need to replace these data entries by 13, the next highest value in the EastEnders data (Figure 4d).
2|rtqcasem2022
Figure 4a Figure 4b Figure 4c
Figure 4d Figure 4e
Table 1
Now that we have replaced the two entries by 13 (see Figure 4e), we repeat the SPSS procedure
on page 2. Figure 5 shows that the EastEnders data no longer have outliers. There are not any outliers
anymore. However, Table 2 shows that the data sets are still not normal even though they are free
from outliers.
3|rtqcasem2022
Figure 5 Figure 6
Table 2
So, next we try to transform the data and see if we can achieve normality. Since the data sets
appear to be negatively skewed, we will use “reflect and square root transformation”.
Figure 7 Figure 8
4|rtqcasem2022
You would notice that the column eastenders_reflect_sqrt will be added in the data set (see
Figure 8). The entries under this column are the transformed EastEnders data using reflect and square
root transformation.
Repeat the same process to transform the Friends data and NatGeo data, one at a time (see Figure 9 and
Figure 10. The results are shown in Figure 11.
Figure 9 Figure 10
Figure 11
Now that we have transformed the data, we repeat the procedure on page 2 for the third time to
check whether the transformed data sets are normal. (Remember to select the transformed data while
you perform the process.)
Table 3 presents the normality tests of the three related groups, as part of the SPSS output in
exploring the transformed data sets. The Shapiro-Wilk test revealed that the transformed Friends data
follow a normal distribution as indicated by p=.054 , which is higher than 0.05 level of significance.
However, EastEnders data and NatGeo data are still not normal. Hence, the normality condition is not
met. Since one of the assumptions is not met, we do not need to proceed further to check for
sphericity requirement. It follows that we cannot use the one-way repeated measures ANOVA to
analyze the data. Hence, we use its nonparametric test equivalent, the Friedman test.
Table 3
Friedman Test
5|rtqcasem2022
Since we are using the Friedman test, which is a nonparametric test, there are no assumptions about the
data that we need to satisfy. So, we will analyze the original data set, the one with no modified data entries
and not transformed. Now, go on and close the data file without saving the changes you made earlier. Then,
re-open it again. To perform the Friedman test in SPSS Statistics, follow the procedure below.
SPSS Procedure
1. Click Analyze > Nonparametric Tests > Related Samples... on the main menu (You will be
presented with the Nonparametric Tests: Two or More Related Samples dialogue box, as shown
in Figure 12)
2. Click the tab.
3. Select all the related variables, Eastenders, Friends and National Geographic in the Fields box and
transfer them into the Test Fields: box using the arrow button, as shown in Figure 13.
4. Click the button to generate the output.
Figure 12 Figure 13
The generated SPSS output is shown in Table 4. We will interpret this later after we do the next
procedure.
Table 4
Unfortunately, the nonparametric method does not generate the median for each group, which is a
common way of expressing the central tendency of the groups when running a Friedman test. To correct
for this, you will generate the medians using the following procedure.
6|rtqcasem2022
highlighting the relevant statistic (by clicking on it) and then clicking the or button, as
appropriate. You will end up with the screen shown in Figure 17.
5. Click the button and you will be returned to the Means dialogue box.
6. Click the button to generate the output.
Figure 14 Figure 15
Figure 16 Figure 17
After completing the procedure, you would obtain in the SPSS output the Report shown in Table 5.
Table 5
After running the Friedman test procedure in the previous section, SPSS Statistics will have
generated a number of tables and graphs that contain all the information you need to report the results of
the Friedman test. This time, we explain how to interpret these results based on whether: (a) your
Friedman test was statistically significant; and (b) you ran pairwise comparisons. If your Friedman test is
not statistically significant ( p ¿ .05), you would not follow up this result with any post hoc tests, but just
report the result of the Friedman test. However, if your Friedman test is statistically significant ( p ≤ .05),
you can investigate further with post hoc tests to determine where exactly the differences between groups
lie.
7|rtqcasem2022
about this test, and the post hoc test results, you need to double-click on the table in the SPSS output to
launch the Model Viewer window, as shown in Figure 18.
Figure 18
If you look at the right-hand pane, entitled Related-Samples Friedman's Two-Way Analysis of
Variance by Ranks, you will see the result of the test in more detail. You can use the values in the table
to present the results of the Friedman test as shown on the last section of this material.
Now we know that the Friedman test was statistically significant, which means that there is at
least one difference between one of the groups. SPSS Statistics runs pairwise comparisons if the result
was statistically significant. Note that, if you did not get a statistically significant result, SPSS Statistics
will not generate any pairwise comparisons. You can view these follow-up tests by selecting "Pairwise
Comparisons" from the View: drop-down option in the Friedman test result, as shown in Figure 19.
Figure 19
Clicking the "Pairwise Comparisons" will present the Pairwise Comparisons window, with graph
(orange denotes a statistically significant pairwise comparison) supported by a table (statistically
significant pairwise comparison also highlighted in orange), as shown in Figure 20.
It appears that the group Friends and Eastenders are statistically significant with p=.037 while
the other two pairs are not ( p>.05) (we use the “Adj. Sig” column, it is the adjusted significance levels
using a Bonferroni correction). This implies that number of times the couples argued after watching
Friends and Eastenders is significantly different.
8|rtqcasem2022
The Report table in Table 5 contains the medians of the different levels of the independent
variable. Knowing these median values can help when it comes to reporting the results.
Figure 20
Formula Calculations
where:
Ri = sum of ranks of group i
k= number of related groups/ conditions/ levels of IV
n= number of observations per group/ number of subjects
df= (k-1)(n-1)
Reference link:
9|rtqcasem2022
https://statistics.laerd.com/spss-tutorials/friedman-test-using-spss-statistics.php
10 | r t q c a s e m 2 0 2 2