Solved – Can Kernel Density Estimation estimate an Exponential Distribution

density-estimationexponential distributionkernel-smoothing

Can Kernel Density Estimation estimate an Exponential Distribution?

I tried to performed to make experiments with various kernels like: "gaussian" and "exponential", but performance seems to be very poor.
https://scikit-learn.org/stable/modules/density.html

What is the reason?

Best Answer

The problem is the hard boundary; unless you specifically modify things to account for it you'll have problems.

If your data are truly close to a continuous exponential, you might get an adequate approximation by applying a typical KDE to the cube root (which results in something much closer to a Gaussian) and then transforming back -- as long as you remember to include the Jacobian when you take it back. This won't fully respect the boundary but the effect is usually very small; it will also smooth out the peak.

Using a log-transform instead has been suggested here on CV before (including by me); it sometimes works quite well but sometimes it's not very good at the low end, though it does respect that zero boundary.

With either transformation you will not get the sharp exponential "cut-off" at zero but a pretty smooth trend down toward zero.

There are a variety of methods for estimating densities that often work well with this situation -- logspline density estimation may be a good choice; I have had some good experiences with it in situations similar to this.

However if your histogram on your other question is anything to go by, it looks like your data are discrete, with spikes at round numbers; a KDE won't handle that well (especially not the discreteness at the smallest values); so if that's what you're working with I doubt this line of thought will get you to somewhere useful.

Related Question