The statistical distance or Mahalanobis distance between two points $x = (x_1,\dots,x_p)'$ and $y = (y_1,\dots,y_p)'$ in the $p$-dimensional space $\mathbb R^p$ is defined as $$d(x, y) = \sqrt{ (x-y)' Q^{-1} (x-y)}$$ Where $Q$ is the covariance matrix that represents the measurement uncertainty of both variables $x$ and $y$.

My question is can $Q = 0$ i.e. the measures have no uncertainty? Which leads to the fact the distance is undefined? However if $Q$ is identity then the distance will reduce to the normal Euclidean distance $\|x-y\|_2$?

  • $\begingroup$ $Q$ is a $p\times p$ matrix, you need to elaborate on what $Q=0$ means exactly. Are the terms on the diagonal zero? What about the terms off the diagonal? $\endgroup$ – Dimitriy V. Masterov Sep 18 '12 at 0:45
  • $\begingroup$ I mean all elements are zeros both diagonal and off the diagonal. $\endgroup$ – Laith Sep 18 '12 at 15:53
  • $\begingroup$ If that's the case, $Q^{-1}$ does not exist. There are some restrictions on what a covariance matrix can look like. For example, it needs to be positive-semidefinite and symmetric. The first is key here. $\endgroup$ – Dimitriy V. Masterov Sep 18 '12 at 17:03
  • 2
    $\begingroup$ @Dimitriy: But note that $Q = 0$ is positive semidefinite and symmetric! Note also that if $Q$ were zero along the diagonal, then automatically all off-diagonal elements would also have to be zero. :-) $\endgroup$ – cardinal Sep 18 '12 at 17:45
  • $\begingroup$ @cardinal Holy cats! Mea culpa. I should not attempt linear algebra pre-coffee. $\endgroup$ – Dimitriy V. Masterov Sep 18 '12 at 18:14

If $Q=(q_{ij})$ "were zero", that is if $q_{ij}=0$ for every $i,j$, then, clearly, $\det(Q)=0$. Hence, the inverse $Q^{-1}$ doesn't exist, but the Malahanobis distance is defined in terms of $Q^{-1}$.

  • $\begingroup$ But one can in some cases define a generalized Malahabonis distance using the Moore-Penrose generalized inverse. $\endgroup$ – kjetil b halvorsen Aug 5 '17 at 16:39

Well, if $Q=0$ then, specifically, its diagonal is zero, so all variances are zero! That would imply that all your observations (with probability 1) should be equal, and you do not need any distance measure.

I think you need to explain us the applied context, why are you interested in the case $Q=0$?

  • $\begingroup$ Well, you suppose that the civariance matric $Q$ you use is the covariance matrix of the distribution of your data! Then, use that $\text{Var}(X)=0$ means that the probability of $X$ being equal to its expectation is 1. (Try to prove that!!) Then, if your model is correct, all your obs must be equal! If they bare not, then your model is wrong. $\endgroup$ – kjetil b halvorsen Sep 18 '12 at 0:36
  • $\begingroup$ I am intersted inthe case Q = 0 (I mean all elements are zeros) because I had a question on that definition I have posted as this:1. If the uncertainties associated with measurements is zero (i.e. there is no uncertainity), the distance is sort of undefined 2. To generalize the statistical distance we say it reduces to the normal Euclidaen distance is Q = identity BUT if it is identity, does that mean there is no uncertainty associated with the estimates What should be added to the difention to make generalized and defined. $\endgroup$ – Laith Sep 18 '12 at 16:52
  • $\begingroup$ Shall I mention that $Q\geq 0$ i.e. positive semi definte so that the inverse exists and Q = 0 does is not allowed! $\endgroup$ – Laith Sep 18 '12 at 16:53
  • $\begingroup$ I am not sure what you mean by "uncertain", the model behind the Mahalanobis distance suppose the measurements are exact, that is, no uncertainty (you did measure exactly that property of tht individual), $\endgroup$ – kjetil b halvorsen Sep 19 '12 at 16:53
  • $\begingroup$ (continuing) but they have a distribution in the population of individuals. uncertainty and variability is not the same, which do you mean? Another point: you might use the Moore-Penrose generalized inverse in the Mahalanobis distance, but when $Q=0$, that is also zero so gives distance zero. Bit if $Q$ merely have reduced rank, but nonzero, this gives the usual Mahalanobis distance in the subspace where the operator is acting! If all your data lives in that subspace, that is fine. If the data have components outside that subspace, this component is effectively zeroed. $\endgroup$ – kjetil b halvorsen Sep 19 '12 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.