Let's say I have a vector $x$ on $n=250,$

(in R)

x = rnorm(250)

The quantile of $\alpha=0.01$ is :


Now is that theoretically right to estimate the bootstrap quantiles of the quantile function at any confidence level ? For example I am using the BCa method described by Efron in his book:

# setting the function to estimate 
theta1 = function(x){  
 ql = quantile(x,0.01)
# bootstrap the data with BCa method 
bca = bootstrap::bcanon(x,5000,theta1,alpha=c(0.01,(1-0.01)))
# extract the two quantiles of the function

Resulting to :

     alpha bca point
[1,]  0.01 -3.086066
[2,]  0.99 -2.192914

Now, what I have took, I think, is the upper(0.99) and lower(0.01) bootstrap quantiles of the quantile function at level $alpha=0.01$.

Question 1) Am I right in the last phrase? Do I interpret correctly the output? Question 2) Am I theoretically allowed to do so ?

  • $\begingroup$ With a sample of only $250$ values, there's a good chance (about $1/6$) that either all values will be less than the $0.99$ quantile or all will exceed the $0.01$ quantile. Bootstrapping with such a sample is hopeless because none of the quantiles of any bootstrap sample will reach the intended quantile. Use a different method of quantile estimation, preferably a parametric one. $\endgroup$
    – whuber
    Mar 23 at 13:37

2 Answers 2


The endpoints of a confidence interval are quantiles of the sampling distribution of the statistic.

So yes theoritically these are the 0.01- and 0.99-quantiles of the sampling distribution of the 0.01-quantile of a standard normal distribution. But isn't this a mouthful? Why not say this is a 98% two-sided confidence interval for the 0.01-quantile of the standard normal?

  • $\begingroup$ Although often confidence intervals can be computed using an analysis derived from quantiles of sampling distributions, that's not what confidence intervals are; and some CIs cannot be computed in this way at all. After all, you don't know the underlying data distribution, so you don't know the sampling distribution of the statistic. As far as terminology goes, confidence intervals for quantiles are usually known as tolerance limits. $\endgroup$
    – whuber
    Mar 23 at 14:23
  • 1
    $\begingroup$ @whuber Does it hold for the BCa bootstrap confidence intervals that their endpoints are quantiles of the sampling distribution, even if it's not always true? $\endgroup$
    – dipetkov
    Mar 23 at 14:43
  • $\begingroup$ Googled "tolerance limits" and it's one of those unhappy instances when the a term means one thing in statistics and another thing to the rest of the world: it's used in ecology to indicate environmental extremes beyond which an organism won't survive. $\endgroup$
    – dipetkov
    Mar 23 at 14:52
  • $\begingroup$ My purpose is to estimate “better” the value at risk of a time series.I thought that I if I can bootstrap the data non parametrically then I can find two limits of each side of the empirical distribution.Backtesting the BCa method believe it not works superb. $\endgroup$
    – user326765
    Mar 23 at 15:18
  • 2
    $\begingroup$ Consider posting another question that describes your actual problem. One obvious complexity that's missing from the current question is that you are working with time series. Observations in a time series are not independent as in rnorm(250). $\endgroup$
    – dipetkov
    Mar 23 at 15:29

The following is not bootstrap stuff. Suppose that $X_1,\dots,X_n$ is a random sample from some distribution with density $f$, and denote the ordered sample values by $X_{(1)}<X_{(2)}<\dots<X_{(n)}$. Let the $\alpha$-th sample quantile $X_{(\lceil n\alpha\rceil)}$ be your estimate $\hat{q}_\alpha$ for the true quantile $q_\alpha$ satistying $\int_{-\infty}^{q_\alpha} f(t)\,dt=\alpha$. In this setting, we have a Central Limit Theorem $$ \sqrt{n}(\hat{q}_\alpha-q_{\alpha}) \xrightarrow[n\to\infty]{\mathscr{D}} \text{N}\left(0, \frac{\alpha(1-\alpha)}{(f(q_\alpha))^2}\right). $$ Hence, we can construct an approximate level $\gamma$ confidence interval for $q_\alpha$ as $$ \hat{q}_\alpha\pm z_{(1+\gamma)/2}\times\frac{1}{\hat{f}\!(\hat{q}_\alpha)}\times\sqrt{\frac{\alpha(1-\alpha)}{n}}, $$ in which $\hat{f}$ is a kernel density estimate of $f$.

alpha <- 0.01


[1] -2.326348


n <- 250

x <- rnorm(n)

q_alpha_hat <- quantile(x, prob = alpha)

f_hat <- KernSmooth::bkde(x)

se_hat <- (1 / approx(f_hat$x, f_hat$y, q_alpha_hat)$y) * sqrt(alpha*(1 - alpha)/n)

gamma <- 0.95

z <- qnorm((1 + gamma)/2)

q_alpha_hat + z * c(-se_hat, se_hat)

[1] -2.945964 -1.909236

Try playing with this R code increasing and decreasing the sample size $n$ and changing the desired $\alpha$ to get some intuition.

  • $\begingroup$ It is as I am concerned a non parametric kernel density estimation of the wanted quantile.Correct? $\endgroup$
    – user326765
    Mar 23 at 18:58
  • $\begingroup$ No. The KDE is a nonparametric estimator of the underlying density. $\endgroup$
    – Zen
    Mar 23 at 19:32
  • $\begingroup$ Yes but here you interpolate the x y coordinates of the kernel density non parametric estimation.Am I right?How can you call this method? $\endgroup$
    – user326765
    Mar 23 at 19:37
  • $\begingroup$ In that chunk of the code, we are computing the value of the KDE at the quantile estimate. There is no special name for this. Reading your comments in the other answers I think should invest your time in learning the basics of Statistics, like making a clear separation between parameters and their estimators, estimates, meaning of confidence intervals etc. DeGroot and Schervish is a good reference. $\endgroup$
    – Zen
    Mar 23 at 20:05
  • $\begingroup$ Thank you very much for your answer $\endgroup$
    – user326765
    Mar 23 at 20:26

Your Answer

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