MATLAB Answers

Matlab
0

Is Ranksum function for only median value?

Asked by Matlab
on 24 Jul 2017
Latest activity Commented on by Star Strider
on 24 Jul 2017
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

Sign in to comment.

Tags

No tags entered yet.

1 Answer

Answer by Star Strider
on 24 Jul 2017
 Accepted Answer

‘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

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);
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.

Sign in to comment.