[SciPy-Dev] anyone want to fix Mann-Whitney test?

josef.pktd@gmai... josef.pktd@gmai...
Sun Feb 5 06:19:44 CST 2012

On Sun, Feb 5, 2012 at 5:17 AM, Ralf Gommers <ralf.gommers@googlemail.com>wrote:

> Hi,
> There's a bug report and a number of new tests for mannwhitneyu at
> http://projects.scipy.org/scipy/ticket/1593. These plus a fix were
> contributed by Sebastian Pölsterl, unfortunately he based his initial fix
> on GPL'ed R code. Therefore I think we can't use that, even after he
> modified it. I looked at the GPL code too; I think we need someone who
> didn't do that to implement a new fix based only on the tests and bug
> report.
> Any takers?

>From what I remember my impression is that this is only a "cosmetic"
change, or better a change in what is returned.

>>> v, pval = stats.mannwhitneyu(x, y)
>>> len(x)*len(y) - v

>>> pval*2

docstring says:
    The reported p-value is for a one-sided hypothesis, to get the two-sided
    p-value multiply the returned p-value by 2.

currently I think none of the tests that uses normal or t distribution has
one versus two sided option, but I think they could be added everywhere.
One argument in favor of adding two one-sided options is that we return the
correct tail instead of the smaller tail.

I haven't looked at the pull request.


> Ralf
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20120205/5b32d388/attachment.html 

More information about the SciPy-Dev mailing list