Optimality of the Epanechnikov kernel (source code)

= Optimality of the Epanechnikov kernel

Fix the second moment $v>0$. Put $B=\sqrt{5v}$ and $E(u)=3(B^2-u^2)_+/(4B^3)$. For every nonnegative unit-integral <kernel for density estimation> $K$ with the same second moment and finite $R(K)$, the mass and second-moment constraints give $\int(B^2-u^2)(K-E)=0$. Outside $[-B,B]$, $E=0$ and $(B^2-u^2)K\leq0$, so $\int E(K-E)\geq0$. Expanding the square gives $R(K)-R(E)=\int(K-E)^2+2\int E(K-E)\geq0$, with equality only when $K=E$ almost everywhere. Since $R(K)^2\mu_2(K)$ is scale invariant, rescaled <Epanechnikov kernels> minimize the optimized <asymptotic mean integrated squared error> over all such second moments. This conclusion concerns nonnegative second-order kernels; signed higher-order kernels obey a different bias expansion.