For a kernel for density estimation and smoothing bandwidth , the kernel density estimator is
We use the convention that a kernel of order ell has
The kernel for density estimation is integrable and can have negative values; requiring nonnegativity would prevent its second moment from vanishing. Some conventions additionally require a nonzero moment of order . The construction below covers that convention too.
The Legendre polynomial kernel construction uses the polynomial reproducing kernel at zero:
Every polynomial of degree at most has the expansion , since the displayed Legendre polynomials have those successive degrees and form an orthonormal basis of this polynomial space. Therefore
Taking proves all the required moment identities. Boundedness and compact support give every absolute moment and a finite L2 norm. If a nonzero moment of order is required, replace this kernel by
The lower moments are unchanged by orthogonality. If , then because otherwise would lie in the polynomial space of degree at most . Evaluating its full Legendre expansion at zero gives , so .
For instance, a simple kernel satisfying the moment conditions needed for three derivatives is
Its negative wings cancel its central contribution to the second moment.
Figure 1.
Signed kernel and cancellation of its second moment
. Details.
Here is the third-order pointwise kernel error bound. Write and , and use any square-integrable kernel with unit integral, first two moments zero and . A change of variables gives
By the Taylor theorem with Lagrange remainder,
The moment cancellations consequently give the uniform bias of a kernel density estimator bound
For the variance, independence and another change of variables give
The triangle inequality and Cauchy-Schwarz inequality now yield
Balancing against gives
The constant is independent of both and . The original PDF has exponent ; the converted TeX's is a transcription error.
To obtain the final parametric rate, we choose a flat-top kernel for density estimation. This kernel also satisfies all the preceding moment conditions, so a single kernel works for both constructions, with different bandwidth choices. With the Fourier transform convention , choose a real even function equal to one on and zero outside , and put
Such a cutoff is explicit: if for and zero otherwise, take . It is constant near zero, and its endpoint transitions are smooth. Repeated integration by parts shows that and all its derivatives decay faster than every power, so lies in the Schwartz space. The Fourier inversion and moment differentiation of the Fourier transform give
Thus this kernel can be used with for the preceding general bound.
For the sharper example choose the probability density function
To check this is a density and identify its Fourier transform, direct integration gives
The continuous value at zero is as displayed. This function is nonnegative and integrable, being bounded near zero and at infinity. Fourier inversion gives , and in particular . Differentiation of this compact frequency integral also shows that and are bounded. Since on the support of , the convolution theorem gives
Both sides are continuous, so the equality holds at every . There is therefore exactly zero bias of a kernel density estimator at bandwidth one, and the variance bound above gives
This is parametric-rate kernel estimation of a bandlimited density. A fixed bandwidth is appropriate because it reproduces this particular density exactly; a generic density would retain a nonzero smoothing bias.