When the null hypothesis is true any observed p has a uniform
distribution over the interval 0.0 to 1.0. You got exactly what should
be expected, with some random variation.
Regards
David Smith
David W. Smith, Ph.D., M.P.H.
Biostatistics Division
San Antonio Campus
University of Texas School of Public Health
[log in to unmask]
(210) 562-5512
-----Original Message-----
Date: Thu, 5 Feb 2009 16:29:39 +0200
From: bgbg bg <[log in to unmask]>
Subject: On Wilcoxon rank sum test
Hello.
The following matlab code generates two vectors of 1000 uniformally
random numbers and uses Wilcoxon ranksum test for assessing whether two
samples of observations come from the same distribution. The code
repeats this process for 100 times and calculates histogram of the
resulting p values.
My naive assumption was that this histogram will be distributed around a
number very close to 1. However, as you can see, it is almost
uniformally distributed over the entire range between 0 and 1.
Is there somethin I miss in understanding of rank sum test?
|