CHAPTER 08 · TOPIC 01
Wilcoxon Tests
Distinguish the sign test, rank-sum test for independent groups, and signed-rank test for one-sample or paired data.
On this page
- Sign Test: Converting Values to Signs
- Sign-Test p Value and Normal Approximation
- Rank-Sum Test: Ranking Two Independent Groups Together
- Mean, Variance, and Normal Approximation of the Rank Sum
- Deriving the Mean and Variance of the Rank Sum
- Signed-Rank Test: Using Direction and Ranks of Magnitude
- Mean, Variance, and Approximation of the Signed Rank Sum
- Choosing among the Three Methods
Wilcoxon rank tests do not assume a normal distribution of raw values, but use signs or ranks to examine differences in location. This page distinguishes between the sign test, the Wilcoxon rank-sum test for two independent groups (Mann–Whitney U), and the Wilcoxon signed-rank test for one sample/paired data.
| Method | Design | Information used |
| Sign test | One sample or paired data | Signs of the differences only |
| Rank-sum / Mann–Whitney | Two independent groups | Ranks of all observations |
| Signed-rank | One sample or paired data | Ranks of absolute differences and their signs |
Sign Test: Converting Values to Signs#
Let n be the effective sample size after excluding zero differences, and let C be the number of positive differences. Under H₀, positive and negative differences are equally likely, so C follows a binomial distribution.
Sign-Test p Value and Normal Approximation#
The exact two-sided p-value sums the binomial probabilities in both tails that are at least as extreme as the observed imbalance. For example, if n=10 and C=8, the following formula is used.
Rank-Sum Test: Ranking Two Independent Groups Together#
- Pool the N=n+m observations from both groups
- Rank them from smallest to largest; assign mean ranks to ties
- Sum the ranks in one group to obtain Wₛ
- Under permutations of the group labels, calculate the probability of rank sums at least as extreme as the observed value
Under H₀, the group labels are exchangeable. All C(N,n) assignments of n of the N ranks to the first group are equally likely; counting the assignments that yield rank sum w gives the exact null distribution.
Mean, Variance, and Normal Approximation of the Rank Sum#
Deriving the Mean and Variance of the Rank Sum#
Since each rank is selected C(N−1,n−1) times across all assignments, the expected value can be obtained from the selection ratio n/N and the sum of all ranks N(N+1)/2.
Signed-Rank Test: Using Direction and Ranks of Magnitude#
- Calculate each difference Dᵢ and remove zero differences
- Rank |Dᵢ| from smallest to largest; assign mean ranks to ties
- Attach each difference’s original sign to its rank
- Calculate the positive rank sum T⁺ and negative rank sum T⁻
- Obtain the p value from the exact sign distribution or an appropriately corrected normal approximation
Under H₀, the distribution of differences is symmetric around zero, and each absolute rank is equally likely to receive a positive or negative sign. The n signs therefore have 2ⁿ equally likely assignments.
Mean, Variance, and Approximation of the Signed Rank Sum#
Let the indicator Iᵣ equal 1 when rank r receives a positive sign and 0 otherwise. Then T⁺=ΣrIᵣ. Because E(Iᵣ)=1/2 and Var(Iᵣ)=1/4, linearity gives the expressions above.
Choosing among the Three Methods#
| Method | Sample relationship | Primary H₀ | Additional condition |
| Sign | One sample or paired | Positive and negative differences are equally likely | No symmetry assumption for the differences |
| Rank-sum | Two independent groups | The two group distributions are identical | Similar shapes for a median-shift interpretation |
| Signed-rank | One sample or paired | The distribution of differences is centered at zero | Symmetric distribution of differences |