[R] standard error for quantile

Rolf Turner rolf.turner at xtra.co.nz
Mon Nov 12 23:59:45 CET 2012


My apologies for returning to this issue after such a considerable
length of time ... but I wanted to check the result in Cramer's book,
and only yesterday managed to get myself organised to go the
library and  check it out.

What bothers me is what happens when f(Q.p) = 0.  The formula
that you give --- which is exactly the same as that which appears
in Cramer, page 369, would appear to imply that the variance is
infinite when f(Q.p) = 0.  This doesn't feel right to me.

I did a wee experiment with f(x) = 15*x^2*(1-x^2)/4 for -1 <= x <= 1,
which makes f(Q.50) = f(0) = 0.

I simulated 1000 samples of size 1000 from this distribution, and
calculated the variance of the empirical quantiles for prob=0.5, 0.51,
and 0.75.

For prob =0.75 the variance of the empirical quantiles was 0.0002274762,
and the formula gave 0.0002266639  --- very nice agreement.

For prob = 0.51 the empirical variance was 0.03743684 and the formula
gave 0.01167684 --- which is pretty much out to luntch.

For prob = 0.50 the empirical variance was 0.04545603 and the formula
of course gives Inf.

Cramer does not (as far as I can see) mention anything about the necessity
for f(Q.p) to be non zero.  Note that f(Q.51) = 0.1462919 which is not all
*that* close to 0, but still the resulting answer from the formula is pretty
crummy.  With a sample size of 1000 I would have thought (naive young
thing that I am) that the asymptotics would have well and truly kicked in.

Any thoughts on this?  Is there anything that one can do in instances where
f(Q.p) = 0?  Just curious ......

     cheers,

         Rolf

P. S. The reference for Cramer's book is "Mathematical Methods of 
Statistics",
by Harald Cramer, Princeton University Press, 1961.

Note that Cramer should really have an acute accent on the "e" in all of
the above.

         R.

P^2. S.  The histograms of the prob = 0.5 and prob = 0.51 empirical 
quantiles
are *very* strongly bimodal.  Nothing like Gaussian.

         R.



On 31/10/12 06:41, (Ted Harding) wrote:


     <SNIP>
> The general asymptotic result for the pth quantile (0<p<1) X.p of a
> sample of size n is that it is asymptotically Normally distributed
> with mean the pth quantile Q.p of the parent distribution and
>
>    var(X.p) = p*(1-p)/(n*f(Q.p)^2)
>
> where f(x) is the probability density function of the parent distribution.
>
> This is not necessarily very helpful for small sample sizes (depending
> on the parent distribution).

     <SNIP>



More information about the R-help mailing list