scipy.stats.wilcoxon¶

scipy.stats.
wilcoxon
(x, y=None, zero_method='wilcox', correction=False)[source]¶ Calculate the Wilcoxon signedrank test.
The Wilcoxon signedrank test tests the null hypothesis that two related paired samples come from the same distribution. In particular, it tests whether the distribution of the differences x  y is symmetric about zero. It is a nonparametric version of the paired Ttest.
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.
 zero_method : string, {“pratt”, “wilcox”, “zsplit”}, optional
 “pratt”:
Pratt treatment: includes zerodifferences in the ranking process (more conservative)
 “wilcox”:
Wilcox treatment: discards all zerodifferences
 “zsplit”:
Zero rank split: just like Pratt, but splitting the zero rank between positive and negative ones
 correction : bool, optional
If True, apply continuity correction by adjusting the Wilcoxon rank statistic by 0.5 towards the mean value when computing the zstatistic. Default is False.
Returns:  statistic : float
The sum of the ranks of the differences above or below zero, whichever is smaller.
 pvalue : float
The twosided pvalue for the test.
Notes
Because the normal approximation is used for the calculations, the samples used should be large. A typical rule is to require that n > 20.
References
[1] http://en.wikipedia.org/wiki/Wilcoxon_signedrank_test