[SciPy-user] help with scipy.stats.mannwhitneyu

josef.pktd@gmai... josef.pktd@gmai...
Thu Feb 5 12:16:22 CST 2009

On Thu, Feb 5, 2009 at 1:03 PM, Sturla Molden <sturla@molden.no> wrote:
> On 2/5/2009 6:46 PM, josef.pktd@gmail.com wrote:
>> so whether bigU or smallU is used in the calculation of z doesn't
>> matter, I have no idea why in this specific implementation both are
>> calculated if smallU would be enough.
> By the way, there is a fucntion scipy.stats.ranksums that does a
> Wilcoxon rank-sum test. It seems to be using a large-sample
> approximation, and has no correction for tied ranks.
> S.M.

Also, in the explanation for kruskal it says it's an extension of
Mann-Whitney-U to more than 2 groups

for 2 groups (no ties):

>>> stats.kruskal(rvs1,rvs2)[1] - stats.mannwhitneyu(rvs1,rvs2)[1]*2
>>> stats.kruskal(rvs1,rvs2)[1] - stats.ranksums(rvs1,rvs2)[1]
>>> stats.ranksums(rvs1,rvs2)[1] - stats.mannwhitneyu(rvs1,rvs2)[1]*2

It looks like there are some redundancies or small variations in these
tests. A systematic list of all tests would be pretty useful.


More information about the SciPy-user mailing list