  The effect of uncertainties and noise on a quantity of interest (model
output) is often better described by its probability density function (PDF)
than by its moments. Although density estimation is a common task, the adequacy
of approximation methods (surrogate models) for density estimation has not been
analyzed before in the uncertainty-quantification (UQ) literature. In this
paper, we first show that standard surrogate models (such as generalized
polynomial chaos), which are highly accurate for moment estimation, might
completely fail to approximate the PDF, even for one-dimensional noise. This is
because density estimation requires that the surrogate model accurately
approximates the gradient of the quantity of interest, and not just the
quantity of interest itself. Hence, we develop a novel spline-based algorithm
for density-estimation whose convergence rate in $L^q$ is polynomial in the
sampling resolution. This convergence rate is better than that of standard
statistical density-estimation methods (such as histograms and kernel density
estimators) at dimensions $1 \leq d\leq \frac{5}{2}m$, where $m$ is the spline
order. Furthermore, we obtain the convergence rate for density estimation with
any surrogate model that approximates the quantity of interest and its gradient
in $L^{\infty}$. Finally, we demonstrate our algorithm for problems in
nonlinear optics and fluid dynamics.
