# Assessing the quality of a density estimate without knowing the true density

Assume that for a univariate sample $X$ you have a density estimate by a model you developed (in my case it's a density forecasting model) and you want to assess the quality of your models estimate.

Using artificial data generated from a particular distribution, e.g. a mixture distribution, you can directly compare the models estimates to the pdf of the underlying distribution, given that both the estimate and the true pdf are evaluated at the same set of points. Using common error or divergence measures, we can get a measure for the quality of the estimate.

But how to proceed, if you are working with real data of which you don't know the underlying distribution and therefore can only work with the actual instances in the sample?

Consider the example below, for simplicity's sake I took some artificial data from a mixture of skew-normal distributions:
I've visualized a histogram of the sample (relative instead of absolute frequencies), a spline interpolation of the histogram, the true underlying density as well as two kernel density estimators, one with silverman's rule of thumb (label $\textrm{KDE}_{rot}$) and a handpicked bandwidth (30/N).
The top graphic shows the plots for a random subsample of the actual data and the bottom plot shows the full sample, since in my application I will need to work with varying sample sizes too.

It can be seen that while the underlying distribution is the same, of course the differ due to the different sample sizes. The problem with the KDEs is determining a fitting bandwidth.

Is using a smoothed histogram really the best option in this case? Are there alternatives that I missed?