# Correlation and Hotelling test

To find a Hotelling $T^2$ score it is necessary to calculate the covariance matrix and then invert it.

Now, when the test is a two-sample $T^2$ test, the covariance matrix is a pooled matrix. When there is a high degree of correlation / collinearity in the variables the covariance could be close to a singularity (the determinant near zero). So it is recommended in statistics books to remove those highly correlated variables from the data matrix and to calculate the covariance matrix again until having a viable matrix that can be inverted.

This is my question: how do you determine the correlation in the variables when you have two groups? My intuition tells me that you find the correlation matrix directly from your data matrix and you use this correlation matrix to determine which variables to eliminate.

On the other hand, in a two-sample test you have a covariance matrix that is pooled: a weighted sum of two matrices. Should you find then the highly correlated variables from the covariance matrix of each one of the two groups and then eliminate them all from the data matrix?

Which option is correct?

-
As stated the question doesn't make sense. "So it is recommended in statistics books" can you give an example? I suspect a misunderstanding. –  user603 Jan 26 '13 at 3:39

## 1 Answer

The pooled matrix is the one that you need to invert, so that is the one that you should examine for high correlations.

However, what if you have 2 variables that are highly correlated with each other and several other variables that are fairly independent of those 2 and each other. And what if the two groups are identical on all of the variables other than the 1st 2, but different on the 1st 2 in the direction perpendicular to their covariance? this means that you have a meaningful and significant difference, but removing the correlated variables (or even just one of them) would remove the difference.

-