scipy.stats.wilcoxon(x, y=None)

Calculate the Wilcoxon signed-rank test.

The Wilcoxon signed-rank test tests the null hypothesis that two related samples come from the same distribution. It is a a non-parametric version of the paired T-test.

Parameters :

x : array_like

The first set of measurements.

y : array_like, optional

The second set of measurements. If y is not given, then the x array is considered to be the differences between the two sets of measurements.

Returns :

z-statistic : float

The test statistic under the large-sample approximation that the signed-rank statistic is normally distributed.

p-value : float

The two-sided p-value for the test.


Because the normal approximation is used for the calculations, the samples used should be large. A typical rule is to require that n > 20.



Previous topic


Next topic


This Page