Let us look at three of the questions I asked early in February, and answer two of them.
First, what do we know? What have we done?
We assume that we have data X, with the variables in columns, as usual. In fact, we assume that the data is at least centered, and possibly standardized.
We compute the covariance matrix
then its eigendecomposition
where is the diaginal matrix of eigenvalues. We define the -weighted matrix
Finally, we use A as a transition matrix to define new data Z:
We discovered two things. One, the matrix A is the cross covariance between Z and X:
I find this interesting, and I suspect that it would jump off the page at me out of either Harman or Jolliffe; that is, I suspect it is written there but it didn’t register.
Two, we discovered that we could find a matrix Ar which is the cross covariance between Zc and Xs. That is, the general relation
specializes to both centered data Xc and standardized data Xs, and gives us
In addition, however, we found a matrix Ar such that
using the new centered data Zc and the old standardized data Xs. Oh, the definition of the matrix Ar was:
where was a diagonal matrix whose entries were the inverse standard deviations of the centered data Xc.
That is, each row of Ac was weighted by the inverse standard deviation to define Ar. And it all worked out because the definition of Ar
was dual to the definition of standardized data, which weighted the columns of Xc:
I will remind you that I find this interesting, but I’m not convinced it is important. I cannot forgive Ar for the fact that it is not a matrix of eigenvectors. I assure you, I could be missing something about Ar.
Anyway, that is what we did.
What were the questions?
- when is A a covariance matrix?
- is v a covariance matrix?
- can we do something similar for constant row sums?
For question 3, I have the feeling there’s something we can do, but I haven’t put the pieces together. It can’t be same as for question 1, because a matrix that weights the rows of the data matrix is not the same size as one that weights the columns (in general). Perhaps we need to look at XXT instead of XTX. But then things don’t drop out if A and Z are defined the same way, so…. This is still open.
For question 1, two partial answers are:
If , i.e. A is formed by weighting the columns of an orthonormal eigenvector matrix v by the , then A is a covariance matrix of the same form as the one from which we got v.
And the construction that gave us Ar (weighting the rows of A) works for arbitrary weights.
Suppose we have a data matrix X. Suppose we compute a “dispersion matrix”, by which I mean a multiple of :
(Of course, is usually 1/(N-1).)
Suppose we do an eigendecomposition of c,
then define a matrix
and finally define new data using A as the transition matrix:
(I’ll remind you that our observations are columns of and ; and a transition matrix applied to new components gives us old components. If you need to, look here.)
I claim that
i.e., that A is the “cross dispersion matrix” between X and Z.
Please note, in particular, that the data X need not be centered.
The proof goes just the way it did before.
We will need a couple of things. From
And also from
(because v is orthogonal and is diagonal).
(If we had started with instead of , we would have ended up with , which is a good thing, since . Things are just a little different because the cross-dispersion in general, and the cross-covariance in particular, are not symmetric.)
This result, that A is the corresponding dispersion matrix between X and Z means that we can say something about Z without ever computing it.
(I’m not particularly fond of that, but then I haven’t been trying to deal with thousands of observations and a hundred variables. I’m used to datasets small enough to hold in my hand, as it were.)
We could verify this, in particular, for the raw data that we used for the previous Basilevsky computations. We knew it was true for centered data or for standardized data, i.e. that it was true for the covariance matrix or the correlation matrix; we have seen now that it is true for an arbitrary dispersion matrix
It didn’t depend on 1/(N-1) or on X being centered. If we do an eigendecomposition of , then .
Well, let’s do it. Here’s the raw data that we used here:
I will take , just so that it can’t be mistaken for anything else (I need some number; let’s make sure that if anything interesting happens, we see it. OK, nothing interesting will happen, not that kind of interesting, anyway.)
Now that I’ve written it once, let me emphasize: the weird expression occurs only because I needed a number for my abstract scaling factor . In retrospect, perhaps I should not have used greek letters for both abstract and numerical.)
We get an eigendecomposition, but all I want right now is , the diagonal matrix of . OK, the eigenvalues are
On second thought, I really should give you the orthonormal eigenvector matrix for reference:
The matrix A is
The new data Z is given by
Finally, the cross-dispersion between Z and X is given by
And that is the same as A, as it should be.
We continue with the answer to question 1. We found that if we do an eigendecomposition of , then .
What about the matrix Ar, found by weighting the rows of A by the inverse standard deviations?
There was nothing special about the inverse standard deviations. If we weight the columns of X by a diagonal matrix , we can find a corresponding matrix Ar.
Let’s work that out. I am going to take weights (1,2,4} in place of the inverse standard deviations. That is, I take the diagonal matrix
and scale the columns of X and the rows of A:
(Perhaps now is a good time to remind you that we can scale the columns of a matrix by post-multiplying it by a diagonal matrix of the scale factors; and we can scale the rows of a matrix by pre-multiplying it by a diagonal matrix.)
i expect that
Compute the RHS:
and that is, indeed, .
So, the construction of Ar using the inverse standard deviations could be done with any set of weights instead, and applied to any dispersion matrix, not just the A = Ac from centered data.
In other words, I know two kinds of transition matrices that are dispersion matrices: A between Z and X, Ar (Ad in this case) between a newer Z and the older X.
I do not have an “iff” result. I can’t guarantee that these are the only kinds of matrices that work.
Question 2. Is v a dispersion matrix?
No, at least not between its new data Z and the old X, i.e. not the way A is. (I wonder if there’s a way to make it happen. Would it ever be worthwhile if it were possible?)
This time, let’s first confirm the failure numerically.
We need new data from v instead of from A. Rather than destroy the Z’s, call the new data Y. We should have
That last equality corresponds to , so we’re good.
Here’s the new data Y from old data X using the transition matrix v:
now compute , i.e. in this case,
and that is to be compared with v – but I’ve already done the algebra, and I know they should have proportional columns, so I took the ratio instead of the difference, i.e. here is , term by term:
Those should look familiar: they are, as they should be, the eigenvalues of :
So the cross-dispersion matrix between X and Y is a column-weighted version of v, and the weights are the eigenvalues.
Time to do the algebra. This time, Y = Xv. We start with the dispersion matrix…
and that’s what we got: the cross-dispersion is the column-weighted v, and the weights are the eigenvalues .