# Wilcoxon test

A non-parametric test of the homogeneity of two samples $X _ {1} \dots X _ {n}$ and $Y _ {1} \dots Y _ {m}$. The elements of the samples are assumed to be mutually independent, with continuous distribution functions $F( x)$ and $G( x)$, respectively. The hypothesis to be tested is $F( x)= G( x)$. Wilcoxon's test is based on the rank statistic
$$\tag{* } W = s ( r _ {1} ) + \dots + s ( r _ {m} ),$$
where $r _ {j}$ are the ranks of the random variables $Y _ {j}$ in the common series of order statistics of $X _ {i}$ and $Y _ {j}$, while the function $s( r)$, $r = 1 \dots n + m$, is defined by a given permutation
$$\left( \begin{array}{cccc} 1 & 2 & \cdots & m+n \\ s(1) & s(2) & \cdots & s(m+n) \end{array} \right)\ ,$$ where $s( 1) \dots s( n+ m)$ is one of the possible rearrangements of the numbers $1 \dots n + m$. The permutation is chosen so that the power of Wilcoxon's test for the given alternative is highest. The statistical distribution of $W$ depends only on the size of the samples and not on the chosen permutation (if the homogeneity hypothesis is true). If $n \rightarrow \infty$ and $m \rightarrow \infty$, the random variable $W$ has an asymptotically-normal distribution. This variant of the test was first proposed by F. Wilcoxon in 1945 for samples of equal sizes and was based on the special case $s( r) \equiv r$( cf. Rank sum test; Mann–Whitney test). See also van der Waerden test; Rank test.