# Friedman test

Friedman test is part of:

• ### System configuration

• Windows:
• Versions: 9x/Me/NT/2000/XP/Vista/Win 7/Win 8
• Excel: 97 and later
• Processor: 32 or 64 bits
• Hard disk: 150 Mb
• Mac OS X:
• OS: OS X
• Excel: X, 2004 and 2011
• Hard disk: 150Mb.

## Benefits

• Easy and user-friendly
• Data and results shared seamlessly
• Modular
• Didactic
• Affordable
• Accessible - Available in many languages
• Automatable and customizable

### Principles of the Friedman test

The Friedman test is a non-parametric alternative to the ANOVA with two factors where the assumption of normality is not acceptable. It is used to test if k paired samples (k>2) of size n, come from the same population or from populations having identical properties as regards the position parameter. As the context is often that of the ANOVA with two factors, we sometimes speak of the Friedman test with k treatments and n blocks.

Use the Friedman's test when you have k paired samples corresponding to k treatments concerning the same blocks, in order to illustrate a difference between the treatments.

### Friedman test definition

If Mi is the position parameter for sample i, the null H0 and alternative Ha hypotheses for the Friedman test are as follows:

• H0: M1 = M2 = … = Mk
• Ha: There is at least one pair (i, j) such that Mi ≠ Mj

Let n be the size of k paired samples. The Q statistic from the Friedman test is given by:

Q = 12/(nk(n+1)) Σi=1..k [Ri²-3n(k+1)]

where Ri is the sum of the ranks for sample i.

Where there are ties, the average ranks are used for the corresponding observations.

The p-value associated with a given value of Q can be approximated by a Chi² distribution with (k-1) degrees of freedom. This approximation is reliable when kn is greater than 30, the quality also depending on the number of ties. The p-values associated with Q have been tabulated for (k = 3, n = 15) and (k = 4, n = 8) (Lehmann 1975, Hollander and Wolfe 1999).

When the p-value is such that the H0 hypothesis has to be rejected, then at least one sample (or group) is different from another. To identify which samples are responsible for rejecting H0, multiple comparison procedures can be used.

### Multiple comparison for the Friedman test

For the Friedman test, one multiple comparison method is available, the Nemenyi method (1963). This method is similar to the one of Dunn, but takes into account the fact that the data are paired.