177k views
1 vote
Suppose A₀ holds these 2 measurements of 5 samples:

A₀= [ 5 4 3 2 1 ]
[-1 1 0 1 -1]
Find the average of each row and subtract it to produce the centered matrix A. Compute the sample covariance matrix S = AAᵗ/(n - 1) and find its eigenvalues λ₁ an λ₂. What line through the origin is closest to the 5 samples in columns of A?

User Padu
by
8.4k points

1 Answer

1 vote

a. Centered matrix A is obtained by subtracting row-wise averages from A₀:


\[ A = \begin{bmatrix} 2 & 1 & 0 & -1 & -2 \\ -1 & 1 & 0 & 1 & -1 \end{bmatrix} \]

b. Sample covariance matrix
\(S = (AA^T)/(4)\):


\[ S = \begin{bmatrix} 2.5 & 0 \\ 0 & 2 \end{bmatrix} \]

c. Eigenvalues of S:
\( \lambda_1 = 2.5, \lambda_2 = 2 \). The line through the origin closest to the samples aligns with the second row of A.

a. To center matrix A₀, find the row-wise averages and subtract them from each element:


\[ A = \begin{bmatrix} 2 & 1 & 0 & -1 & -2 \\ -1 & 1 & 0 & 1 & -1 \end{bmatrix} \]

b. Compute the sample covariance matrix
\( S = (AA^T)/(n-1) \):


\[ S = (AA^T)/(4) = \begin{bmatrix} 2.5 & 0 \\ 0 & 2 \end{bmatrix} \]

c. Find eigenvalues
(\( \lambda_1, \lambda_2 \))of S by solving
\( \text{det}(S - \lambda I) = 0 \):


\[ \text{det}\left(\begin{bmatrix} 2.5-\lambda & 0 \\ 0 & 2-\lambda \end{bmatrix}\right) = 0 \]

This yields
\( \lambda_1 = 2.5, \lambda_2 = 2 \).

The line through the origin closest to the samples corresponds to the eigenvector associated with the smallest eigenvalue. In this case, it is the line along the second row of the centered matrix A.

Suppose A₀ holds these 2 measurements of 5 samples: A₀= [ 5 4 3 2 1 ] [-1 1 0 1 -1] Find-example-1
User Notorious
by
8.5k points