ranksum function - syntax, Statistics and Machine Learning toolbox
Show older comments
In one of the Matlab examples for the ranksum function it mentions that: “The weather data shows the daily high temperatures taken in the same month in two consecutive years. Perform a left-sided test to assess the increase in the median at the 1% significance level.” [p,h,stats] = ranksum(year1,year2,'alpha',0.01,'tail','left')”
I have tested and found that (as expected) the same result as before would be obtained as follows: [p,h,stats] = ranksum(year2,year1,'alpha',0.01,'tail','right')
Thus, is it correct that the syntax of the ranksum function is as follows: In the case where we perform a right tail test in order to test whether the population median of Year 2 is higher compared to Year 1 (with a selected significance level) do we put ‘year 2’ as the first input argument of the ranksum function and then ‘year 1’ as the second input argument and vice-versa?
Thank you very much, Iasonas
Accepted Answer
More Answers (0)
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!