Is Ranksum function for only median value?
1 view (last 30 days)
Show older comments
Hi In matlab "ranksum tests the null hypothesis that data in x and y are samples from continuous distributions with equal medians, against the alternative that they are not. The test assumes that the two samples are independent. x and y can have different lengths. This test is equivalent to a Mann-Whitney U-test.". Is this function only for median value?. If I have best value and I want to calculate p value for them , How can I calculate p value?
I mean with the Best value like this example : If I have A vector A=[10 20 30 40 50]; The elements in A represent the minimum or maximum number(best value) that get it after 5 runs of algorithm . In other words, I have algorithm that find the minimum value for 5 runs after first run the min. value calculated 10 , second run min.=20 and so on.So we have the array A represent the best value of 5 runs . Now if I repeat the same procedure with other algorithm , so I have A and B each of them have five best value can I use P= ranksum(A,B);
0 Comments
Accepted Answer
Star Strider
on 24 Jul 2017
‘Is this function only for median value?’
Yes. It tests for the equality of the medians of the two data vectors.
‘If I have best value and I want to calculate p value for them, How can I calculate p value?’
I have no idea what ‘best value’ is, so I cannot answer that.
2 Comments
Star Strider
on 24 Jul 2017
Comparing algorithm run times (or some other result of them) would seem to be appropriate to ranksum, so yes.
Specify 'method','exact' with such small data vectors, so you get an accurate p-value:
P = ranksum(A,B, 'method','exact');
You will get more reliable results with more runs for each.
More Answers (0)
See Also
Categories
Find more on Hypothesis Tests in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!