Wilkokson test

Distribution free rang criterion for testing hypothesis about treatment effect
absence. Suppose that we have N = m + n observations in two samles:
Samples
Let us denote:

where xi and yj — appreciable values, em+1,...,em+n — unappreciable
random values; Parameter Δ is of unterest to us, it is unknown shift
resulting from some kind of treatment.
All N random values e are mutually independent.
All e are derived from common population.

Method

Will test hypothesis H0: Δ=0.
Join our two samples and put their values in ascending order, i.e. form
pooled variation sequence. For every value in this set we put in correspondence
its rang (Rj — rang of j-th element in pooled array), which is equal to its
sequence number in variation sequence.
As a critical statistic in this creterion it is used:
Wilkokson stat
Suppose that we test our hypothesis facing hypothesis H1: Δ≠0.
Evaluate all possible variants of rang grouping wherein statistic W is lesser
or equal to obervated one (denote it K), after which we calculate amount of all
possible distributions of rangs obtained by two samples, which is equal to CmN.
We estimate temporary P-value as:
tempPvalue
If our temporary pvalue ≤ 0.5 we take as resulting P-value 2*(temporary P-value).
If temporary pvalue > 0.5, then we evaluate all possible variants of rang grouping
wherein statistic W is greater or equal to obervated one (denote it L), and take
P-value:
pvalue