Unrealistically low p-values from ranksum

I am unable to replicate SPSS results for the Mann-Whitney U test in MATLAB (via ranksum). My dataset has a relatively large number of cases: n1 = 152, n2 = 76. The data are clutch sizes, thus integer values from 1-3.
For one of my datasets, the ranksum output is as follows:
>> [p,h,stats]=ranksum(x,y,'method','approximate')
p =
1.8996e-012
h =
1
stats =
zval: -7.0417
ranksum: 18282
And
>> [p,h,stats]=ranksum(x,y,'method','exact')
p =
0
h =
1
stats =
ranksum: 18282
Running the same data in SPSS returns:
Habitat N Mean Rank Sum of Ranks
Clutch Size 1.00 152 120.28 18282.00
2.00 76 102.95 7824.00
Mann-Whitney U 4898.000
Wilcoxon W 7824.000
Z -2.451
Asymp. Sig. (2-tailed) 0.14
Is anyone familiar with both programs, and can you comment on why the z-scores are so different? The p-values from SPSS seem much more realistic for my data.
I am happy to provide the actual data.

2 Comments

I have the exact same problem! The p value i got = 4.5104e-11.
Internet please help!
It's probably too late to help the original poster, but Akash can you post
  • your data
  • the exact command you ran in MATLAB, including all parameters
  • the result you got in MATLAB
  • the exact command you ran in SPSS
  • the result you got in SPSS
FYI, these sorts of questions are almost always resolved by figuring out the differing assumptions between the two statistical software packages. It's almost never "MATLAB is wrong" (or the other package being wrong).

Sign in to comment.

Answers (0)

Products

Asked:

on 14 Feb 2012

Commented:

on 28 Dec 2017

Community Treasure Hunt

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

Start Hunting!