- scipy.stats.mannwhitneyu(x, y, use_continuity=True, alternative='two-sided')¶
Computes the Mann-Whitney rank test on samples x and y.
x, y : array_like
Array of samples, should be one-dimensional.
use_continuity : bool, optional
Whether a continuity correction (1/2.) should be taken into account. Default is True.
alternative : ‘less’, ‘two-sided’, or ‘greater’
Whether to get the p-value for the one-sided hypothesis (‘less’ or ‘greater’), or for the two-sided hypothesis (‘two-sided’, is the default)
statistic : float
The Mann-Whitney statistics.
pvalue : float
One-sided p-value assuming a asymptotic normal distribution.
Use only when the number of observation in each sample is > 20 and you have 2 independent samples of ranks. Mann-Whitney U is significant if the u-obtained is LESS THAN or equal to the critical value of U.
This test corrects for ties and by default uses a continuity correction.