# Find the PDF from quantiles

I have been presented a problem of this kind: suppose I know the values of k quantiles for a continuous random variable $X$

$$X_{1\%} = x_1, X_{5\%} = x_2, \dots , X_{99\%} = x_{k}$$

so that

$$F_X(x_1)=1\%, F_X(x_2)=5\%, \dots, F_X(x_k)=99\%$$

From these informations I want to draw the chart of the PDF.

I thought that I could proceed this way:

• interpolate $F_X(x)$ to get a smooth CDF (for instance spline interpolation)
• find the derivative (numerical) of the smoothed CDF at some points to obtain the PDF.

Are there other more direct methods to address this problem? Do you think my solution is solid?

Thank you.

• If you can assume a parametric distribution, you can also fit the CDF function to the quantiles using black-box optimizer to find relevant parameters. – Tim May 24 '18 at 10:02
• Thanks for the comment ... In my particular case I don't want to assume any parametric distribution. But just in case how doese the optimization work for example if I have more conditions than parameters to be estimated? For instance if I have 3 quantiles and I want to use optimizer to find $\mu$ and $\sigma$ of a normal distribution. – Hard Core May 24 '18 at 10:15
• Say you have $q_p = x$, then you seek such parameters $\theta$ to minimize the difference between $F_\theta(x)$ and $p$ as measured by some loss, using a black-box optimizer. – Tim May 24 '18 at 10:30
• How many quantiles do you have? Are the true values known, or is there some kind of sampling or noise involved? – user20160 May 28 '18 at 8:57
• I have 7 quantiles, but regardless, I would like to have an opinion about the procedure I described. Does it make sense? because I tried cubic spline interpolation I it does not work well – Hard Core May 28 '18 at 9:23