# PDF and CDF using Gauss-Legendre quadrature

Consider the unit interval $I$ with a continuous probability measure $\mu$, and consider a smooth random variable $f:I\to \mathbb{R}$. We can define its cumulative distribution function and probability density function in the regular way. There is a number of known way to obtain the latter two functions using histograms, kernel smoothing and so on. Both methods rely on the statistically motivated assumption that we randomly sample $f$.

Assume now that we have sampled $f$ on the Gauss-Legendre quadrature point $\lbrace \alpha_{i}^N \rbrace_{i=1}^N$, which are the roots of orthogonal polynomials w.r.t. $\mu$, $p_n (\alpha)$. We can now obtain an $N$-th order approximation of $f$ using $p_n$, $$f \approx \sum\limits_{n=0}^{N-1} p_n (\alpha) \hat{f}(n) \, .$$

My Question: Is there an elegant way of approximating the CDF and/or PDF of $f$ only with the spectral coefficients $\hat{f} (n)$ and the value at tha quadrature point $f(\alpha _j ^N )$?

Note that generally speaking, $f$ is not the same as its PDF.

• Nawaf, In section 2 they approximate $\phi$ with GL quadrature, but they don't construct its pdf or cdf, do they? – Amir Sagiv Aug 29 '16 at 16:23
• I would arg that what they do is precisely what you want, since they show how to approximate $\mu(\phi)$ with GL quadrature, not $\phi$ itself. Also their case is a bit more involved since they have to propagate the weights and quadrature points in their GL approximation under the dynamics of the SDE of McKean type. They propose a clever procedure to do this based on the Euler-Maruyama method. – Nawaf Bou-Rabee Aug 29 '16 at 17:52