Skip to content

Friedman Test

Compare three or more related conditions, such as the same subjects rated under three different treatments, using ranks computed separately within each subject rather than assuming a normal distribution.

Every block needs the same number of conditions (3 or more), with no missing values.

What this answers

This test answers "do these three or more related conditions differ, using only the within-subject ordering of results rather than assuming a normal distribution?" It is the matched-block equivalent of the Kruskal-Wallis test, the way a repeated-measures ANOVA is the matched-block equivalent of a one-way ANOVA.

How it is calculated

Within each block (each subject's own row), the conditions are ranked from 1 to k, with average ranks for ties. Those ranks are then summed across blocks separately for each condition, and the Q statistic compares how unevenly those rank sums are distributed across conditions against what would be expected if condition made no difference. Q is compared to a chi-square distribution with k minus 1 degrees of freedom. Kendall's W, a normalized version of Q running from 0 to 1, expresses the same result as an agreement-style effect size.

Worked example

For 3 subjects who each rank their three conditions in exactly the same order (even though their raw values differ substantially between subjects), every condition receives the same rank in every block, producing Q equal to 6 on 2 degrees of freedom and Kendall's W equal to exactly 1, the maximum possible value, reflecting perfect agreement across subjects on the condition ordering.

Assumption audit

Calculated from your data: the rank sum for each condition, the Q statistic and its p-value, and Kendall's W as a normalized agreement measure.
Evidence to review: how many ties occurred within blocks; heavy tying reduces this test's effective power and can make the chi-square approximation less precise.
You must verify: that your rows are genuinely matched blocks (the same subject, or a comparable matched unit, measured under every condition), not independent groups; independent groups belong with the Kruskal-Wallis Test instead.

What this result does not mean

A significant Friedman test means the conditions are not all ranked equivalently across subjects, not that every pair of conditions differs; identifying which specific conditions differ from each other requires a dedicated post-hoc procedure, not this omnibus test alone.

Limitations

This test requires complete blocks: every subject must have a value for every condition. A subject with even one missing condition cannot be included as-is, and dropping that subject entirely (rather than any form of imputation) is this calculator's only supported option.