No CrossRef data available.
Published online by Cambridge University Press: 23 September 2005
The exact mean integrated squared error (MISE) of the nonparametric kernel density estimator is derived for the asymptotically optimal smooth polynomial kernels of Müller (1984, Annals of Statistics 12, 766–774) and the trapezoid kernel of Politis and Romano (1999, Journal of Multivariate Analysis 68, 1–25) and is used to contrast their finite-sample efficiency with the higher order Gaussian kernels of Wand and Schucany (1990 Canadian Journal of Statistics 18, 197–204). We find that these three kernels have similar finite-sample efficiency. Of greater importance is the choice of kernel order, as we find that kernel order can have a major impact on finite-sample MISE, even in small samples, but the optimal kernel order depends on the unknown density function. We propose selecting the kernel order by the criterion of minimax regret, where the regret (the loss relative to the infeasible optimum) is maximized over the class of two-component mixture-normal density functions. This minimax regret rule produces a kernel that is a function of sample size only and uniformly bounds the regret below 12% over this density class.
The paper also provides new analytic results for the smooth polynomial kernels, including their characteristic function.This research was supported in part by the National Science Foundation. I thank Oliver Linton and a referee for helpful comments and suggestions that improved the paper.
This paper is concerned with the choice of kernel for univariate nonparametric density estimation. A variety of kernel functions have been proposed. Some references include Parzen (1962), Epanechnikov (1969), Müller (1984), Silverman (1986), Wand and Schucany (1990), Scott (1992), Politis and Romano (1999), and Abadir and Lawford (2004).
A common measure to evaluate the efficiency of a density estimator is mean integrated squared error (MISE). As asymptotic MISE (AMISE) is easier to calculate than exact MISE, it has been common to analyze AMISE and adopt kernel functions that minimize AMISE. Marron and Wand (1992) refocused attention on the exact finite-sample MISE in their study of the higher order Gaussian kernels of Wand and Schucany (1990), showing that AMISE can be quite misleading in many cases of interest.
We extend this literature by developing new expressions for the exact MISE of several important kernel density estimators, including the asymptotically optimal smooth symmetric polynomial kernels of Müller (1984), the infinite-order Dirichlet kernel, and the trapezoid kernel of Politis and Romano (1999). We compute the MISE when the sampling densities are normal mixtures as in Marron and Wand (1992).
As an important by-product, we obtain convenient expressions for the characteristic functions of the smooth polynomial kernels, a class that includes the Epanechnikov, the biweight, and most higher order polynomial kernels used in empirical practice. Kernel characteristic functions are useful for many purposes, including computationally efficient density estimation as discussed in Silverman (1986).
Our calculations show that the choice between the higher order Gaussian kernels and the smooth polynomial kernels has only a small impact on MISE, whereas the choice of kernel order has a large impact on MISE. Efficiency gains (and losses) from higher order kernels can be quite substantial even in small samples. The practical problem is that the ideal kernel order depends on the unknown density.
To provide a practical solution to the problem of kernel order selection, we suggest the decision theoretic criterion of minimax regret. This criterion picks the kernel order to minimize the maximal percentage deviation between the actual MISE and the infeasible optimal MISE over a set of candidate density functions. The minimax regret kernel order is a function only of sample size and thus can be implemented in practice. We calculate the minimax regret rule by maximizing the regret over all two-component mixture-normal densities. We find that the minimax regret kernel order is increasing in sample size, and this rule uniformly bounds the regret below 12%.
We should mention two caveats at the outset. First, higher order kernel density estimators are not constrained to be nonnegative and thus may violate the properties of a density function. A practical solution to this problem (when it arises) is to remove the negative part of the estimator and rescale the positive part to integrate to one. As shown by Hall and Murison (1993) this does not affect the AMISE. However, the impact of this procedure on the finite-sample MISE is unclear. Second, our MISE calculations implicitly assume that the density has support on the entire real line (our analysis is for mixture-normal densities). The existence of a boundary can have substantial effects on the estimation problem and hence on the MISE.
The remainder of the paper is organized as follows. Section 2 introduces notation. Section 3 presents new results concerning smooth polynomial kernels. Section 4 computes the characteristic functions and roughness of these kernels. Section 5 presents the exact MISE of the density estimates, when the underlying density is a mixture of normals as in Marron and Wand (1992). Section 6 presents a numerical analysis of the MISE of the various kernels. We find that the MISE can be greatly influenced by the order of the kernel, even in small samples, and that the selection of kernel order is essential to accurate estimation. We find that the higher order Gaussian kernels of Wand and Schucany (1990) are the most reasonable candidates for finite-sample efficient estimation. Section 7 proposes the selection of kernel order using minimax regret. Section 8 is a brief conclusion. Proofs are presented in the Appendix. Further numerical results and details, in addition to the compute code for the calculations, are available at http://www.ssc.wisc.edu/∼bhansen/papers/mise.html.
For any function g, let g(m)(x) = (dm/dxm)g(x) denote its mth derivative. Let φ(x), φσ(x) = σ−1φ(x/σ), and φσ(m)(x) = σ−1−mφ(m)(x/σ) denote the standard normal density, the scaled normal density, and its mth derivative, respectively.
We call K(x) a symmetric kernel function if K(x) = K(−x) and ∫R K(x) dx = 1. Following Müller (1984), we say that K is s-smooth if K(s−1) is absolutely continuous on R. If the kernel has bounded support, this requires that the (s − 1)th derivative equals zero at the boundaries.
For integer r ≥ 1, a kernel function K is of order 2r if

for all k < 2r yet

. In particular, a kernel is second-order if

.
Pochhammer's symbol is denoted by

A useful result is Legendre's duplication formula:

We will be making extensive use of special functions, for which a useful reference is Magnus, Oberhettinger, and Soni (1966). Many can be represented as generalized hypergeometric functions

For a review of the latter see Abadir (1999). In particular, for integer m ≥ 0, our results will make use of the Gegenbauer polynomials

and the spherical Bessel function

The Gegenbauer polynomials have several hypergeometric representations, including

See Magnus et al. (1966, p. 220).
Using a random sample with n real observations X1,…,Xn drawn independently from a distribution with density f (x), the nonparametric Rosenblatt kernel estimator of f (x) is

where K is a kernel function and h is a bandwidth. The MISE of fn is

For the moment, restrict attention to s-smooth, second-order kernels with bounded support. Müller (1984) and Granovsky and Müller (1991) found that the MISE of fn(s) is minimized by setting K to equal

This class includes the uniform (s = 0), Epanechnikov (s = 1), biweight (s = 2), and triweight (s = 3). Furthermore, as s diverges, the optimal smooth kernel approaches the Gaussian kernel, as

Now consider the more general case of s-smooth bounded-support kernels of order 2r. Müller (1984) and Granovsky and Müller (1991) found that the MISE of fn(s) is minimized by using a polynomial kernel of order s + r − 1 in x2. We now present several alternative representations for this kernel.
THEOREM 1. Müller's s-smooth, 2rth-order kernel on [−1,1] is

where



Furthermore

Equation (8) gives an explicit formula for the kernel, whereas (9)–(11) give alternatives. For numerical computation, the formula (7)–(8) is numerically reliable.
Granovsky and Müller (1991) examined the limit as s → ∞. They showed that

Here G2r are the higher order Gaussian kernels of Wand and Schucany (1990) and Marron and Wand (1992).
We now show that as the order 2r increases, both classes of kernels approach the infinite-order Dirichlet kernel D(x) = sin(x)/(πx).
THEOREM 2.

THEOREM 3.

For any function g, let

denote the characteristic function of g(x). For example, the characteristic function of the normal density is

.
For the higher order Gaussian kernels, the characteristic function

is given by Wand and Schucany (1990, p. 200). However, the characteristic function has not been calculated previously for the smooth polynomial kernels M2r,s. We now show that they consist of linear combinations of spherical Bessel functions as defined in (4).
THEOREM 4.

THEOREM 5.

where

For computational purposes, when t is large, the series (4) can be numerically unstable, in which case it is preferable to compute jm(t) using the recurrence

with the initial conditions

Combining this with Parseval's equality, we can use (15) to calculate the roughness of M2r,s.
THEOREM 6.
Politis and Romano (1999) introduced a class of infinite-order “general flat-top kernels” that have flat characteristic functions at the origin. Their preferred kernel is

which has the trapezoidal characteristic function

where (t)+ = max(t,0). We thus call λ2(t) the trapezoid kernel. It is easy to calculate that R(λ2) = 4/(3π).
Figure 1a displays the four kernels M4,8, M10,8, M20,8, and λ2. The kernels have been rescaled and normalized so that all have equal roughness. The basic shapes of the kernels are similar, with the waviness of the kernels increasing in kernel order. The second panel displays the characteristic functions of the same kernels (again normalized to have equal roughness). Here it is easier to see the contrasts. As the kernel order increases, the characteristic functions are increasingly flat at the origin, with the high-order polynomial characteristic function developing a significant negative lobe.
(a) Polynomial and Trapezoid Kernel Functions. (b) Polynomial and Trapezoid Characteristic Functions.
The exact MISE of the kernel density estimator fn can be written as

where

with

denoting the characteristic functions of K and f. Equation (19) is shown, for example, in equation (3.1) of Chiu (1991). We write I0(h,K,f) = I0(f) because it is independent of K and h.
Marron and Wand (1992) proposed a test set of mixture-normal density functions for which (19) is feasible to calculate. The Marron–Wand densities take the form

The characteristic function of (21) is

with square

where σik2 = σi2 + σk2 and μik = μi − μk. We follow Marron and Wand and restrict attention to this class of density functions for our calculation of exact MISE.
From (22) and equation (A.7) in the Appendix, or Theorem 2.1 of Marron and Wand (1992), we find that

. To calculate MISEn(h,K,f) we also need the integrals I1(h,K,f) and I2(h,K,f), which may be calculated by numerical or analytic integration. Although we use numerical integration to calculate MISE in the next section we use analytic integration to verify their accuracy.
Our first result is the integrals for the smooth polynomial kernels.
THEOREM 7. For the mixture-normal densities (21),

where αs(m) are defined in (16), and

Our second result is the integrals for the trapezoid and Dirichlet kernels. This extends the work of Davis (1981), who made similar calculations for D when f = φ.
THEOREM 8. For the mixture-normal densities (21),
where
is the incomplete gamma function.
Theorems 7 and 8 express the integrals I1(h,K,f) and I2(h,K,f) as convergent infinite series. Methods to numerically evaluate infinite series and other special functions are discussed in detail in Zhang and Jin (1996). As they discuss, numerical evaluation of infinite series can fail as a result of accumulated round-off error when there are alternating signs, which occurs in our expressions. To investigate their accuracy, we numerically compared the expressions in Theorems 7 and 8 with numerical integration for the Marron–Wand densities. We used Gauss–Legendre quadrature with 8,000 grid points over [0,T] where T was selected so that the numerical integral of

was within 0.01% of the exact value

. The results were plotted against h. (See Hansen, 2003.) We found that in some cases the terms in the series expansions grow sufficiently large such that the numerical results are unreliable. This occurred for the polynomial kernels for large h, r, and/or s and also for the trapezoid kernel for very small h in a few cases. We concluded that numerical integration was more reliable for evaluation of I1(h,K,f) and I2(h,K,f) for these kernels.
For each kernel we computed MISEn(h,K,f) on a grid of 3,000 values of h over the region [0,3h*], where h* is the Silverman rule-of-thumb bandwidth for a sample size of 50. Plots of MISEn(h,K,f) against h for each model and kernel indicated that this region appeared to contain the global minimum for all cases. (See Hansen, 2003.) For given K and f the optimal finite-sample MISE is

For the kernel classes G2r and M2r,s, MISEn(K,f) was plotted as a function of r. Figures 2 and 3 display these plots for the Marron–Wand densities 1 (the Gaussian density) and 3 (strongly skewed density). These densities are shown here because are they are extreme cases regarding the gain or loss from the use of higher order kernels. Plots for other densities can be seen in Hansen (2003). Plotted are the MISE for the Gaussian kernels G2r and the smooth polynomial kernels M2r,1, M2r,5, and M2r,8, for 2r = 2,…,20, and for the sample sizes of n = 50, 200, 500, and 1,000. The dotted flat lines are the MISE of D and λ2, which are independent of r. For each plot, the MISEn(K,f) is normalized relative to minK MISEn(K,f).
MISE, Density 1.
MISE, Density 3.
First examine the flat-top kernels D and λ2. In nearly all cases, the trapezoid kernel λ2 does much better than the Dirichlet kernel D, and in most cases λ2 performs quite well relative to other kernel choices. However, it never has as low MISE as the best Gaussian or polynomial kernel.
Second, compare the smooth polynomial kernels M2r,s across the smoothness index s. We observe that increasing the smoothness order typically improves the MISE, but the difference diminishes in larger samples. Indeed, for very large samples (not shown), the best MISE is for small s, but the gain is minimal. There also appears to be little gain achieved by increasing s above s = 8 (again not shown), so setting s = 8 emerges as a practical recommendation.
Third, compare the MISE of the smooth polynomial kernel M2r,8 and the Gaussian kernel G2r. In most cases the difference in MISE is quite small, with the Gaussian kernels achieving lower MISE in small samples and the reverse in large samples.
Examining the plots of MISEn(K,f), it is clear that there is no uniformly optimal choice of kernel K (including kernel order) across sample sizes n and densities f. For any given f there may be a best choice of kernel among those we consider, but this choice will vary across f. A data-dependent method such as cross-validation can possibly be used to select kernel order, which might enable estimation to adapt to the unknown density f. This is a difficult problem, however, and is not pursued further in this paper.
Let

denote a class of kernels, such as the Gaussian class {G2r; r ≥ 1} or the polynomial class {M2r,s; r ≥ 1;s ≥ 1}. The problem raised at the end of the previous section is how to select a kernel

when it is known that the finite-sample optimal choice varies with the true underlying density f. This section proposes a pragmatic solution based on minimax regret, a concept in statistical decision theory dating back to Savage (1951).
For any density f and sample size n, there is a best possible kernel choice that can be defined as

Note that we implicitly define our loss function as ln MISEn*(K,f) to eliminate scale effects. The regret associated with the use of an arbitrary kernel K is

the percentage deviation of the realized MISE from the optimal value.
For a compact class of density functions

the maximal regret associated with K is the maximum over


The minimax regret rule is to pick K to minimize the maximum regret

with the associated minimized regret

Note that whereas the small-sample optimal kernel Kn(f) depends on the unknown density f in addition to n, the minimax regret kernel Kn* only depends on the sample size n. The kernel Kn* guarantees that if the true density f belongs to

, the percentage deviation of the MISE from the optimum is bounded by Regretn*.
For the density class

we use the Marron–Wand mixture-normal class (21) with q = 2:

Many of the Marron–Wand test densities are in this class, and two normal components are sufficient to generate most density shapes of interest. Because the regret criterion is invariant to location and scale, we select μ2 and σ2 so that EX = 0 and Var(X) = 1, so the density class is fully described by the remaining parameters (w,μ1,σ1). We use a grid over these parameters, varying each in increments of 0.1 over all feasible values. This results in a density class with 1,887 elements.
Setting

to equal the Gaussian kernel class G2r, Figure 4 plots Regretn(G2r) as a function of 2r for n = 25, 100, 400, and 800. The minimax regret solution rn* locates its lowest value for any curve. We can see that this solution rn* varies from 2 to 8 for the four sample sizes.
Regret of Gaussian Kernels.
We calculated the minimax regret rn* for the Gaussian kernels G2r as a function of sample size, and we present the findings in Table 1. The optimal kernel order rn* is strictly increasing with n. The magnitudes may be surprising to many readers, as the minimax kernel orders are higher than typically used in practice.
Minimax regret Gaussian kernel order by sample size: Regret calculated over two-component normal mixture densities
Let Gn* denote the Gaussian higher order kernel with r = rn*, and similarly Mn,s*. These are feasible kernel choices as they vary only with sample size. We now compare the regret of the feasible kernel choices φ, Gn*, Mn,2*, and λ2. Figure 5 plots Regretn* for these kernels as a function of n where the general kernel class includes G2r, M2r,2, and λ2. We see that the standard normal kernel φ has regret that is increasing in n and is clearly dominated by the other choices except when the sample size is very small. The trapezoid kernel λ2 has high regret for small samples but has comparable regret with the optimal Gaussian and polynomial kernels for large samples. The optimal Gaussian and polynomial kernels have similar regret for most sample sizes, with that for Gn* slightly lower. Because Gn* is somewhat easier to manipulate numerically, it is our recommendation for empirical practice. A sensible alternative choice is the trapezoidal kernel λ2, as long as n ≥ 500 (its regret is bounded below 12% for such samples).
Regret across Kernel Classes.
Finally, from Figure 5 we find that the regret of Gn* is uniformly bounded below 12%. This means that this kernel choice guarantees that regardless of f (in the class of two-component mixture-normal distributions) the MISEn*(Gn*,f) cannot differ from the optimal MISEn*(Kn(f),f) by more than 12%.
We have found that finite-sample MISE varies considerably across kernel order 2r and underlying density f. If information about f is known this can be used to help pick the kernel order. Otherwise, the minimax regret solution picks the kernel order to minimize the worst-case regret. We find that by focusing on the class of mixture-normal densities, we are able to deduce a practical rule for kernel order selection that bounds the regret below 12% for any sample size.
Our analysis points to the excellent performance of the higher order Gaussian and smooth polynomial kernels.
An important caveat is that minimax regret is defined relative to a density class

, and we restricted attention to two-component normal mixtures. If another set

is selected, the minimax regret kernel can change. Further investigation of the sensitivity of these recommendations to alternative sets

would be a useful subject of future research.
Proof of Theorem 1. Müller (1984, Thm. 2.4) and Granovsky and Müller (1991, Cor. 2) show that the optimal kernel is the unique 2rth-order kernel of the form (7) with Br,s(x) a polynomial of degree r − 1 in x2. Because (8) takes this form, it is sufficient to show that Br,s(x)Ms(x) is a valid 2rth-order kernel, that (8)–(10) are equivalent, and (11).
We start by showing the equivalence of (8)–(10). First, because for k ≤ m, (−m)k = (−1)km!/(m − k)!, then
where the final equality is (5). This shows the equality of (8) and (9).
Second, let λ = s + ½. The Gegenbauer polynomials Cmλ(x) satisfy the recurrence (Magnus et al., 1966, p. 222)

Thus for any j ≥ 1,

By back substitution and the fact C1λ(x) = (2s + 1)x, we find
Hence
showing the equivalence of (9) and (10).
We now show that Br,s(x)Ms(x) is a valid 2rth-order kernel. First, using (10) and the facts that

for all m ≥ 1,
Thus Br,s(x)Ms(x) is a valid kernel.
Second, using (9) and the orthogonal properties of the Gegenbauer polynomials, for any j ≤ 2r − 1

Thus Br,s(x)Ms(x) is of order 2r as required.
Finally, we demonstrate (11). Rodrigues' formula for the Gegenbauer polynomials (Magnus et al., 1966, p. 221) is

Using (1) and (6),

Combined with (10) this yields
which is (11). █
Proof of Theorem 2. Let Jv(x) denote the Bessel functions and Pm(α,β)(x) denote the Jacobi polynomials. (See, e.g., Ch. 3 and Sect. 5.2 of Magnus et al., 1966.) In particular,

where js(x) is the spherical Bessel function defined in (4).
Using results from pp. 219 and 210 of Magnus et al. (1966) and (1),
By Magnus et al. (1966, p. 216), as r → ∞

The equalities are (A.1) and (18). Furthermore, using Stirling's formula we can show that

Thus combining (9) with (A.2), and using the limits in (A.3) and (A.4), we obtain as r → ∞

Furthermore, as r → ∞

Thus as r → ∞

establishing (13). █
Proof of Theorem 3. Let Hem(x) denote the hermite polynomials. By the Rodrigues' formula and a limit property for the Hermite polynomials (Magnus et al., 1966, pp. 252, 255), as r → ∞,
establishing (14). █
Proof of Theorem 4. From Magnus et al. (1966, p. 401)

the second equality using (A.1). Then by the definition of the Fourier transform
Proof of Theorem 5. Using (11), the derivative property of Fourier transformations, and Theorem 4,
as stated. █
Proof of Theorem 6. By (A.1) and Magnus et al. (1966, p. 99),
By Parseval's equality, Theorem 5, and (A.5),
Proof of Theorem 7. Using expressions (15) and (22) we find
Using Magnus et al. (1966, p. 402) we find that

Using (A.1), (4), and (A.7),
Combining this with (A.6) we obtain (23).
Next,
By equation (2.20) of Tranter (1968)
Combining this with (A.7) we obtain
Combining this with (A.8) we obtain (24) as required. █
Proof of Theorem 8. By a series expansion and (1)

Thus for any η ≥ ½
Summing, we find
Hence
(a) Polynomial and Trapezoid Kernel Functions. (b) Polynomial and Trapezoid Characteristic Functions.
MISE, Density 1.
MISE, Density 3.
Regret of Gaussian Kernels.
Minimax regret Gaussian kernel order by sample size: Regret calculated over two-component normal mixture densities
Regret across Kernel Classes.