# Matérn covariance function

In statistics, the Matérn covariance (named after the Swedish forestry statistician Bertil Matérn) is a covariance function used in spatial statistics, geostatistics, machine learning, image analysis, and other applications of multivariate statistical analysis on metric spaces. It is commonly used to define the statistical covariance between measurements made at two points that are d units distant from each other. Since the covariance only depends on distances between points, it is stationary. If the distance is Euclidean distance, the Matérn covariance is also isotropic.

The Matérn covariance between two points separated by d distance units is given by

$C(d)=\sigma ^{2}{\frac {1}{\Gamma (\nu )2^{\nu -1}}}{\Bigg (}{\sqrt {2\nu }}{\frac {d}{\rho }}{\Bigg )}^{\nu }K_{\nu }{\Bigg (}{\sqrt {2\nu }}{\frac {d}{\rho }}{\Bigg )},$ where Γ is the gamma function, Kν is the modified Bessel function of the second kind, and ρ and ν are non-negative parameters of the covariance.

A Gaussian process with Matérn covariance has sample paths that are $\lfloor \nu -1\rfloor$ times differentiable. As $\nu \rightarrow \infty$ , the Matérn covariance converges to the squared exponential covariance function

$C(d)=\sigma ^{2}\exp(-d^{2}/2\rho ^{2}).$ When $\nu =1/2$ , the Matérn covariance is identical to the exponential covariance function. In fact,

$C(d)=\sigma ^{2}\exp {\Bigg (}-{\frac {d}{\rho }}{\Bigg )}\quad \quad \nu ={\tfrac {1}{2}},$ $C(d)=\sigma ^{2}{\Bigg (}1+{\frac {{\sqrt {3}}d}{\rho }}{\Bigg )}\exp {\Bigg (}-{\frac {{\sqrt {3}}d}{\rho }}{\Bigg )}\quad \quad \nu ={\tfrac {3}{2}},$ $C(d)=\sigma ^{2}{\Bigg (}1+{\frac {{\sqrt {5}}d}{\rho }}+{\frac {5d^{2}}{3\rho ^{2}}}{\Bigg )}\exp {\Bigg (}-{\frac {{\sqrt {5}}d}{\rho }}{\Bigg )}\quad \quad \nu ={\tfrac {5}{2}}.$ 