Friedman Test Calculator
Non-parametric repeated measures test.
Enter data for each condition. Each row should have one value per subject (same number of values in each condition).
Enter at least 3 conditions with equal number of values
Use the Friedman test when you want to compare three or more treatments or conditions, but the same people (or matched subjects) experience all of them. For example, if you had patients rate their pain after trying three different medications, or judges score the same set of products, this test tells you whether the conditions produce genuinely different resultsβwithout requiring your data to follow a normal distribution.
What Is the Friedman Test?
The Friedman test is the non-parametric alternative to repeated measures ANOVA. It compares three or more related groups (same subjects measured under different conditions).
Question answered: "Do treatments/conditions have different effects when the same subjects experience all conditions?"
Examples:
- Compare pain levels under 3 different medications (each patient tries all 3)
- Rate 4 products by the same panel of judges
- Measure performance at 5 time points for the same subjects
How It Works
Step 1: Arrange Data in Blocks
Each subject (block) experiences all conditions:
| Subject | Condition A | Condition B | Condition C |
|---|---|---|---|
| 1 | 85 | 90 | 88 |
| 2 | 72 | 78 | 75 |
| 3 | 91 | 95 | 100 |
| 4 | 68 | 70 | 74 |
Step 2: Rank Within Each Subject
Rank from 1 (lowest) to k (highest) within each row:
| Subject | Rank A | Rank B | Rank C |
|---|---|---|---|
| 1 | 1 | 3 | 2 |
| 2 | 1 | 3 | 2 |
| 3 | 1 | 2 | 3 |
| 4 | 1 | 2 | 3 |
Step 3: Sum Ranks for Each Condition
Step 4: Calculate Test Statistic
Where:
- n = number of subjects (blocks)
- k = number of conditions
- = sum of ranks for condition j
Step 5: Determine P-Value
Compare to chi-square distribution with degrees of freedom.
For , df = 2:
Conclusion: Significant difference between conditions ().
Handling Ties
When values are tied within a subject, assign average ranks.
| Subject | A | B | C | Rank A | Rank B | Rank C |
|---|---|---|---|---|---|---|
| 1 | 80 | 80 | 90 | 1.5 | 1.5 | 3 |
Apply tie correction to the test statistic if ties are common.
Post-Hoc Tests
A significant Friedman test indicates at least one condition differs, but not which ones.
Nemenyi Test
The most common post-hoc procedure:
Critical difference:
Compare pairwise rank sum differences to CD.
Conover Test
More powerful alternative using t-distribution.
Wilcoxon Signed-Rank Tests with Bonferroni
Perform pairwise Wilcoxon tests, adjusting Ξ± for multiple comparisons.
Effect Size
Kendall's W (Coefficient of Concordance)
| W | Interpretation |
|---|---|
| 0 | No agreement/effect |
| 0.1 | Small |
| 0.3 | Medium |
| 0.5 | Large |
| 1 | Perfect agreement |
From our example: (large effect)
Comparison with Repeated Measures ANOVA
| Aspect | RM ANOVA | Friedman |
|---|---|---|
| Assumption | Normality, sphericity | None |
| Data type | Continuous | Ordinal or continuous |
| Analyzes | Means | Ranks (medians) |
| Power (normal data) | Higher | ~90% of ANOVA |
| Outliers | Sensitive | Robust |
Assumptions
Related Groups
Same subjects measured under all conditions (or matched subjects).
Independent Blocks
Different subjects are independent of each other.
Ordinal Scale (Minimum)
Data can be meaningfully ranked within each subject.
Similar Distribution Shape
Conditions should have similarly shaped distributions.
Example: Complete Analysis
Scenario: 8 judges rate 4 wines on a 0-100 scale.
| Judge | Wine A | Wine B | Wine C | Wine D |
|---|---|---|---|---|
| 1 | 72 | 85 | 78 | 82 |
| 2 | 68 | 90 | 75 | 88 |
| 3 | 75 | 82 | 80 | 85 |
| 4 | 70 | 88 | 72 | 84 |
| 5 | 65 | 80 | 70 | 78 |
| 6 | 78 | 92 | 82 | 88 |
| 7 | 72 | 85 | 76 | 80 |
| 8 | 68 | 87 | 74 | 83 |
Rank within each judge:
| Judge | Rank A | Rank B | Rank C | Rank D |
|---|---|---|---|---|
| 1 | 1 | 4 | 2 | 3 |
| 2 | 1 | 4 | 2 | 3 |
| 3 | 1 | 3 | 2 | 4 |
| 4 | 1 | 4 | 2 | 3 |
| 5 | 1 | 4 | 2 | 3 |
| 6 | 1 | 4 | 2 | 3 |
| 7 | 1 | 4 | 2 | 3 |
| 8 | 1 | 4 | 2 | 3 |
Rank sums: A = 8, B = 31, C = 16, D = 25
P-value:
Kendall's W:
Conclusion: Highly significant difference in wine ratings (, ). Very high agreement among judges ().
Applications
Medical Research
- Crossover drug trials
- Repeated measures with ordinal outcomes
- Quality of life assessments over time
Psychology
- Within-subject experiments
- Rating studies
- Repeated testing
Sensory Evaluation
- Panel testing of products
- Taste tests
- Quality comparisons
Education
- Student performance across multiple tests
- Course evaluation comparisons
Common Mistakes
Using for Independent Groups
Friedman is for related groups. Use Kruskal-Wallis for independent groups.
Ranking Across All Data
Ranks should be assigned within each subject, not across the entire dataset.
Ignoring Post-Hoc Tests
A significant result requires follow-up tests to identify which conditions differ.
Small Sample Sizes
With few subjects (n < 10), consider exact p-values rather than chi-square approximation.
Reporting Results
APA format:
"A Friedman test showed a significant difference in wine ratings across the four wines, ΟΒ²(3) = 22.95, p < .001, W = .96. Post-hoc Nemenyi tests indicated that Wine B was rated significantly higher than Wine A (p < .001) and Wine C (p = .02), while Wine D was rated higher than Wine A (p = .01)."
Historical Context
Milton Friedman (the economist, not to be confused with the test) developed this test in 1937 as part of his work on rank methods in statistics.
The test extended the Wilcoxon signed-rank concept to multiple related groups, providing a non-parametric alternative to repeated measures ANOVA.
Extensions
Page's Test
When conditions have a predicted order (e.g., dose-response), Page's test is more powerful than Friedman's.
Durbin Test
For incomplete block designs where not every subject experiences every condition.
Related Calculations
- Repeated Measures ANOVA β Parametric alternative
- Kruskal-Wallis Test β Independent groups
- Wilcoxon Signed-Rank Test β Two related groups
- One-Way ANOVA β Independent groups, parametric
Summary
The Friedman test compares three or more related groups without assuming normality. Rank observations within each subject, sum ranks for each condition, and calculate the chi-square statistic. Significant results require post-hoc tests (Nemenyi or Conover) to identify which conditions differ. Report Kendall's W as the effect size. Use it for repeated measures with ordinal data or when normality is violated. The test is robust to outliers and works with any distribution shape.