Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Using Wilcoxon rank-sum (Mann-Whitney) test to compare an emipirical and a uniform distribution

From   Nick Cox <>
Subject   Re: st: Using Wilcoxon rank-sum (Mann-Whitney) test to compare an emipirical and a uniform distribution
Date   Fri, 8 Mar 2013 11:35:46 +0000

There is no objection to using rank-based tests on continuous data,
except that they throw away much of the information in the data.
Sometimes this is deliberate because people don't trust or for any
reason don't want to use the exact values; otherwise it is

It may have been me that mentioned this test as sounding closer to
what you want than K-S, given your original description of the
problem. I certainly recommended plotting the data as more informative
than either. With 15 observations you have scope to show all your data

It seems that you might be best off devising a customised test
statistic that measures departure from uniformity _in the sense that
is closest to your research problem_ and generating a confidence
interval for it by bootstrapping and/or exploring its sampling
distribution by simulating.


On Thu, Mar 7, 2013 at 8:11 PM, Tsankova, Teodora <> wrote:
> Some time ago I posted on statlist with a question regarding the use of a one-sided KS test and I was advised that for my purpose I can use the Wilcoxon-Mann-Whitney test (ranksum command in Stata).
> I basically have 15 observations that go from 0 to 1 and constitute my empirical distribution and I want to prove that those take higher values than a uniform distribution would suggest. I have three questions related to the test:
> 1) I generate myself 15 more observation which take values from 0 to 1 with a constant markup of 1/14 (I simulate a uniform distribution of 15 variables in the same interval). Has anyone else used this method for creating uniform distribution and do you see any problems with it?
> 2)  I use the ponder option to compute the p-value for the one sided test and I get the following output:
> Two-sample Wilcoxon rank-sum (Mann-Whitney) test
> ObservedOr~m |      obs    rank sum    expected
> -------------+---------------------------------
>     Observed |       15         236       232.5
>      Uniform |       15         229       232.5
> -------------+---------------------------------
>     combined |       30         465         465
> unadjusted variance      581.25
> adjustment for ties        0.00
>                      ----------
> adjusted variance        581.25
> Ho: ktaub_~m(Observ~m==Observed) = ktaub_~m(Observ~m==Uniform)
>              z =   0.145
>     Prob > |z| =   0.8846
> P{ktaub_~m(Observ~m==Observed) > ktaub_~m(Observ~m==Uniform)} = 0.516
> 999996
> (15 real changes made)
> (0 real changes made)
> (0 real changes made)
> I would interpret it in the following way: In 51.6% of the cases you would draw a random number from Observed that would be higher than a random draw from Uniform. Is this the correct interpretation?
> 3) My last question is related to the fact that Wilcoxon Mann-Whitney test is used to analyse ordinal data. My data has an ordinal meaning in the sense higher values represent more homogenous group lending villages in my case. However, the values the variable takes are not interval but continuous ones. Can I still use this test?

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index