Statistics Glossary → Kernel density estimation (KDE)
Kernel density estimation (KDE)concept
A nonparametric method that estimates the probability density of a variable, or of point locations, as a smooth curve or surface by placing a small smooth 'bump' (kernel) on each observation and adding them up.
In one dimension the estimate is f̂(x) = (1/nh) Σ K((x − xᵢ)/h), where K is the kernel function (Gaussian, Epanechnikov, quartic and so on) and h the bandwidth. Unlike a histogram, it does not depend on where the bin edges fall, and it gives a smooth curve. In two dimensions the same idea yields a density surface (e.g. points per km²). On this surface the contours of the smallest areas containing 50% or 95% of the total density can be drawn; in ecology these are used as home ranges.
The result depends far more on the bandwidth than on the type of kernel. A small h makes chance fluctuations in the data look like real peaks, while a large h smooths real structure away. h is chosen by the Silverman or Scott rules, cross-validation or plug-in methods, and simple rules can oversmooth multimodal data. Near the boundaries of the study area or of the variable, density is underestimated (the edge effect), and an edge correction may be needed. In point-density maps, if sampling effort is uneven, high density may reflect where observations were concentrated rather than real clustering.
An everyday example
A municipality maps the locations of 600 traffic accidents over the past year. Instead of showing each point, it builds a density surface with KDE; with a bandwidth of 300 m a few junctions stand out as clear hot spots. With a 2 km bandwidth these junctions would disappear into a single broad patch covering the city centre.
In MerQur
The KDE density map produces a two-dimensional kernel density surface; 'Bandwidth' (Silverman, Scott, Manual, Scott normal, Likelihood CV, Berman-Diggle CV) and 'Kernel type' (Gaussian, Quartic/biweight, Epanechnikov, Triweight) control the roughness of the surface, and 'Volume contours' draws the boundaries of the smallest areas covering 50% and 95% of the total density (home range). In discriminant analysis, the Kernel density (nonparametric) choice of the 'Method' option classifies by kernel density estimation, and in the hexbin map KDE is also in the same 'Method' list.
Analyses where this concept appears
Discriminant Analysis (LDA / QDA)KDE Density MapHexbin Map
Related concepts
Bandwidth (kernel smoothing)Kernel (weighting) function (Gaussian, bisquare, Epanechnikov)Edge (boundary) correction