Volume 9, Issue 4

Articles
Tricks of the Trade
In and Out
Trott's Corner
New Products
New Publications
Calendar
News Bulletins
New Resources
Classifieds

Download This Issue

Editorial Policy
Staff and Contributors
Submissions
Subscriptions
Advertising
Back Issues
Contact Information

Applications of Generating Functions in Nonparametric Tests

# The Wilcoxon Rank Sum Test

Suppose two independent samples and of sizes and are drawn from two continuous (not necessarily normal) populations. We wish to test the null hypothesis (these two populations are identically distributed) against the alternative hypothesis (these two populations are not identically distributed).

The Wilcoxon rank sum test (which is closely related to the Mann-Whitney U test) is one of the best known and easiest to use tests in this situation (see, for example, [2]). It rejects the null hypothesis if the sum of the ranks of the 's in the combined ordered arrangement of the two samples is either too large or too small. This statistic is called Wilcoxon rank sum, which we denote by .

## No Ties

Let us first assume that there are no ties, that is, all observations are different from each other. Calculating the generating function of the null distribution of the Wilcoxon rank sum, it is important to mention that for all

we have

Thus we get

Together with our procedures of the third section, we can use this generating function to calculate the probability density function; to calculate, tabulate, and plot the cumulated distribution function; and to calculate alpha-quantiles of the null distribution of the Wilcoxon rank sum. For example,

For large values of and , it is well known (see, for example, [2]) that the null distribution of the test statistic can be approximated by an appropriate normal distribution. We can now investigate the quality of this approximation in the case of relatively small values of and graphically (Figure 1).

Figure 1.

Furthermore, it is possible to generate accurate tables of alpha-quantiles of the null distribution of this test statistic.

## Ties

If ties occur, we assign to tied observations the same midrank, which is the average of the ranks of these observations. Suppose we have the seven observations 1.3, 1.7, 1.7, 1.7, 1.9, 1.9, and 2.2, then the midranks of these observations are 1, 3, 3, 3, 5.5, 5.5, and 7.

If observations have midrank and ... observations have midrank and if these midranks are ordered increasingly, we can calculate these midranks using the formula

Thus, we define

Calculating the generating function of the null distribution of the Wilcoxon rank sum (which is now the sum of the midranks of the 's in the combined ordered arrangement of the two samples), it is important to mention that for all

we have

Thus, we get

Again we can use this generating function to calculate the probability density function; to calculate, tabulate, and plot the cumulated distribution function; and to calculate alpha-quantiles of the null distribution of the Wilcoxon rank sum. For example,

In [2] it is shown that for large values of and the null distribution of the test statistics can be approximated by an appropriate normal distribution. Again we investigate the quality of this approximation in the case of relatively small values of and graphically (Figure 2).

Figure 2.

About Mathematica | Download Mathematica Player
© Wolfram Media, Inc. All rights reserved.