Friedman test

Friedman's non parametric test is used to compare several paired samples. Run the Friedman test in Excel with the XLSTAT add-on statistical software.

What is the Friedman non parametric test

The Friedman test is a non-parametric alternative to the repeated measures ANOVA 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(k+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.

ternary diagramneural network diagram

analyze your data with xlstat

14-day free trial