# Advantage of kernel density estimation over parametric estimation

Is there any particular reason you will choose the kernel density estimation over the parametric estimation? I was learning to fit distribution to my data. This question came to me.

My data size is relavtively large with 7500 data points. Auto claims. My goal is to fit it to a distribution(nonparametric or parametric). And then use it to simulate auto claim data, and calculate VaR or TVaR.

I used log to transform the data to make it relatively normal. I fitted many distributions including normal, lognormal, gamma, t,etc...I used AIC and loglikehood to identify the best fitting. But none of all this fitting passed KS test(p value extremmly small, with e-10).

That's why I asked in what situation I should switch to KDE.

-
It seems to me that fitting large dataset to parametric distribution is pretty hard. Even I can see the fitting is very good on histogram and qqplot, I still get a very low p value from KS test. But does KDE really solve this problem?(I never try) –  MegaChunk Jul 25 '12 at 20:41
@MegaChunk AFAIK the p-value from KS test is not very informative, as the distribution is never perfectly normal and thus if you have enough number of data points the null hypothesis is almost always rejected. –  d_ijk_stra Jul 25 '12 at 21:53

The answering question is "why do you model your data as a sample from a distribution?" If you want to learn something about the phenomenon behind your data, like when improving a scientific theory or testing a scientific hypothesis, using a non-parametric kernel estimator does not tell you much more than the data istself. While a parameterised model can tell much more clearly (a) whether or not the data and the model agree and (b) what are the likely values of the parameters. Depending on your goals thus drives which approach you should prefer.

-

There could be. Kernel density estimation is a nonparametric approach. Parametric estimation requires a parametric family of distributions based on a few parameter be assumed. If you have a basis to believe the model is approxiamtely correct it is advantageous to do parametric inference. On the other hand it is possible that the data does not fit well to any member of the family. In that case it is better to use kernel density estimation because it will construct a density that reasonably fit the data. It does not require any assumption regarding parametric families.

This description may be slightly oversimplified for clarity. Let me give a specific example to make this concrete. Suppose the parametric family is the normal distribution which is defined by the two unknown parameters the mean and variance. Every distribution in the family is symmetric and bell shaped with the mean equal to the median and the mode. Now your sample does not appear to be symmetric and the sample mean is very different from the sample median. Then you have evidence to think that your assumption is wrong. So you either need to find a transformation that converts the data to fit to a nice parametric family (possibly the normal) or find an alternative parametric family. If these alternative parametric approaches do not seem to work the kernel density approach is an alternative that will work. There are a few issues (1) the kernel's shape, (2) the kernel bandwidth that determines the level of smoothness and (3) possibly a larger sample size than what you might need for a parametric family. Issue 1 has been shown in the literature to be practically unimportant. Issue 2 is important. Issue 3 depends on how large of a sample you can afford to collect. Even though these issues exist along with the implicit assumption that the distribution has a density, these assumptions may be easier to accept than the restrictive parametric assumptions.

-