# Friedman Test

The Friedman test is a non-parametric alternative to ANOVA with repeated measures. No normality assumption is required. The test is similar to the Kruskal-Wallis Test. We will use the terminology from Kruskal-Wallis Test and Two Factor ANOVA without Replication.

Property 1: Define the test statistic

where k = the number of groups (treatments), m = the number of subjects, Rj is the sum of the ranks for the jth group. If the null hypothesis that the sum of the ranks of the groups are the same, then

when k ≥ 5 or m > 15. The null hypothesis is rejected when Q > $\chi^2_{crit}$.

Example 1: A winery wanted to find out whether people preferred red, white or rosé wines. They invited 12 people to taste one red, one white and one rose’ wine with the order of tasting chosen at random and a suitable interval between tastings. Each person was asked to evaluate each wine with the scores tabulated in the table on the left side of Figure 1.

Figure 1 – Friedman’s test for Example 1

Figure 1 – Friedman’s test for Example 1

The ranks of the scores for each person were then calculated and the Friedman statistic Q was calculated to be 1.79 using the above formula. Since p-value = CHITEST(1.79, 2) = 0.408 > .05 = α, we conclude there is no significant difference between the three types of wines.

Observation: Just as for the Kruskal Wallis test, an alternative expression for Q is given by

where $SS'_{Col}$ is the sum of squares between groups using the ranks instead of raw data.

For Example 1, we can obtain $SS'_{Col}$ from the ranked scores (i.e. range F3:I15) using Excel’s Anova: Two-Factor Without Replication data analysis tool (see Figure 2), and then use this value to calculate Q as described above.

Figure 2 –Alternative way of calculating Friedman’s statistic

Figure 2 –Alternative way of calculating Friedman’s statistic

Real Statistics Excel Function: The Real Statistics Resource Pack contains the following supplemental function:

FRIEDMAN(R1) = value of Q on the data (without headings) contained in range R1 (organized by columns).

FrTEST(R1) = p-value of the Friedman’s test on the data (without headings) contained in range R1 (organized by columns).

For Example 1, FRIEDMAN(B5:D14) = 1.79 and FrTEST(B5:D14) = .408.

### 6 Responses to Friedman Test

1. Roger Bakeman says:

This was very helpful. Even more helpful were your comments for the Wilcoxon signed ranks test because it gave me the information I needed to calculate the 95% confidence interval for T and to calculate the effect size r. Increasingly, journal editors are asking for these. Could you provide information on how to compute a stander error for H (as provided for T) and the effect size r for the Friedman test?

• Charles says:

Roger,
I don’t know of any commonly accepted values for the standard error or effect size for Friedman’s test, although Kendall’s W is often cited as an effect size for Friedman’s H. Here W = H/(m(k-1)) where k = the number of groups (treatments) and m = the number of subjects. Also used as an effect size is the r coefficient for Kendall’s W, which is r = (mW-1)/(m-1). In fact it can be shown that r is the average Spearman correlation coefficient computed on the ranks of all pairs of raters.
Charles

2. Jiahui says:

Dear Mr. Zaiontz,

I am writing to ask which data analysis method is appropriate for non-parametric 2 within-subject factors ANOVA.

My dependent variable is error rate (0-1), which does not apply normal distribution. I transformed the DV data, and conducted the repeated measures ANOVA. I am interested in the results based on non-parametric methods too. But I did not found a proper way yet.

Thanks!

Jiahui

• Charles says:

Jiahui,
Friedman’s test is a way of conducting a non-parametric repeated measures ANOVA.
Charles

• Jiahui says:

I know Fiedman’s test is the non-parametric alternative to the one-way ANOVA with repeated measures. Can I use Friedman’s test for two-within factors ANOVA? In case I am interested in the non-parametric two-way repeated ANOVA, which method I can use?

• Charles says:

I don’t know of any nonparametric method for two-way repeated ANOVA.
Charles