In statistics, especially in Bayesian statistics, the kernel of a probability density function (pdf) or probability mass function (pmf) is the form of the pdf or pmf in which any factors that are not functions of any of the variables in the domain are omitted. Note that such factors may well be functions of the parameters of the pdf or pmf. These factors form part of the normalization factor of the probability distribution, and are unnecessary in many situations. For example, in pseudorandom number sampling, most sampling algorithms ignore the normalization factor. In addition, in Bayesian analysis of conjugate prior distributions, the normalization factors are generally ignored during the calculations, and only the kernel considered. At the end, the form of the kernel is examined, and if it matches a known distribution, the normalization factor can be reinstated. Otherwise, it may be unnecessary (for example, if the distribution only needs to be sampled from).
For many distributions, the kernel can be written in closed form, but not the normalization constant.
An example is the normal distribution. Its probability density function is
p
(
x

μ
,
σ
2
)
=
1
2
π
σ
2
e
−
(
x
−
μ
)
2
2
σ
2
and the associated kernel is
p
(
x

μ
,
σ
2
)
∝
e
−
(
x
−
μ
)
2
2
σ
2
Note that the factor in front of the exponential has been omitted, even though it contains the parameter
σ
2
, because it is not a function of the domain variable
x
.
The kernel of a reproducing kernel Hilbert space is used in the suite of techniques known as kernel methods to perform tasks such as statistical classification, regression analysis, and cluster analysis on data in an implicit space. This usage is particularly common in machine learning.
In nonparametric statistics, a kernel is a weighting function used in nonparametric 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. Kernels are also used in timeseries, in the use of the periodogram to estimate the spectral density where they are known as window functions. An additional use is in the estimation of a timevarying intensity for a point process where window functions (kernels) are convolved with timeseries data.
Commonly, kernel widths must also be specified when running a nonparametric estimation.
A kernel is a nonnegative realvalued integrable function K satisfying the following two requirements:
∫
−
∞
+
∞
K
(
u
)
d
u
=
1
;
K
(
−
u
)
=
K
(
u
)
for all values of
u
.
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.
If K is a kernel, then so is the function K* defined by K*(u) = λK(λu), where λ > 0. This can be used to select a scale that is appropriate for the data.
Several types of kernel functions are commonly used: uniform, triangle, Epanechnikov, quartic (biweight), tricube, triweight, Gaussian, quadratic and cosine.
In the table below, 1_{{…}} is the indicator function.