This file executes the non parametric Mann-Whitney-Wilcoxon test to evaluate the difference between unpaired samples. If the number of combinations is less than 20000, the algorithm calculate the exact ranks distribution; else it uses a normal distribution approximation. The result is not different from
RANKSUM MatLab function, but there are more output informations. There is an alternative formulation of this test that yields a statistic commonly denoted by U. Also the U statistic is computed.
Syntax: STATS=MWWTEST(X1,X2)
Inputs:
X1 and X2 - data vectors.
Outputs:
- T and U values and p-value when exact ranks distribution is used.
- T and U values, mean, standard deviation, Z value, and p-value when normal distribution is used.
If STATS nargout was specified the results will be stored in the STATS struct.
Example:
X1=[181 183 170 173 174 179 172 175 178 176 158 179 180 172 177];
X2=[168 165 163 175 176 166 163 174 175 173 179 180 176 167 176];
Calling on Matlab the function: mwwtest(X1,X2)
Answer is:
MANN-WHITNEY-WILCOXON TEST
---------------------------------------------------------------------------
Group 1 Group 2
numerosity 15 15
Sum of Ranks (W) 270.0 195.0
Mean rank 18.0 13.0
Test variable (U) 75.0 150.0
---------------------------------------------------------------------------
Sample size is large enough to use the normal distribution approximation
Mean 112.5
Standard deviation corrected for ties 24.0474
Z corrected for continuity 1.5386 1.5386
p-value (1-tailed) 0.06195
p-value (2-tailed) 0.12389
--------------------------------------------------------------------------- |