[SciPy-Dev] Exact p-values in Mann-Whitney U test

Jamie Morton jamietmorton at gmail.com
Thu Mar 5 10:17:35 EST 2015


Hi Szymon Łęski,

I was planning on making a MC permutation test for the Mann-Whitney U test
in the future.
I'm in the process of getting a permutation t-test
<https://github.com/scipy/scipy/pull/4440> and a permutation anova
<https://github.com/scipy/scipy/pull/4519> reviewed.

But perhaps having an exact p-value calculation for smaller sample sizes
would be preferable.
If you submit a pull request, I'd be willing to take a look at it.

Jamie

On Thu, Mar 5, 2015 at 7:45 AM, Szymon Łęski <s.leski at nencki.gov.pl> wrote:

> Hello,
>
> I wrote a Python implementation of exact p-values in Mann-Whitney U test.
> The current test (scipy.stats.mannwhitneyu) uses normal approximation, and
> is valid only for sample size > 20 (as stated in notes). The exact version
> is correct also for small samples.
>
> I believe this would be a useful thing to include in scipy.stats. However,
> the current version is still better for very large samples, so I think both
> versions should be kept. I wanted to ask for opinion on what would be the
> best way to include the new version.
> Separate function? Optional argument controlling which method is used?
> Heuristics based on sample sizes?
>
> I have put my script, and the paper I based the implementation on, in this
> Dropbox folder:
> https://www.dropbox.com/sh/0zxp9u8sliwijl5/AAARecyrwQ2z-8xU-LbKOpWna?dl=0
>
> Feedback appreciated!
>
> Best regards,
> Szymon Leski
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150305/9e371507/attachment.html>


More information about the SciPy-Dev mailing list