MATLAB Answers


Ranksum test U value

Asked by Sharah
on 4 Nov 2016
Latest activity Commented on by Star Strider
on 4 Nov 2016
I need to report the U value of the ranksum test in my paper, but I am not sure what command for me to use to get this value in MATLAB. Can somebody explain?


Sign in to comment.


1 Answer

Star Strider
Star Strider 님의 답변 4 Nov 2016
 채택된 답변

See the section under ‘More About’ on the Wilcoxon Rank Sum Test to find out how to calculate the U-statistic from the rank sum test W-statistic. The rank sum is available by asking for the third 'stats' output from the ranksum function.


The maximum U value should be the product of the two sample size, for 2 samples indepedent test. But MATLAB gave me a ranksum value of 150 in
[p h stats] = ranksum([a], [b])
where size(a) = 6 size(b) = 16. It doesn't make any sense
That is not the impression I get from reading the Wikipedia article on the Mann-Whitney U-Test. See the section on Calculations.
I only use the rank sum test (the ranksum function), not the Mann-Whitney U-test, so I have no experience with it.

Sign in to comment.