Boundary bias of a kernel density estimator 2026-10-14
If the unknown probability distribution is supported on , an ordinary Gaussian density kernel still puts some fitted probability below zero. For positive observations and the standard normal distribution cumulative distribution function , the displayed formula gives the total leakage. For the statistical sample and smoothing bandwidth , it isThus about of the fitted probability falls outside the known support of a probability distribution, even though the full integral remains one. The leakage panel in smoothing bandwidth shades this area. Simply deleting the negative part leaves area ; renormalizing it makes another probability density function but does not by itself establish that the bias of an estimator has been corrected.
The issue also appears in the expectation of the kernel density estimator. For a nonnegative symmetric kernel for density estimation and a probability density function that is zero for and has a finite positive right-hand limit , assume is bounded. Then, for fixed as ,Half the averaging window lies on the impossible side of the boundary. For example, the rate-one exponential distribution has , so the limiting expected boundary height is , rather than the right-hand height one. This refers to estimating the right-hand limit; changing a probability density function at a single point does not change its probability distribution. Decreasing the smoothing bandwidth narrows the affected region but does not remove this boundary-height error. This is why the interior second-order pointwise bias bound for kernel density estimation cannot be applied across a jump at the boundary.
Gaussian kernel density worked example 2026-10-14
Take the realized statistical sample , the Gaussian density kernel and smoothing bandwidth . ThenAt , the three contributions are , , and , because and . Their sum isThis is a probability density function value, not the probability of observing exactly zero. Each of the three component curves has area , despite having a different height at zero.
Let be the cumulative distribution function of the standard normal distribution. The fitted probability of the interval is its area under the kernel density estimator:The shaded area in the diagram is this fitted probability. Its agreement to a few digits with is incidental: the empirical measure gives this interval mass exactly, whereas kernel density estimation redistributes that mass into neighboring intervals.
Kernel density estimation Created 2026-09-24 Updated 2026-10-14
Let be real independent and identically distributed random variables with unknown probability density function , let , and choose a nonnegative, unit-integral kernel for density estimation and a smoothing bandwidth . The kernel density estimator isPlace a bump at every observation and add their contributions. Each bump has area , so for every realized statistical sampleThe change of variables is . Summing the unweighted bumps would give area ; summing just would give area . Those raw sums do not have the normalization of a probability density function.
Unlike a histogram, the construction does not require choosing bin origins, and a Gaussian density kernel gives a smooth curve. Its appeal is that identical local contributions can combine into a probability density function with several peaks without first choosing their number. This makes kernel density estimation useful for exploring an unknown probability distribution and estimating interval probabilities, while the smoothing bandwidth controls how much detail is visible.
Before the statistical sample is observed, is a random function; afterwards it is a fitted probability density function. It is an estimator of the unknown , not the true probability distribution. For fixed , its expectation is the convolution , generally different from , and repeating the sampling changes the fitted curve. The exact mean integrated squared error of a kernel density estimator separates this smoothing bias of an estimator from sampling variance. Allowing signed kernels of order ell retains the formula but can lose nonnegativity.
Kernel for density estimation Created 2026-09-24 Updated 2026-10-14
A kernel for density estimation is an integrable function with unit integral. For an ordinary kernel density estimator that is itself a probability density function, takeThus specifies the bump's shape and the smoothing bandwidth specifies its width. The factor preserves area: doubling the smoothing bandwidth doubles the width and halves the height. An even function is a common choice; when its absolute first moment is finite, its mean is zero. Symmetry is useful but is not required for normalization.
The Gaussian density kernel is the standard normal density, . Its rescaled translate is the normal probability density with mean and standard deviation . It is positive everywhere, whereas an Epanechnikov kernel has compact support. With the Gaussian density kernel, the smoothing bandwidth is a standard deviation, not a cutoff beyond which observations have no influence.
The broader convention also allows signed kernels of order ell, such as the flat-top kernel for density estimation, to cancel moments and reduce the bias of an estimator. Their unit integral still normalizes total area, but a resulting kernel density estimator can take negative values and need not be a probability density function. Nonnegativity is therefore an additional condition, not a consequence of unit integral.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 42 4 Solution Created 2026-10-03 Updated 2026-10-14
Assume a symmetric second-order probability density function kernel for density estimation and enough smoothness for the displayed derivative functionals. The benchmark smoothing bandwidth is , balancing against . Three widely used selection methods are as follows.
For least-squares density cross-validation, expand integrated squared error as . Estimate the middle integral by leaving out the observation at which the estimate is evaluated, and minimizeThe left-out observation is independent of its estimator, so the second term has expectation . Thus exactly. The subtraction of the self-contribution is essential. Computation uses , where . This method directly targets integrated error without estimating a curvature functional first. Under standard smoothness and a suitable search interval its selected smoothing bandwidth is ratio-consistent with the MISE optimum, and hence with . Relative fluctuations are ordinarily , so the selected values can be quite variable in finite samples.
For biased density cross-validation, estimate curvature from the second-derivative probability density function estimator and subtract its diagonal variance term:Differentiating the kernel for density estimation estimator and applying the integrated-variance identity gives the exact expectation . Under the derivative regularity assumptions, , so . Minimize BCV over a reasonable smoothing bandwidth range. It is a smoothed criterion directed at AMISE; the name reflects its finite-sample bias rather than an exact unbiased-risk identity. Standard conditions again give ratio consistency and relative fluctuation order . It often has a smoother objective than ordinary least-squares cross-validation, though numerical behavior and relative variance depend on the probability density function and kernel for density estimation.
For plug-in bandwidth selection, obtain an independent pilot scale g, estimate , then setThe pilot should be positive and stable; consistent positive estimates make this expression ratio-consistent by continuity. A simple normal-reference initialization uses under a normal reference model, substituting a sample scale for sigma. For a Gaussian density kernel this gives . A pure normal-reference rule is quick but is asymptotically correctly calibrated only when its assumed curvature matches the actual probability density function; it is useful as the first stage of a data-driven plug-in procedure.
A more adaptive fourth-derivative pilot estimate of density curvature uses , obtained by two integrations by parts, and estimates it byThe diagonal expectation contributes ; the leading smoothing bias is . Balancing these terms produces the stated pilot scale , with another pilot or reference model supplying . Under sufficient derivatives and tail control, its error is bounded byat that pilot scale. Taylor expansion of the fifth-root formula gives , so it inherits that bound. A calibrated cancellation of leading pilot bias can give a faster rate. This illustrates why an appropriately constructed plug-in selector can converge more quickly than cross-validation, while requiring more smoothness and pilot choices. For each ratio-consistent method, its attained AMISE divided by the minimal AMISE tends to one.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 49 4 Solution Created 2026-10-03 Updated 2026-10-14
In kernel density estimation, take a kernel for density estimation that is nonnegative, symmetric, and has integral one, finite , and finite . Its smoothing bandwidth gives and the kernel density estimatorfrom an independent and identically distributed sample with probability density function . Nonnegativity and unit mass make the estimate itself a probability density function. We compare kernel for density estimation shapes by their optimized mean integrated squared error, rather than by their performance at an arbitrarily common numerical smoothing bandwidth.
For the usual second-order theory, assume, for example, that belongs to the Sobolev space and , and let , . The expectation is the convolution . The vanishing first moment of the symmetric kernel for density estimation and the integral Taylor remainder giveContinuity of translations in the L2 norm, with domination by , shows that in the L2 norm. Hence the integrated squared bias of a kernel density estimator isBy independence, the exact integrated variance of a kernel density estimator isIndeed the integrated second moment of a single summand is , and its integrated squared mean is . The latter quantity is bounded by , by Young's convolution inequality, so its contribution is . The bias-variance decomposition of mean squared error therefore yields the leading criterionThis asymptotic mean integrated squared error displays the bias-variance tradeoff: a small smoothing bandwidth increases integrated variance, while a large one increases squared bias of an estimator.
Differentiating the asymptotic mean integrated squared error with respect to gives . It changes sign once, from negative to positive, so its unique minimum isAt this minimum the integrated variance term is four times the squared bias of an estimator term. Substitution givesThus the leading rate is , and the shape comparison reduces to minimizing .
There is an essential scale ambiguity: if , then . Changing the scale of the kernel for density estimation merely changes the numerical convention for the smoothing bandwidth. MoreoverA comparison at the same raw is therefore not a fair comparison of shape. One can normalize the second moment to one, but that does not make the optimal smoothing bandwidth independent of shape.
The canonical kernel for density estimation instead chooses the unique scaleIt satisfies , and soConsequently all canonical kernels share the same leading optimal bandwidth . Only the multiplicative constant depends on shape. This is precisely the separation of shape choice and scale choice that makes the canonical kernel normalization useful. For an original unscaled kernel for density estimation, its corresponding optimal smoothing bandwidth is .
To prove optimal shape, scale a candidate kernel for density estimation to have second moment one. Let andDirect integration gives , , and . Thus is a rescaled Epanechnikov kernel. For any admissible with the same mass and second moment,Outside , and , because . The integral inside is therefore nonnegative, and multiplying by gives . Expanding the square now provesEquality forces almost everywhere. At fixed second moment, minimizing is equivalent to minimizing . Since is scale invariant, this proves the optimality of the Epanechnikov kernel over all nonnegative symmetric second-order kernels for density estimation, including the equality case up to rescaling.
In its usual scale, the optimal Epanechnikov kernel isIts canonical scale is , givingThe optimal Epanechnikov kernel shape is therefore a truncated parabola, rather than a particular support radius. The canonical kernel and unit-second-moment version represent the same shape but different scale conventions.
The numerical gains over other reasonable kernels for density estimation are modest. Define asymptotic relative efficiency against the optimal Epanechnikov kernel by the sample-size fraction giving the same optimized leading mean integrated squared error:For the Gaussian density kernel , and , so its efficiency is . For the uniform smoothing kernel , and , giving efficiency . The Gaussian density kernel is infinitely smooth, whereas the optimal Epanechnikov kernel has compact support and allows each observation to affect only a finite window. Such computational and smoothness considerations may outweigh a small leading-efficiency difference.
In practice is unknown. A plug-in estimator estimates this roughness functional from a pilot estimate of the second derivative and substitutes it into the optimal smoothing bandwidth formula. Alternatively, Leave-one-out cross-validation minimizeswhere uses the other observations. By independence, the expectation of the second term is , so . Thus it targets integrated error without knowing . The choice of smoothing bandwidth remains important: even for the optimal Epanechnikov kernel, setting multiplies the leading minimum error by .
The preceding optimum concerns nonnegative second-order kernels for density estimation and twice-smooth densities on the real line. Signed kernels of order ell can cancel higher moments for smoother densities and yield different rates, but may produce negative density estimates. A support boundary or a density jump also requires separate bias of a kernel density estimator analysis. These settings do not contradict the proved second-order optimality of the Epanechnikov kernel.
Smoothing bandwidth Created 2026-10-05 Updated 2026-10-14
A smoothing bandwidth determines the scale over which a regression kernel averages data, or a kernel for density estimation spreads each observation. It has the same units as the observations. In kernel density estimation, changing changes the visible detail while preserving the total integral one. For a Gaussian density kernel, each bump has standard deviation and its individual contribution has peak height .
If the smoothing bandwidth is too small relative to the spacings in a statistical sample, the kernel density estimator shows narrow spikes tied to individual observations: apparent peaks may be sampling accidents. If it is too large relative to features of the unknown probability density function, it blurs distinct groups together and spreads fitted probability far from the observations. An intermediate smoothing bandwidth can reveal broad structure, but visual smoothness alone cannot establish accuracy.
The same sample at three Gaussian bandwidths, and leakage below zero for a separate positive sample
. Details. The first three panels use exactly with smoothing bandwidths , and , respectively. Every curve has area one; the two groups in the observed statistical sample become less distinct as increases. No true probability density function is specified in this illustration, so the middle panel is illustrative, not a certified optimal fit. The fourth panel uses and to illustrate boundary bias of a kernel density estimator.
For a fixed nonnegative kernel for density estimation with finite squared integral, a probability density function that is bounded and continuous at an interior point with , and a deterministic sequence , the pointwise sampling variance obeysThus decreasing the smoothing bandwidth increases the leading sampling variance while reducing interior smoothing bias of an estimator: this is a bias-variance tradeoff. The conditions and express two goals, increasingly fine resolution and enough observations contributing locally. Practical methods such as plug-in bandwidth selection use the data to choose ; pointwise optimal kernel bandwidth depends on local features of the unknown probability density function. The smoothing bandwidth remains a tuning choice in nonparametric statistics, and knowing the support of a probability distribution can require more than a width adjustment near a boundary.

