s-news
[Top] [All Lists]

Re: Quartiles

To: "Heeringa W.J." <heeringa@let.rug.nl>
Subject: Re: Quartiles
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Fri, 7 Dec 2001 16:32:19 +0000 (GMT)
Cc: <s-news@lists.biostat.wustl.edu>
In-reply-to: <01120717360202.30388@geri>
On Fri, 7 Dec 2001, Heeringa W.J. wrote:

> Dear S-PLUS users,
>
> Assume I have the following range:
> 1 2 3 4 5 6
>
> Next I calculated the 1st Quartile, the median and the 3rd Quartile in
> both, S-PLUS and SPSS:
>
> 1st Quartile : S-PLUS: 2.25 and SPSS: 1.75
> median       : S-PLUS:  3.5 and SPSS: 3.5
> 3rd Quartile: S-PLUS: 4.75 and SPSS: 5.25
>
> Or for this range:
> 1 2 3 4 5 6 7 8
>
> the results are:
>
> 1st Quartile : S-PLUS: 2.75 and SPSS: 2.25
> median       : S-PLUS:  4.5 and SPSS: 4.5
> 3rd Quartile: S-PLUS: 6.25 and SPSS: 6.75
>
> So S-PLUS and SPSS give different results. Which results are correct? And how
> can these results be explained?

Why don't you send a bug report to SPSS if they don't explain their
results?  If it's not in the on-line help it is a bug, but for S-PLUS it
*is* there.

There are several slightly different definitions of quantiles (and hence
quartiles), but ?quantile in S-PLUS tells you what it uses.

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


<Prev in Thread] Current Thread [Next in Thread>