# Interpolation for PDF from Cumulative Distribution

How to interpolate PDF(Probability Distribution Functions) from CDF (without root finding method) ?

Please tell the steps to do so.

Thanks.

$$PDF(x) = \frac{CDF(x+\delta x) - CDF(x-\delta x)}{2 \,\delta x} + O(\delta x^2)$$
• If you have the values of the CDF at $x=a$ and $x=b$, you will be able to most accurately calculate the value of the PDF at $x=(a+b)/2$. If you want the PDF at other locations, you will have to settle for lower accuracy or use other values of the CDF. If I were you, I'd look into how and why finite difference methods work prior to applying them. If you're willing to go out-of-field for the info, every book on numerical fluid dynamics has a very thorough treatment of finite difference methods, and how to construct them for a desired level of accuracy. – Tyler Olsen Oct 31 '15 at 15:15
• I haven't seen that formula before, and I suspect that it may have come from a slightly different finite difference method since 4th derivatives are not involved in the error term for this one. That being said, the machine epsilon is a measure of the precision used to store a number using a floating-point representation on a computer. For 64-bit floating-point numbers (default in matlab, octave, ...), you will get ~15-16 significant decimal digits (52 binary digits). Thus, the machine epsilon is $2^{-52}$. The wikipedia page has a more thorough explanation than can fit in a comment. – Tyler Olsen Nov 1 '15 at 19:36
• As a practical matter, your data will not have sufficient resolution to use the formula that you listed. You should use the 2 data points centered around the point of interest to compute your approximation of the derivative. Your formula will likely predict a $\delta x < 10^{-15}$. – Tyler Olsen Nov 1 '15 at 19:44