I am new to Stats and came across this problem while running my analyses on SPSS which I cannot explain.

How is it that even after transforming my data by logging it, it still has the same p-value as the raw data set that was not transformed?

Sorry for sounding really ignorant here! Thank you in advance for your help.


The Mann-Whitney U test is a rank test. This means it results depend only of the ranks of your data. The Wikipedia Article describes it quite well, but basically it looks whether the ranks of one sample tend to be higher than in the other one.

Since the logarithm is a strictly monotone function it does not change the ranks of your data.

  • 4
    $\begingroup$ The only exception would be if some of your values are zero or negative. The logarithm is not defined for zero or for negative numbers. So in this crazy case, you'd lose some data in the transform, so would get different results. $\endgroup$ – Harvey Motulsky Mar 21 '13 at 18:33

The Mann-Whitney is a test based on the ranks (/relative orderings) of the data points -- the value of the test statistic only depends on the order (the ranks) of the observations, not on their individual values.

enter image description here

Taking logs (of positive values), or indeed, any other monotonic transformation of the values (like taking $-1/x$ with positive data values, or cubing a set of values) will not change the order (and hence the ranks assigned to observations), only their relative spacing, so the statistic won't be affected. (Even a monotonic decreasing transformation won't change the p-value of the two-tailed test.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.