Kernel density estimation is a nonparametric method for estimating a probability density function from a sample . On the real line,
given a nonnegative kernel
with integral 1 and a bandwidth
, the estimator is
The Gaussian kernel is a common choice, but the bandwidth usually has a larger effect on the estimate than the particular smooth kernel. Small bandwidths reveal fine sample features but can produce a noisy estimate. Large bandwidths give a smoother estimate and can hide genuine modes.