0
$\begingroup$

Given that x1 = (9, 9, −18)^T and x2 = (18, 9, 9)^T with eigendecomposition of its sample covariance matrix Σ = cov(X)

enter image description here

How do I calculate the first two principal component direction and the principal component scores of x1 and x2 corresponding to the first two principal component direction

$\endgroup$
1
$\begingroup$

The columns in the first matrix of the expansion corresponds to principal components of yours, corresponding to eigenvalues in the diagonal, in the same order. Note that they're unit norm, i.e. direction vectors. So, the first two largest eigenvectors, i.e. principal components, are the third and first ones; and the scores of $x_i$ are the dot products of $x_i$ with these components.

$\endgroup$
6
  • $\begingroup$ I'm having trouble following this, because you seem to be asserting that the $x_i$ are eigenvectors of $\Sigma$--but they are not. $\endgroup$ – whuber Apr 26 '19 at 13:31
  • $\begingroup$ If i understand this correctly, first principal component direction is 4 and second principal component direction is 2, the scores are (4 2)^T ⋅ (9, 9, −18) ⋅ (4 2) and (4 2)^T ⋅ (18, 9, 9) ⋅ (4 2) respectively? $\endgroup$ – user6308605 Apr 26 '19 at 13:51
  • $\begingroup$ Principal components are vectors with same dimension as your data vectors. First PC is [1/3,2/3, -2/3] for example, which is the third column of the first matrix. @whuber, I corrected a terrible verbal mistake of mine, but I don't seem to understand if it addresses your comment. $\endgroup$ – gunes Apr 26 '19 at 13:59
  • $\begingroup$ It does, thank you: I had hoped to see the term "dot product" appear somewhere in the answer! $\endgroup$ – whuber Apr 26 '19 at 14:00
  • $\begingroup$ Ok so first PC direction is dot product of the following, (9, 9, −18) ^T ⋅ (1/3 2/3 -2/3) ⋅ (9, 9, −18) @whuber. Sorry, I am really struggling to understand the application. $\endgroup$ – user6308605 Apr 26 '19 at 14:07

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.