Is Ranksum function for only median value?

조회 수: 1 (최근 30일)
Matlab
Matlab 2017년 7월 24일
댓글: Star Strider 2017년 7월 24일
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);

채택된 답변

Star Strider
Star Strider 2017년 7월 24일
‘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
Matlab
Matlab 2017년 7월 24일
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);
Star Strider
Star Strider 2017년 7월 24일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Hypothesis Tests에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by