Wilcoxon-Mann-Whitney Test

JavaScript
Given two samples, X1,...,Xm, and Y1,...,Yn, from continuous distributions F and G,
the Wilcoxon rank-sum statistic, Rm,n, for testing the equality of F and G is defined
as the sum of the ranks of the X's when all m+n observations are ranked
from smallest to largest. The related statistic, Um,n, of Mann and Whitney
is the number of pairs, (Xi,Yj), with Xi less than Yj.
These statistics are related by Rm,n = Um,n + m(m+1)/2.
      Enter sample sizes and cutoff point.

    Sample size m: 
    Sample size n: 
          u-value: 

P(Um,n <= u) :

The probabilities calculated here are for Um,n, under the null hypothesis, F=G.
The distribution of Um,n is symmetric on the interval from 0 to mn.
It has mean mn/2 and variance mn(m+n+1)/12.

If both m and n are less than or equal to 20, the probabilities are calculated exactly.
Otherwise, a normal approximation with continuity correction is used.
This approximation has maximum absolute error at most .001 when m,n > 20.