[R] significance test interquartile ranges

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Jul 14 08:16:04 CEST 2012

On 13/07/2012 21:37, Greg Snow wrote:
> A permutation test may be appropriate:

Yes, it may, but precisely which one is unclear.  You are testing 
whether the two samples have an identical distribution, whereas I took 
the question to be a test of differences in dispersion, with differences 
in location allowed.

I do not think this can be solved without further assumptions.  E.g 
people often replace the two-sample t-test by the two-sample Wilcoxon 
test as a test of differences in location, not realizing that the latter 
is also sensitive to other aspects of the difference (e.g. both 
dispersion and shape).

I nearly suggested (yesterday) doing the permutation test on differences 
from medians in the two groups.  But really this is off-topic for R-help 
and needs interaction with a knowledgeable statistician to refine the 

> 1. compute the ratio of the 2 IQR values (or other comparison of interest)
> 2. combine the data from the 2 samples into 1 pool, then randomly
> split into 2 groups (matching sample sizes of original) and compute
> the ratio of the IQR values for the 2 new samples.
> 3. repeat #2 a bunch of times (like for a total of 999 random splits)
> and combine with the original value.
> 4. (optional, but strongly suggested) plot a histogram of all the
> ratios and place a reference line of the original ratio on the plot.
> 5. calculate the proportion of ratios that are as extreme or more
> extreme than the original, this is the (approximate) p-value.

I think it is an 'exact' (but random) p-value.

> On Fri, Jul 13, 2012 at 5:32 AM, Schaber, Jörg
> <joerg.schaber at med.ovgu.de> wrote:
>> Hi,
>> I have two non-normal distributions and use interquartile ranges as a dispersion measure.
>> Now I am looking for a test, which tests whether the interquartile ranges from the two distributions are significantly different.
>> Any idea?
>> Thanks,
>> joerg

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list