A non-parametric test used to evaluate the equality of the median of a single population to a standard value or the equality of the Medians of two related Populations. It is a non-parametric alternative to the one-sample or paired-samples t-test when the assumption of normality is in doubt. However, it does make the assumption that the underlying distribution (of the individual observations in the one-sample case, or the differences of paired values in the paired-samples case) is symmetric.
The table shows a dataset of 8 observations. Assuming the underlying distribution is symmetric, we will test the hypothesis that the median is equal to 12 against the alternative that it is smaller using the Wilcoxon Signed ranks test.
The single zero difference corresponding to the observed value of 12 is excluded from the sample, resulting in a sample size of 7. These 7 differences are ranked based on their absolute values in ascending order of magnitude. Thus, the smallest observation, 2, gets the rank 1. The next smallest observation, 3, gets the rank 2. The two observations with magnitude 4 get the average rank of 3 and 4, which is 3.5. The remaining observations are ranked accordingly.
The only positive difference in the set is 3, so the test statistic is the rank corresponding to this difference, 2. The table of probabilities for the test statistic gives a p-value of 0.023, which is significant at the 5% level. Thus, reject the null hypothesis and conclude that the median is actually smaller than 12.
Take the differences of the observed values from the standard/test value under study, excluding the zero differences. Rank the absolute differences in ascending order of magnitude. Assign averaged ranks to tied differences. Sum the ranks corresponding to the positive differences – this is the test statistic, T+.
For small samples the test p-value is obtained using the tabled values of the Wilcoxon Signed Rank statistic for different sample sizes. For large samples the test statistic is converted into a z-score and the standard normal distribution used to decide the test.