The RS_TEST function tests the hypothesis that two sample populations X and Y have the same mean of distribution against the hypothesis that they differ. X and Y may be of different lengths. The result is a two-element vector containing the nearly-normal test statistic Z and the one-tailed probability of obtaining a value of Z or greater. This type of test is often referred to as the " Wilcoxon Rank-Sum Test" or the " Mann-Whitney U-Test."
The Mann-Whitney statistics for X and Y are defined as follows:
where Nx and Ny are the number of elements in X and Y , respectively, and Wx and Wy are the rank sums for X and Y , respectively. The test statistic Z, which closely follows a normal distribution for sample sizes exceeding 10 elements, is defined as follows:
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.