FUNCTION REFERENCE
ranksum
Wilcoxon rank-sum test with tied midranks.
Wilcoxon rank-sum test with tied midranks.
Syntax
[p,h,stats] = ranksum(x,y[,'Alpha',a,'Tail',tail,'Method',method])Vector data only; NaNs are removed. Exact midrank permutation probabilities are the default when min(nx,ny)<10 and nx+ny<20. Otherwise a tie-corrected normal approximation with continuity correction is used. Method exact or approximate overrides the default; exact tables are limited to ten million states. stats.ranksum is the rank sum of x; approximate tests also return zval. Tail is both, left or right. Legacy positional alpha is accepted. h is logical.
Example
[p,h,s] = ranksum([1 2 2 3],[2 3 4 4 5])Differences from MATLAB: exact calculations use tied midrank permutations. Undefined p gives logical false h.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.