<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><br class=""><blockquote type="cite" class=""><div dir="ltr" class="">IIUC "exact" in this context means running all possible re-orderings / exchanges of the data to estimate the null, e.g. for a paired t-test with 10 observations, doing 2 ** 10 permutations / sign flips.<div class=""><br class=""></div><div class="">Eric</div></div></blockquote><div><br class=""></div><div>That is correct. For Mann-Whitney there is a recursive formula, so you do not need to enumerate all possibilities explicitly. </div><div>This method is used in commercial software, eg. Graphpad Prism (for samples < 100 elements):</div><div><a href="http://www.graphpad.com/guides/prism/6/statistics/index.htm?how_the_mann-whitney_test_works.htm" class="">http://www.graphpad.com/guides/prism/6/statistics/index.htm?how_the_mann-whitney_test_works.htm</a></div><div><br class=""></div><div>Jamie, I tried MC to estimate p for Mann-Whitney test, but it was slower than the exact method. It might have been poor code, though... </div><div>Thanks for the offer to take a look at a pull request, I will work on that. </div><div><br class=""></div><div>Szymon</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Mar 5, 2015 at 8:06 AM, Sturla Molden <span dir="ltr" class=""><<a href="mailto:sturla.molden@gmail.com" target="_blank" class="">sturla.molden@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Jamie Morton <<a href="mailto:jamietmorton@gmail.com" class="">jamietmorton@gmail.com</a>> wrote:<br class="">
<br class="">
> But perhaps having an exact p-value calculation for smaller sample sizes<br class="">
> would be preferable.<br class="">
<br class="">
</span>Monte Carlo randomization test is a good solution for rank-sum statistics.<br class="">
What does "exact" mean anyway?<br class="">
<br class="">
MC tests are exact for a given number of significant digits. You just have<br class="">
to run it until the p-value has converged for the required number of<br class="">
significant digits.<br class="">
<span class="HOEnZb"><font color="#888888" class=""><br class="">
Sturla<br class="">
</font></span></blockquote></div></div></blockquote></div><br class=""></body></html>