RATS 11.1
RATS 11.1

Procedures /

MANNWHITNEY Procedure

Home Page

← Previous Next →

@MANNWHITNEY performs a Mann-Whitney(-Wilcoxon) non-parametric test for whether the observations from the vectors X and Y are drawn from the same distribution. The idea behind the test is that if the vectors are both independent draws from the same distribution then in a combined sample of the two, the X's and Y's should be relatively evenly dispersed. It uses only rankings, not values, and so is robust to non-normality. Note that the assumption is that the vectors represent a set of independent draws.


@MannWhitney  x  y


Parameters

x  y

VECTORS (not SERIES). They do not have to be the same length.

Options

[PRINT]/NOPRINT

Use NOPRINT to turn off display of output.

Variables Defined

%CDSTAT

Large-sample z-score  (REAL)

%SIGNIF

two-tailed significance of %CDSTAT as a N(0,1) (REAL)

Example

dec vect ss as

input(varying) ss

 343 235 191 266 200 250 403 432

input(varying) as

 700 317 399 643 631 586 571 549 748 558 557 666

@MannWhitney ss as

Sample Output

Mann-Whitney-Wilcoxon Test

Label          N  Avg Rank   Sum Ranks

SS              8    5.12500   41.00000

AS             12   14.08333  169.00000

 

Mann-Whitney U     132.00000

Wilcoxon W          41.00000

Z-Score             -5.86353

Signif Level         0.00000


 

The z-score is highly significant. The negative value means that the first VECTOR tends to have smaller values than the second.

References

Wilcoxon(1945), "Individual comparisons by ranking methods", Biometrics Bulletin, vol 1, pp 80–83.


 

Mann & Whitney(1947), "On a test of whether one of two random variables is stochastically larger than the other", Annals of Mathematical Statistics, vol 18, pp 50–60.


 


Copyright © 2026 Thomas A. Doan