Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Let $\{s_1,\ldots,s_N\}$ be a collection of N samples. I have performed the kernel density estimation using the classical form: $$ \hat{f}(x) = \frac{1}{Nh}\sum_{i=1}^N K\left(\frac{x-s_i}{h}\right) $$ where $K\left(\frac{x-s_i}{h}\right)$ is computed as a Weibull kernel, with $k=1$ and $\lambda=1$.

My question is: which is the easiest way to compute the bandwidth $h$? I am using the sample standard deviation, but it seems to be too small, i.e., the computed PDF appears too noisy at the end.

Thanks.

share|improve this question
add comment

1 Answer 1

You could probably try to use the "rule-of-thumb" for density estimation based on the sample size and the standard deviation: $$1.06\sigma n^{-\frac{1}{5}}$$

There are several other methods, which do not depend on the chosen kernell. One popular is the cross-validation. You may check the chapter 5 in Wand and Jones "Kernel smoothing" and references therein.

share|improve this answer
1  
Does it work also for other distributions that are different from the Gaussian one? –  Eleanore Feb 15 '13 at 10:55
    
As far as I understand it does not require that the distribution is Gaussian. In that case we are not nonparametric anymore. The assumption is that we use an estimate of the second derivative of the Gaussian density in the bandwidth selection. In other words we can estimate any density (including non Gaussian). –  arkadiy Feb 15 '13 at 10:59
    
Have you checked if this "rule-of-thumb" works for you? –  arkadiy Feb 15 '13 at 11:01
    
Yes I did, and this is what I got: cl.ly/2s361r0C3T3o Thus, I cannot understand whether this "noise" on the curve is coming from the bandwidth estimation or not. I guess yes. –  Eleanore Feb 15 '13 at 11:08
1  
You might also check R and the package: cran.r-project.org/web/packages/np/index.html which has a lot of nonparameric functionality or the simple function density(x). Also your question would probalby fit more discussions on stats.stackexchange.com –  arkadiy Feb 15 '13 at 11:31
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.