3
$\begingroup$

I am given a random variable $X$ over $\mathbb R$ with an unknown distribution. I want to determine the smallest sample size $n$ needed to obtain a high confidence upper bound $\hat Q_{1-\alpha}$ for the $1-\alpha$ quantile of X. Specifically, I am interested in high percentiles, like the 95th or 99th percentile. For a given confidence level $1-\epsilon$, I want to ensure $\Pr(\Pr(X>\hat Q_{1-\alpha})<\alpha) \geq 1-\epsilon$, regardless of the distribution of $X$.

While this question seems quite general, I am unsure of how to address it with classical statistical methods. Intuitively, I would estimate the $1-\alpha$ quantile from my sample. With methods like bootstrapping, I could also get confidence intervals for that parameter. However, I am not sure how to exactly quantify the uncertainty of these methods based on the size $n$ of the underlying sample.

My question is two-fold.

First, are there statistical tools that can answer this question and estimate confidence of a parameter estimator based on the size of a sample? I seem to lack the statistical background to find relevant information. Sources or keywords to point me in the right direction are much appreciated as well.

Second, I am aware that this question can be solved with methods from PAC-Learning. However, despite the question being relatively general, I could not find examples of bounds like this being used either. I suspect that there are better tools to answer the question, or the question not being very interesting to begin with, as one can simply assume some distribution and then use parametric methods. If someone could give me some intuition if either of these two assumptions is true, it would be highly appreciated.

$\endgroup$
4
  • 2
    $\begingroup$ There are non-parametric c.i.s for quantiles based on the binomial distribution. Maybe your question can be tackled via their simplicity. $\endgroup$
    – Michael M
    Commented Aug 16 at 11:23
  • 1
    $\begingroup$ @MichaelM I believe you are right! So for a sample of size $n$, the number of points larger than the true quantile is distributed with Binom($n,1-\alpha$). I can now bound the probability of every element of my sample being smaller than the quantile with $(1-\alpha)^n < \epsilon$ and choose the smallest $n$ satisfying this inequality, if I am not mistaken. Maybe this is much easier than I thought. $\endgroup$ Commented Aug 16 at 12:49
  • 1
    $\begingroup$ I had something like this in mind. Generally, I like the confidence interval approach in sample size estimation ("what n gives me a sufficiently narrow c.i.?"), but can't remember having seen it for quantile estimation. $\endgroup$
    – Michael M
    Commented Aug 16 at 13:14
  • 1
    $\begingroup$ @MichaelM Thank you for the very helpful comments! I played around with a bit of simulated data and this indeed seems to solve the problem perfectly. I am interested of how to generalize this problem to the multivariate case (where quantiles are tricky) and will update the question with your hint and the more general case in mind later today. $\endgroup$ Commented Aug 16 at 15:12

1 Answer 1

2
$\begingroup$

As @Michael M pointed out in a comment, this problem is actually quite easy for a one-sided bound as described in my question.

We can get the required sample complexity to obtain a high confidence upper bound by considering first the true quantile $Q_{1-\alpha}$. Per definition, $\Pr(X \leq Q_{1-\alpha}) = 1-\alpha$.

We now consider an iid sample $S$ of size $|S| = n$. $$\Pr(\forall x \in S: x \leq Q_{1-\alpha}) = (1-\alpha)^n$$. If we choose $n$ such that this probability is smaller than our $\epsilon$, we can pick the maximum value in our sample as high-confidence upper bound for the quantile: \begin{align} (1-\alpha)^n < \epsilon\\ n > \frac{\log(\epsilon)}{\log(1-\alpha)} \end{align}

I played around with this bound for a few example distributions and it seems to be tight.

For the interested, How to obtain a confidence interval for a percentile? and Calculation of a nonparametric equal-tailed (central) tolerance interval for an unknown continuous distribution contain a lot more info and good sources about obtaining such tolerance intervals.

$\endgroup$
1
  • 1
    $\begingroup$ In the common case where $\epsilon = 0.05\approx \exp(-3)$ and approximating $\log(1-\alpha)\approx\alpha,$ you have rediscovered the Rule of Three. There's no need to vary the distributions unless you're interested in exploring the effects of ties; the Probability Integral Transform for absolutely continuous variables permits you to assume the distribution is uniform. $\endgroup$
    – whuber
    Commented Aug 19 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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