Laerd Statistics LoginCookies & Privacy

Friedman Test in SPSS

Introduction

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 (e.g., data that has marked deviations from normality).

SPSS

Assumptions

When you choose to analyse your data using a Friedman test, part of the process involves checking to make sure that the data you want to analyse can actually be analysed using a Friedman test. You need to do this because it is only appropriate to use a Friedman test if your data "passes" the following four 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.

SPSS

Example

A researcher wants to examine whether music has an effect on the perceived psychological effort required to perform an exercise session. The dependent variable is "perceived effort to perform exercise" and the independent variable is "music type", which consists of three groups: "no music", "classical music" and "dance music". To test whether music has an effect on the perceived psychological effort required to perform an exercise session, the researcher recruited 12 runners who each ran three times on a treadmill for 30 minutes. For consistency, the treadmill speed was the same for all three runs. In a random order, each subject ran: (a) listening to no music at all; (b) listening to classical music; and (c) listening to dance music. At the end of each run, subjects were 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 was then carried out to see if there were differences in perceived effort based on music type.

SPSS

Setup in SPSS

SPSS puts all repeated measures data on the same row in its Data View. Therefore, you will need as many variables as you have related groups. In our example, we need three variables, which we have labelled "none", "classical" and "dance" to represent the subjects' perceived effort when running based on the three different types of music.

Setup of Data for the Friedman Test in SPSS

Published with written permission from SPSS, IBM Corporation.

If you are still unsure how to enter your data correctly, we show you how to do this in our enhanced Friedman test guide. You can learn about our enhanced data setup content here, or our enhanced guides as a whole here.

TAKE THE TOUR

SPSS

Friedman Test Procedure in SPSS

The eight steps below show you how to analyse your data using a Friedman test in SPSS when none of the assumptions in the previous section, Assumptions, have been violated. At the end of these eight steps, we show you how to interpret the results from your Friedman test.

Join the 1,000s of students, academics and professionals who rely on Laerd Statistics. TAKE THE TOUR
SPSS

SPSS Output for the Friedman Test

SPSS will generate either 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 Descriptives Statistics table will be produced if you selected the Quartiles option:

Dialogue Statistics Table Output for the Friedman Test in SPSS

Published with written permission from SPSS, IBM Corporation.

This is a very useful table because 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 in the "Reporting the Output" section later.

Ranks Table

The Ranks table shows the mean rank for each of the related groups, as shown below:

Ranks Table Output for the Friedman Test in SPSS

Published with written permission from SPSS, IBM Corporation.

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

The Test Statistics table 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:

Test Statistics Table Output for the Friedman Test in SPSS

Published with written permission from SPSS, IBM Corporation.

The table above 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. From our example, we can see 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.

SPSS

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, 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:

  1. None to Classical.
  2. None to Dance.
  3. Classical to Dance.

You need to use a Bonferroni adjustment on the results you get from the Wilcoxon tests because 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, 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, you get the following result:

Post-hoc Wilcoxon Tests for the Friedman Test in SPSS

Published with written permission from SPSS, IBM Corporation.

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.

SPSS

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).

TAKE THE TOUR

1