scipy.stats.friedmanchisquare#

scipy.stats.friedmanchisquare(*samples)[source]#

Compute the Friedman test for repeated samples.

The Friedman test tests the null hypothesis that repeated samples of the same individuals have the same distribution. It is often used to test for consistency among samples obtained in different ways. For example, if two sampling techniques are used on the same set of individuals, the Friedman test can be used to determine if the two sampling techniques are consistent.

Parameters:
sample1, sample2, sample3…array_like

Arrays of observations. All of the arrays must have the same number of elements. At least three samples must be given.

Returns:
statisticfloat

The test statistic, correcting for ties.

pvaluefloat

The associated p-value assuming that the test statistic has a chi squared distribution.

Notes

Due to the assumption that the test statistic has a chi squared distribution, the p-value is only reliable for n > 10 and more than 6 repeated samples.

References