810 841 Suppose the matrix X= 1094 532 890 468 715 1124 1426 describes some collected data in which each row 685 corresponds to a data point. Determine the vector of sample means, the covariance matrix, the eigenvalues of the covariance matrix, and the associated orthonormal eigenvectors. Use these to determine the first principal component. What proportion of the total variance does the first principal component account for?

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question
## Principal Component Analysis (PCA) Example

Suppose the matrix \( X = \begin{bmatrix}
810 & 715 \\
841 & 1124 \\
1094 & 1426 \\
532 & 685 \\
890 & 468
\end{bmatrix} \) describes some collected data in which each row corresponds to a data point. 

### Task:
1. Determine the vector of sample means.
2. Calculate the covariance matrix of the data.
3. Compute the eigenvalues and eigenvectors of the covariance matrix.
4. Use these to determine the first principal component.
5. Analyze what proportion of the total variance the first principal component accounts for.

### Steps:

**Step 1: Vector of Sample Means**
The vector of sample means is found by calculating the mean of each column in the matrix \(X\).

**Step 2: Covariance Matrix**
The covariance matrix measures how much the dimensions vary from the mean with respect to each other. It is computed as:
\[ 
\text{Cov}(X) = \frac{1}{n-1} (X - \mu)^T (X - \mu) 
\]
where \( \mu \) is the vector of sample means.

**Step 3: Eigenvalues and Eigenvectors of the Covariance Matrix**
Eigenvalues represent the magnitude of the variance in the direction of the corresponding eigenvector. Eigenvectors are the principal components. They are found by solving:
\[ 
\text{Cov}(X) v = \lambda v 
\]
where \( \lambda \) is an eigenvalue and \( v \) is an eigenvector.

**Step 4: First Principal Component**
The first principal component is the eigenvector corresponding to the largest eigenvalue. This principal component captures the most variance in the data.

**Step 5: Proportion of Total Variance**
The proportion of the total variance that the first principal component accounts for is given by:
\[ 
\frac{\lambda_1}{\sum \lambda_i} 
\]
where \( \lambda_1 \) is the largest eigenvalue.

### Example Calculation (Hypothetical Values):

1. **Sample Means:**
Suppose the sample means are \(\bar{X} = [833.4, 883.6]\).

2. **Covariance Matrix:**
The covariance matrix might look like this:
\[ 
\text{Cov}(X) =
Transcribed Image Text:## Principal Component Analysis (PCA) Example Suppose the matrix \( X = \begin{bmatrix} 810 & 715 \\ 841 & 1124 \\ 1094 & 1426 \\ 532 & 685 \\ 890 & 468 \end{bmatrix} \) describes some collected data in which each row corresponds to a data point. ### Task: 1. Determine the vector of sample means. 2. Calculate the covariance matrix of the data. 3. Compute the eigenvalues and eigenvectors of the covariance matrix. 4. Use these to determine the first principal component. 5. Analyze what proportion of the total variance the first principal component accounts for. ### Steps: **Step 1: Vector of Sample Means** The vector of sample means is found by calculating the mean of each column in the matrix \(X\). **Step 2: Covariance Matrix** The covariance matrix measures how much the dimensions vary from the mean with respect to each other. It is computed as: \[ \text{Cov}(X) = \frac{1}{n-1} (X - \mu)^T (X - \mu) \] where \( \mu \) is the vector of sample means. **Step 3: Eigenvalues and Eigenvectors of the Covariance Matrix** Eigenvalues represent the magnitude of the variance in the direction of the corresponding eigenvector. Eigenvectors are the principal components. They are found by solving: \[ \text{Cov}(X) v = \lambda v \] where \( \lambda \) is an eigenvalue and \( v \) is an eigenvector. **Step 4: First Principal Component** The first principal component is the eigenvector corresponding to the largest eigenvalue. This principal component captures the most variance in the data. **Step 5: Proportion of Total Variance** The proportion of the total variance that the first principal component accounts for is given by: \[ \frac{\lambda_1}{\sum \lambda_i} \] where \( \lambda_1 \) is the largest eigenvalue. ### Example Calculation (Hypothetical Values): 1. **Sample Means:** Suppose the sample means are \(\bar{X} = [833.4, 883.6]\). 2. **Covariance Matrix:** The covariance matrix might look like this: \[ \text{Cov}(X) =
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 41 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman