matrix with different sizes for ranksum test

2 views (last 30 days)
Hello,
I have two matrix of A (9*15) and B (13*16) and would like to test if there are significantly different.
A=A(:)
B=B(:) and then use
[p, h, stats] = ranksum (A,B).
is this the right way?
Thanks

Accepted Answer

Walter Roberson
Walter Roberson on 21 Aug 2020
It is the correct approach under the assumption that the structure of A and B do not matter, that the properties of the array elements are independent of position.
That is a valid assumption at times, but in other cases it is not valid at all. For example if A represents student test scores in one class, then the median for each different test could be different and so which row (or column) a value is in could be important.
  2 Comments
Walter Roberson
Walter Roberson on 21 Aug 2020
The code you posted looks like it would be ok for that.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!