# Does subtracting/or not, the mean-rank in Wilcoxon-Mann-Whitney make any difference?

**URL:** <https://discourse.datamethods.org/t/does-subtracting-or-not-the-mean-rank-in-wilcoxon-mann-whitney-make-any-difference/7425>\
**Category:** data analysis\
**Tags:** nonparametric, interpretation\
**Created:** [January 30, 2024, 3:21pm UTC](https://discourse.datamethods.org/t/does-subtracting-or-not-the-mean-rank-in-wilcoxon-mann-whitney-make-any-difference/7425 "2024-01-30T15:21:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aflip](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/aflip/32/2961_2.png) [@aflip](https://discourse.datamethods.org/u/aflip)\
**Post date:** [January 30, 2024, 3:21pm UTC](https://discourse.datamethods.org/t/does-subtracting-or-not-the-mean-rank-in-wilcoxon-mann-whitney-make-any-difference/7425/1 "2024-01-30T15:21:48Z")

</div>

I am reading Discovering Statistics using R by Andy Field. In the section about how to calculate the rank statistic in MW, one of the steps is to subtract the mean rank from the sum of ranks.

W = sum of ranks − mean rank

The idea being, that it corrects for the number of people in the group.

But what we are subtracting is not the true mean of the summed ranks, but the minumum mean (there are ten observations, and the sum is [1+2+…+10], whereas the actual ranks are 1,2,3.5,…12, because of ties.

what does this procedure do in this context? I am not a very math-literate, so an intuitive understanding of what is going on would be helpful

As far as I can see, even if this is not done, the conclusion we draw from test would remain the same.

I asked this question on stats.stackexchange and the answer I was given there was it doesn’t matter. Is this correct? context: [Subtracting the ideal-rank-mean in Wilcoxon rank-sum, what does it do - Cross Validated](https://stats.stackexchange.com/questions/637961/subtracting-the-ideal-rank-mean-in-wilcoxon-rank-sum-what-does-it-do)

Thank you

---

<div class="post-metadata">

**Author:** ![f2harrell](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/f2harrell/32/165_2.png) [@f2harrell](https://discourse.datamethods.org/u/f2harrell)\
**Post date:** [January 31, 2024, 2:35pm UTC](https://discourse.datamethods.org/t/does-subtracting-or-not-the-mean-rank-in-wilcoxon-mann-whitney-make-any-difference/7425/2 "2024-01-31T14:35:19Z")

</div>

The introduction section of [Statistical Thinking - Equivalence of Wilcoxon Statistic and Proportional Odds Model](https://www.fharrell.com/post/powilcoxon/) may help.

---

<div class="post-metadata">

**Author:** ![aflip](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/aflip/32/2961_2.png) [@aflip](https://discourse.datamethods.org/u/aflip)\
**Post date:** [February 1, 2024, 1:15pm UTC](https://discourse.datamethods.org/t/does-subtracting-or-not-the-mean-rank-in-wilcoxon-mann-whitney-make-any-difference/7425/3 "2024-02-01T13:15:00Z")

</div>

Thank you! I read the introduction and [this post on PO](https://www.fharrell.com/post/po/) and now my understanding is that the mean-rank of B from A removes the advantage the larger N that B has for a random value to be larger. And it’s a way to standardize the reporting.

---

<div class="post-metadata">

**Author:** ![f2harrell](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/f2harrell/32/165_2.png) [@f2harrell](https://discourse.datamethods.org/u/f2harrell)\
**Post date:** [February 1, 2024, 1:28pm UTC](https://discourse.datamethods.org/t/does-subtracting-or-not-the-mean-rank-in-wilcoxon-mann-whitney-make-any-difference/7425/4 "2024-02-01T13:28:34Z")

</div>

Yes and converting to a _probability index_ (0-1 concordance probability) is better for reporting.

---

<div class="post-metadata">

**Author:** ![aflip](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/aflip/32/2961_2.png) [@aflip](https://discourse.datamethods.org/u/aflip)\
**Post date:** [February 1, 2024, 2:21pm UTC](https://discourse.datamethods.org/t/does-subtracting-or-not-the-mean-rank-in-wilcoxon-mann-whitney-make-any-difference/7425/5 "2024-02-01T14:21:44Z")

</div>

I think what makes the literature confusing to me is that in scipy, the U that is reported is the U of the first array, and that is calculated by U1 = R1 - n1\*(n1+1)/2

The step that you mention in your PO article is not done.

 ![image](https://discourse.datamethods.org/uploads/default/original/2X/2/29f84fd738c2dc407a09ee9498bbd0ad84cefbc2.png)

In the textbook, it says that the convention is to report whichever U is smaller.

compared with scipy:

> [`mannwhitneyu`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.mannwhitneyu.html#scipy.stats.mannwhitneyu) always reports the statistic associated with the first sample
