Friedman Test in SPSS
Overview
The Friedman Test is the non-parametric alternative to the one-way ANOVA with repeated measures. It is used to test for differences between groups when the dependent variable being measured is ordinal. It can also be used for continuous data that has violated the assumptions necessary to run the one-way ANOVA with repeated measures; for example, marked deviations from normality.
Assumptions
- One group that is measured on three or more different occasions.
- Group is a random sample from the population.
- One dependent variable that is either ordinal, interval or ratio (see our Types of Variable guide).
- Samples do NOT need to be normally distributed.
Example
A researcher wishes to examine whether music has an effect on the perceived psychological effort required to perform an exercise session. To test this, the researcher recruits 12 runners who each run three times on a treadmill for 30 minutes long and conducted at the same running speed. Each subject runs once listening to no music at all, runs once listening to classical music and runs another listening to dance music, in a random order. At the end of each run, subjects are asked to record how hard the running session felt on a scale of 1 to 10, with 1 being easy and 10 extremely hard. A Friedman test is then run to see if there are differences between the music type on perceived effort.
Setting Up Your Data in SPSS
SPSS puts all repeated measures data on the same row in its Data View and, therefore, you will need as many variables as related groups. In our example, we need three variables, which we have labelled "none", "classical" and "dance" to represent the subjects' perceived effort of the run when listening to the different types of music.
Published with written permission from SPSS Inc, an IBM Company.
Testing of Assumptions
The Friedman Test procedure in SPSS will not test any of the assumptions that are required for this test. In most cases this is because the assumptions are a methodological or study design issue and not what SPSS is designed for. In the case of assessing the types of variable you are using, SPSS will not provide you with any errors if you incorrectly label your variables as nominal.
Friedman Test Procedure in SPSS
Click Analyze > Nonparametric Tests > Legacy Dialogs > K Related Samples... on the top menu as shown below: (ignore Legacy Dialogs if on a previous version to SPSS 18.0)
Published with written permission from SPSS Inc, an IBM Company.
- You will be presented with the following screen:
Published with written permission from SPSS Inc, an IBM Company.
- Move the dependent variables "none", "classical" and "dance" to the "Test Variables:" box by using the
button or by dragging-and-dropping the variables into the box. You will end up with the following:
Published with written permission from SPSS Inc, an IBM Company.
- Make sure that "Friedman" is selected in the "Test Type " option area.
- Click the
button. You will be presented with the following screen: - Tick the "Quartiles" option: [It is most likely that you will only want to include the "Quartiles" option as your data is probably unsuitable for "Descriptives", hence why you are running a non-parametric test. However, SPSS includes this option anyway.]
- Click the
button. This will return you back to the main dialogue box: - Click the
button to run the Friedman Test.
Published with written permission from SPSS Inc, an IBM Company.
Published with written permission from SPSS Inc, an IBM Company.
Published with written permission from SPSS Inc, an IBM Company.
SPSS Output for the Friedman Test
SPSS will generate two or three tables depending on whether you selected to have descriptives and/or quartiles generated in addition to running the Friedman Test.
Descriptive Statistics Table
The following table will be produced if you selected the Quartiles option:
Published with written permission from SPSS Inc, an IBM Company.
This is a very useful table as it can be used to present descriptive statistics in your results section for each of the time points or conditions (depending on your study design) for your dependent variable. This usefulness will be presented later on in this guide, in the "Reporting the Output" section.
Ranks Table
The Ranks table shows the mean rank for each of the related groups, as shown below:
Published with written permission from SPSS Inc, an IBM Company.
The Friedman Test compares the mean ranks between the related groups and indicates how the groups differed and it is included for this reason. However, you are not very likely to actually report these values in your results section but most likely will report the median value for each related group.
Test Statistics Table
This is the table which informs you of the actual result of the Friedman Test and whether there was an overall statistically significant difference between the mean ranks of your related groups. For the example used in this guide, the table looks as follows:
Published with written permission from SPSS Inc, an IBM Company.
The above table provides the test statistic (χ2) value (Chi-square), degrees of freedom (df) and the significance level (Asymp. Sig.), which is all we need to report the result of the Friedman Test. We can see, from our example, that there is an overall statistically significant difference between the mean ranks of the related groups. It is important to note that the Friedman Test is an omnibus test like its parametric alternative - that is, it tells you whether there are overall differences but does not pinpoint which groups in particular differ from each other. To do this you need to run post-hoc tests, which will be discussed after the next section.
Reporting the Output of the Friedman Test (without post-hoc tests)
You can report the Friedman Test result as follows: There was a statistically significant difference in perceived effort depending on which type of music was listened to whilst running, χ2(2) = 7.600, P = 0.022.
You could also include the median values for each of the related groups. However, at this stage, you only know that there are differences somewhere between the related groups but you do not know exactly where those differences lie. Remember though, that if your Friedman Test result was not statistically significant then you should not run post-hoc tests.
Post-hoc Tests
To examine where the differences actually occur, you need to run separate Wilcoxon Signed-Rank Tests on the different combinations of related groups. So, in this example, you would compare the following combinations:
- None to Classical
- None to Dance
- Classical to Dance
You need to use a Bonferroni adjustment on the results you get from the Wilcoxon tests as you are making multiple comparisons, which makes it more likely that you will declare a result significant when you should not (a Type I error). Luckily, the Bonferroni adjustment is very easy to calculate; simply take the significance level you were initially using (in this case 0.05) and divide it by the number of tests you are running. So in this example, we have a new significance level of 0.05/3 = 0.017. This means that if the P value is larger than 0.017 then we do not have a statistically significant result.
Running these tests (see how with our Wilcoxon Signed-Rank Test guide) on the results from this example then you get the following result:
Published with written permission from SPSS Inc, an IBM Company.
This table shows the output of the Wilcoxon Signed-Rank Test on each of our combinations. It is important to note that the significance values have not been adjusted in SPSS to compensate for multiple comparisons - you must manually compare the significance values produced by SPSS to the Bonferroni-adjusted significance level you have calculated. We can see that at the P < 0.017 significance level only perceived effort between no music and dance (dance-none, P = 0.008) was statistically significantly different.
Reporting the Output of the Friedman Test (with post-hoc tests)
You can report the Friedman Test with post-hoc tests results as follows: There was a statistically significant difference in perceived effort depending on which type of music was listened to whilst running, χ2(2) = 7.600, P = 0.022. Post-hoc analysis with Wilcoxon Signed-Rank Tests was conducted with a Bonferroni correction applied, resulting in a significance level set at P < 0.017. Median (IQR) perceived effort levels for the no-music, classical and dance music running trial were 7.5 (7 to 8), 7.5 (6.25 to 8) and 6.5 (6 to 7), respectively. There were no significant differences between the no-music and classical music running trials (Z = -0.061, P = 0.952) or between the classical and dance music running trials (Z = -1.811, P = 0.070) despite an overall reduction in perceived effort in the dance vs. classical running trials. However, there was a statistically significant reduction in perceived effort in the dance music vs. no music trial (Z = -2.636, P = 0.008).



