2
$\begingroup$

Our tutor once said that the t-test applies Mahalanobis distance. Could you please explain how it does so?

$\endgroup$
2
  • 4
    $\begingroup$ I think a good answer to this question would also mention Hotelling's T-squared distribution, which in a sense generalises Student's t to multiple dimensions, which is the situation one normally encounters Mahalanobis distances. The relationship between the one-dimensional case and the univariate Student's t is pretty clear once we see them both as measuring "standard deviations from the mean". $\endgroup$
    – Silverfish
    Dec 31, 2014 at 19:10
  • $\begingroup$ (That is very much a comment not an answer though - there's some subtleties about standard deviation of what? There is a link to PCA too - quick search for T squared, Mahalanobis and PCA produces some results which are at least tangentially relevant to the OP.) $\endgroup$
    – Silverfish
    Jan 1, 2015 at 12:39

1 Answer 1

2
$\begingroup$

I will only discuss the (independent) two-sample case:

Let $x,y$ be observations (matrices) from two $p$-dim multivariate distributions. Then the Mahalanobis distance is given by $$ D_M^2 = (\bar{x}-\bar{y})^T S^{-1} (\bar{x}-\bar{y}) $$ where $S$ is the sample covariance matrix. In the scalar case the $t$-statistic is given by $t^2 \propto \frac{(\bar{x}-\bar{y})^2}{\hat{\sigma}^2}$ which is (up to the scale factor I omitted) the same as the Mahalanobis distance for $S=(\hat{\sigma}^2)$.

The multivariate generalization of the $t$-statistic is the Hotelling $T$-squared given by $$ T^2 = \frac{n_x n_y}{n_x+n_y}(\bar{x}-\bar{y})^T S^{-1} (\bar{x}-\bar{y}) $$ which is proportional to the Mahalonibis distance. For more information, see https://en.wikipedia.org/wiki/Mahalanobis_distance and https://en.wikipedia.org/wiki/Hotelling%27s_T-squared_distribution.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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