Math 2.0

Statistics Definition

Mahalanobis distance

Builds on Covariance matrixPositive definite matrixExpected value

Definition

Let XX be a random vector in ℝp\R^p with mean μ\mu and covariance matrix Σ\Sigma, and assume that Σ\Sigma is positive definite. The Mahalanobis distance of a point x∈ℝpx \in \R^p from the distribution of XX is DM(x)=(x−μ)TΣ−1(x−μ).D_M(x) = \sqrt{(x - \mu)^T \Sigma^{-1} (x - \mu)}. The Mahalanobis distance between two points x,y∈ℝpx, y \in \R^p with respect to Σ\Sigma is dM(x,y)=(x−y)TΣ−1(x−y).d_M(x, y) = \sqrt{(x - y)^T \Sigma^{-1} (x - y)}.

Remarks

Example: let μ=0\mu = 0 and Σ=diag⁡(4,1)\Sigma = \operatorname{diag}(4, 1). Then Σ−1=diag⁡(1/4,1)\Sigma^{-1} = \operatorname{diag}(1/4, 1), so DM(2,0)=4/4=1D_M(2, 0) = \sqrt{4/4} = 1 and DM(0,1)=1D_M(0, 1) = 1, while DM(0,2)=2D_M(0, 2) = 2. Non-example: if Σ=(1111)\Sigma = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}, then Σ\Sigma is not invertible, so the formula is not defined. If Σ=AAT\Sigma = A A^T with AA invertible, then dM(x,y)=∣A−1x−A−1y∣d_M(x, y) = \abs{A^{-1} x - A^{-1} y}, the Euclidean distance after the change of variables x↦A−1xx \mapsto A^{-1} x. So dMd_M is a metric on ℝp\R^p. If Σ\Sigma is the identity, dMd_M is the Euclidean distance. If XX is multivariate normal, then DM(X)2D_M(X)^2 has the chi-squared distribution with pp degrees of freedom.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Covariance matrix concept
  2. Expected value concept
  3. Positive definite matrix concept
  4. Mahalanobis distance definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Mahalanobis_distance
About this page
TagHF8AJZP6PG
URIm2://HF8AJZP6PG
Kinddefinition
WritingW0 stub
MSC62H30, 62H20
DefinesMahalanobis distance
UsesCovariance matrix, Positive definite matrix, Expected value

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.