Kernel (statistics)

A kernel is a weighting function used in non-parametric estimation techniques. Kernels are used in kernel density estimation to estimate random variables' density functions, or in kernel regression to estimate the conditional expectation of a random variable.

Commonly, kernel widths must also be specified when running a non-parametric estimation.

Definition
A kernel is a non-negative real-valued integrable function K satisfying the following two requirements: The first requirement ensures that the method of kernel density estimation results in a probability density function. The second requirement ensures that the average of the corresponding distribution is equal to that of the sample used.
 * $$\int_{-\infty}^{+\infty}K(u)du = 1\,;$$
 * $$K(-u) = K(u) \mbox{ for all values of } u\,.$$

If K is a function, then so is the function K* defined by K*(u) = λ−1K(λu), where λ > 0. This can be used to select a scale that is appropriate for the data.

Kernel functions in common use
Several types of kernels functions are commonly used: uniform, triangle, epanechnikov, quartic (biweight), tricube (triweight), gaussian, and cosine.

Below, the notation $$1_{(p)}\,\!$$ denotes the value 1 when p holds, and 0 when p is false.

Uniform
$$K(u) = \frac{1}{2}\ 1_{(|u|\leq1)}$$

Triangle
$$K(u) = (1-|u|)\ 1_{(|u|\leq1)}$$

Epanechnikov
$$K(u) = \frac{3}{4}(1-u^2)\ 1_{(|u|\leq1)}$$

Quartic
$$K(u) = \frac{15}{16}(1-u^2)^2\ 1_{(|u|\leq1)}$$

Triweight
$$K(u) = \frac{35}{32}(1-u^2)^3\ 1_{(|u|\leq1)}$$

Gaussian
$$K(u) = \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}u^2}$$

Cosine
$$K(u) = \frac{\pi}{4}\cos\left(\frac{\pi}{2}u\right)1_{(|u|\leq1)}$$