Uncertainty of PDF quantile estimated from empirical PDF I want to determine the quantile of a probability density function (PDF). I do not know the distribution, but I have a sample that was generated from it. 
I estimate the quantile of the distribution as the quantile of the sample. How can I give an uncertainty that tells me how much the quantile of the sample fluctuates around the quantile of the PDF?
 A: Here is a simple yet powerful approach that you might find of great interest:


*

*generate a lot of synthetic values from your distribution. You don't need to know the underlying distribution, you can use your sample (the empirical distribution) to simulate, using for example the smoothed bootstrap with variance correction, which is equivalent to simulating from a Kernel Density Estimator.

*once you have simulated many values, you can simply get the
corresponding empirical CDF, along with its inverse, which is nothing
else than the quantile function you're looking for. This is called a
Monte Carlo approach to evaluating a quantile
function.
The link here uses values generated via rejection sampling, but of
course it also works for values generated via smoothed bootstrap (or
any other method, like Metropolis-Hastings, etc.). As explained by
Xi'an in the first comment, you can get confidence bands around your
curve of the empirical CDF which you can convert into quantile
estimation error.


All these steps are implemented easily in R as shown in the links I provided.
