Kernel density by hand
Topic: Hierarchical clustering and kernel density estimation · more questions on this topic
‹ Number of merges A kernel is a density ›
With observations -1,0,2 and a Gaussian kernel of bandwidth h=1, evaluate \widehat f(0) using the kernel estimator. Here H=h^2=1.
Worked answer (click to show)
With h=1, each observation contributes a standard normal density centred at that observation, and the estimate averages the three contributions:
\widehat f(0) =\frac13\bigl[\varphi(0-(-1))+\varphi(0-0)+\varphi(0-2)\bigr] =\frac13\bigl[\varphi(1)+\varphi(0)+\varphi(2)\bigr].
Using \varphi(1)=0.24197, \varphi(0)=0.39894, and \varphi(2)=0.05399,
\widehat f(0)=\frac{0.24197+0.39894+0.05399}{3}=\frac{0.69490}{3}=0.2316.