2
$\begingroup$

Currently I have data (true population size is unknown). There are n data points in descending order, and we know the values of 25% and 50% percentile, say x1 and x2. How can I estimate if the sample size is sufficient such that x1, x2 are within 5% of margin of errors of x1 and x2?

For example, suppose n=1000 and data={4500, 621, 500,....0.001}, and the 250-th, 500-th observations are x1=200 and x2=50. How can I know if n=1000 is big enough such that even if increasing n, x1=200 +/- 10 and x2=50 +/- 2.5?

$\endgroup$
1
  • $\begingroup$ @Glen_b Thanks. I re-edit the question and wish now it is more clear. $\endgroup$ – Hsiang Hung May 24 '17 at 16:37
2
$\begingroup$

It is possible to put a confidence interval around an entire empirical CDF using the Dvoretzky-Kiefer-Wolfowitz inequality.

For a sample of size $n$ the empirical CDF will be within $\varepsilon$ of the true CDF with a confidence level of $1- \alpha, $ where

$$\varepsilon =\sqrt{\left( \frac{1}{2n} \right) \ln \left( \frac{2}{\alpha} \right)} $$

For $n=1000$ and a confidence level of 95% ( $\alpha = 0.05$), $\varepsilon \approx 0.0429$

Using this you can draw the confidence bounds on your empirical CDF and put confidence intervals on your estimated percentiles.

$\endgroup$
2
  • $\begingroup$ This is a good answer, and very helpful. However, I see a potential problem. If we are plotting $\hat F$, these bounds are "vertical". The confidence bounds on the quantiles however would go "horizontally". But the DKW inequality doesn't depend on $x$, hence for percentiles close to 1 (say $p=.99$) we can never get an upper bound on the quantile using this approach. Am I making any sense? Do you have any ideas on how to handle this? $\endgroup$ – knrumsey May 26 '17 at 19:21
  • $\begingroup$ There are at least two other approaches. There is a binomial-based distribution-free interval. It uses order statistics. Or you could use a resampling approach. Both of these should avoid the bounding problem you mention for extreme percentile estimation. $\endgroup$ – soakley May 26 '17 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.