The Wilcoxon test statistic, W, is the sum of the ranks associated with the observations that exceed the hypothesized median. Minitab calculates the test statistic by using pairwise (Walsh) averages as described in Johnson and Mizoguchi1:
- The number of observations, N, is reduced by one for each observation that is equal to the hypothesized median. The sample size that results is n.
- Exclude observations that are equal to the hypothesized median. Calculate n(n + 1) / 2 pairwise Walsh averages (Yi + Yj) / 2 for i ≤ j of the observations.
For large sample sizes, the distribution of W is approximately normal. Specifically:
is approximately distributed as a normal distribution with a mean of 0 and a standard deviation of 1, N(0,1).
|n||the observed number of data points after the observations that are equal to the hypothesized median value are omitted|
|W||the Wilcoxon test statistic |
|w||the number of Walsh averages that exceed the hypothesized median, plus half of the number of Walsh averages that equal the hypothesized median.|
- D.B. Johnson and T. Mizoguchi (1978). "Selecting the Kth Element in X + Y and X1 + X2 + ... + Xm," SIAM Journal of Computing 7, pp.147-153.