Not sure this is the right statistical method? Use the Choose Your StatsTest workflow to select the right method.
What is the Friedman Test?
The Friedman Test is a statistical test used to determine if 3 or more measurements from the same group of subjects are significantly different from each other on a skewed variable of interest. Your variable of interest should be continuous, and have a similar spread across your groups. Also, you should have enough data (more than 5 values in each group).
The Friedman Tests is also sometimes called the Non-Parametric Repeated Measures ANOVA, Non-Parametric Friedman Test, or the Friedman Rank Sum Test.
Assumptions for the Friedman Test
Every statistical method has assumptions. Assumptions mean that your data must satisfy certain properties in order for statistical method results to be accurate.
The assumptions for the Friedman Test include:
- Random Sample
- Enough Data
Let’s dive in to each one of these separately.
The variable that you care about (and want to see if it is different across the 3+ groups) must be continuous. Continuous means that the variable can take on any reasonable value.
Some good examples of continuous variables include age, weight, height, test scores, survey scores, yearly salary, etc.
If your variable is normally distributed, you may want to use a One-Way Repeated Measures ANOVA instead.
The data points for each group in your analysis must have come from a simple random sample. This means that if you wanted to see if drinking sugary soda makes you gain weight, you would need to randomly select a group of soda drinkers for your soda drinker group.
The key here is that the data points for each group were randomly selected. This is important because if your groups were not randomly determined then your analysis will be incorrect. In statistical terms this is called bias, or a tendency to have incorrect results because of bad data.
If you do not have a random sample, the conclusions you can draw from your results are very limited. You should try to get a simple random sample. If you have independent samples (3 measurements from different, unrelated groups) then you should use the Kruskal-Wallis One-Way ANOVA instead.
The sample size (or data set size) should be greater than 5 in each group. Some people argue for more, but more than 5 is probably sufficient.
The sample size also depends on the expected size of the difference across groups. If you expect a large difference across groups, then you can get away with a smaller sample size. If you expect a small difference across groups, then you likely need a larger sample.
When to use the Friedman Test?
You should use the Friedman Test in the following scenario:
- You want to know if many groups are different on your variable of interest
- Your variable of interest is continuous
- You have 3 or more groups
- You have related samples
Let’s clarify these to help you know when to use the Friedman Test.
You are looking for a statistical test to see whether three or more groups are significantly different on your variable of interest. This is a difference question. Other types of analyses include examining the relationship between two variables (correlation) or predicting one variable using another variable (prediction).
Your variable of interest must be continuous. Continuous means that your variable of interest can basically take on any value, such as heart rate, height, weight, number of ice cream bars you can eat in 1 minute, etc.
Types of data that are NOT continuous include ordered data (such as finishing place in a race, best business rankings, etc.), categorical data (gender, eye color, race, etc.), or binary data (purchased the product or not, has the disease or not, etc.).
Three or more Groups
The Friedman Test can be used to compare three or more related groups on your variable of interest. See below for an explanation of what “related” groups means.
If you have only two groups, you should use the Wilcoxon Signed-Rank Test instead.
Related samples means that you have repeated measures from the same units of observation. For example, if you have a group of men undergoing a treatment and you measure their cholesterol levels at 3 time points, then you have 3 groups of related data.
If you have 3 or more independent groups, you should use a Kruskal-Wallis One-Way ANOVA instead.
Friedman Test Example
Scenario: A random sample of men undergo an exercise program
Repeated Measures: Data were collected at month 1, 2 and 3
Variable of interest: Cholesterol levels
In this example we have three related groups (the three points in time) and one continuous variable of interest. After investigating our data, we determine that our variable of interest, cholesterol levels, is positively skewed, so we know to perform the Friedman Test. After confirming that our data meet the other assumptions of this test, we proceed with the analysis.
The null hypothesis, which is statistical lingo for what would happen if the exercise program does nothing, is that none of the three groups have different cholesterol levels, on average. We are trying to determine if receiving any of the three time points is significantly different from the others.
After the experiment is over, we compare the three groups on our variable of interest (cholesterol levels) using a Friedman Test. When we run the analysis, we get a “Chi-sqaure” statistic and a p-value. The Chi-square statistic is a measure of how different the three groups are on our cholesterol variable of interest.
A p-value is the chance of seeing our results assuming that the exercise program has no effect on cholesterol levels. A p-value less than or equal to 0.05 means that our result is statistically significant and we can trust that the difference is not due to chance alone.
If the Chi-square statistic is high and the p-value is low, it means that the cholesterol levels were significantly different in at least one of the time points. Further investigation is required to determine the which group(s) was significantly higher/lower than the others.
Frequently Asked Questions
Q: How do I run the Friedman Test in SPSS or R?
A: This resource is focused on helping you pick the right statistical method every time. There are many resources available to help you figure out how to run this method with your data:
SPSS article: https://statistics.laerd.com/spss-tutorials/friedman-test-using-spss-statistics.php
SPSS video: https://www.youtube.com/watch?v=H-oiQ3f4ouM
R article: https://www.datanovia.com/en/lessons/friedman-test-in-r/
R video: https://www.youtube.com/watch?v=DPfFNVpt4po
If you still can’t figure something out, feel free to reach out.