<br><br><div class="gmail_quote">On Sun, Feb 5, 2012 at 1:19 PM,  <span dir="ltr"><<a href="mailto:josef.pktd@gmail.com">josef.pktd@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div><div class="h5">On Sun, Feb 5, 2012 at 5:17 AM, Ralf Gommers <span dir="ltr"><<a href="mailto:ralf.gommers@googlemail.com" target="_blank">ralf.gommers@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br><br>There's a bug report and a number of new tests for mannwhitneyu at <a href="http://projects.scipy.org/scipy/ticket/1593" target="_blank">http://projects.scipy.org/scipy/ticket/1593</a>. 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. <br>


<br>Any takers?<span><font color="#888888"><br></font></span></blockquote></div></div><div><br>From what I remember my impression is that this is only a "cosmetic" change, or better a change in what is returned.<br>

<br>>>> v, pval = stats.mannwhitneyu(x, y)<br>>>> len(x)*len(y) - v<br>498.0<br></div></div></blockquote><div><br>Ah, okay. I'm not sure if this is a desirable change then. Any idea why it was implemented like this?<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><div><br>>>> pval*2<br>9.188326533255e-05<br><br><br>docstring says:<br>
    The reported p-value is for a one-sided hypothesis, to get the two-sided<br>
    p-value multiply the returned p-value by 2.<br><br>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.<br>One argument in favor of adding two one-sided options is that we return the correct tail instead of the smaller tail.<br>
</div></div></blockquote><div><br>fisher_exact, kstest and ks_twosamp have less/greater/two-sided. I also think it makes sense to add them where possible.<br><br>Ralf </div></div>