"Mark R Marino" <[EMAIL PROTECTED]> wrote:

> Why do you think that the algorithms in these computer packages differ?
> Why aren't they universal?
> Any thoughts or comments?

Well, it is easy to define a quantile for a continuous variable,
say "x", for which there exists a smooth positive density function, 
say "f(x)": a quantile x_q is the unique value such that P(x <= x_q) = q,
i.e., q = integral(-infinity,x_q) f(x) dx, and x_q exists for all q in [0,1].

However, problems arise as soon as some part of the above assumption
is broken. In particular, if the density has point masses (i.e.,
integral(x,x) f(x) dx > 0 for some x) then there may be many x_q such
that P(x <= x_q) = q, or there may be no such x_q. 

A simple example of a density with point masses is the empirical density 
on a sample, i.e., the density that assigns mass 1/n to each datum.
Consider a sample with two elements, x0 and x1. If the density
is assumed to put mass 1/2 on x0 and 1/2 on x1, there is no x_{0.25}
such that P(x <= x_{0.25}) = 0.25, and any value x0 <= x_{0.5} < x1
has the property that P(x <= x_{0.5}) = 0.5. 

In order to get a unique x_q for all q in [0,1], it is essentially
necessary to work with some density other than the empirical density.
Which one you work with is pretty arbitrary; there aren't any 
fundamental constraints, so some combination of convenience and 
justification governs. That's why different software packages will
given different results.

You could deduce the density assumed in the quantile formula
used by some package: tabulate the pairs (x_q, q) for a large number
of q, make divided differences (q(i+1) - q(i))/(x_q(i+1) - x_q(i)),
and plot the result; that's an approximation to the assumed density.

For what it's worth,
Robert Dodier
--
A lofty boast, a shattered statue; Ozy, the desert's laughing at you.
 -- "Ozymandias" (abridged version)
.
.
=================================================================
Instructions for joining and leaving this list, remarks about the
problem of INAPPROPRIATE MESSAGES, and archives are available at:
.                  http://jse.stat.ncsu.edu/                    .
=================================================================

Reply via email to