Pool, rank, sum, and interpret

The Wilcoxon rank-sum test compares two independent groups through their relative order. Pool the observations, assign ranks without using group labels, and then sum the ranks for one group. The resulting statistic measures whether that group tends to have larger observations than the other under a specified null model.

Pooled ranks and ties

Sort all observations from smallest to largest and give them pooled ranks from 1 through the total sample size. When equal observations occupy several positions, give each their average, called a midrank.


This prevents arbitrary ordering among equal values from changing the statistic. The rank sum RAR_A adds the ranks held by group A; the raw measurements themselves are not added.

From rank sums to pair comparisons

For nAn_A observations in A, their smallest possible rank sum is 1+2+⋯+nA=nA(nA+1)/21+2+\cdots+n_A=n_A(n_A+1)/2. Subtract this baseline to obtain the Mann–Whitney statistic UA=RA−nA(nA+1)/2U_A=R_A-n_A(n_A+1)/2. It counts A–B pairs for which A is larger, with half credit for a tie, and ranges from zero to nAnBn_A n_B.


A larger value points toward larger A observations, but its significance depends on the null distribution, not on its magnitude alone.

Worked example

Suppose A contains 10 and 16, while B contains 11 and 13. The pooled order is 10, 11, 13, 16, so A holds ranks 1 and 4. Thus RA=1+4=5R_A=1+4=5 and UA=5−2(3)/2=2U_A=5-2(3)/2=2; directly, 16 exceeds both B observations while 10 exceeds neither. This example has no ties, but the same rank-sum formula works with midranks when ties occur.



Independent group A has values 2, 4 and group B has values 4, 7. What is the pooled rank sum R_A using midranks?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Group A has n_A = 3 observations and pooled rank sum R_A = 12. What is U_A?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

Independent group A has values 1, 3, 3 and group B has values 2, 3, 6. Assign pooled midranks, then give R_A and U_A.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors