3. Introduction
Principal components analysis and factor
analysis are techniques for analyzing the
structure of data within a multivariate
framework. In this case the structure of the
relationship between the endogenous
variables only is investigated.
One difficulty is to determine which of the
variables to include in the structure and
therefore which variables to measure.
3
4. • Principal components analysis (PCA) is used
the volatility of a multivariate structure is
being analyzed.
• Factor analysis (FA) is used when the
correlation between the variables of a
multivariate structure is being analyzed.
• Both rely on analyzing the variance/covariance
matrix(C).
4
5. • Mean-variance analysis measures the total
collective variability of a group of variables.
PCA – identifies and ranks the linear
combinations and their contribution to that
total variability. Each linear combination is a
principal component.
• In applying PCA the total variability within
the data is measured by the sum of the
eigenvalues (which will be equal to the sum of
the elements on the leading diagonal of C,
known as its trace)
5
6. Purposes of using principal
components analysis
1. To reduce the dimensionality of the data
from one of many variables to one of a few
variables.
2. Interpretation of the data. Because PCA
identifies the linear combinations of
variables, and orders them according to their
contribution to the total variance of the
original data.
6
7. PCA involves three stages:
1. Find the eigenvectors and their respective
eigenvalues;
2. Construct three matrices Q, D and Q-1;
3. Identify combinations from the eigenvectors,
and rank these combinations in order of
highest to lowest according to eigenvalue.
7
8. Stage 1. Find the eigenvectors and
their respective eigenvalues
The eigenvectors give us the linearly
independent combination of variables, the
principal components, that contribute to the
total variance.
The eigenvalues give us proportion of total risk
accounted for by each principal component.
8
9. Matematically, the eigenvectors xi - each have
scalar λi, where the variance-covariance
matrix C is used to multiply the vector xi:
Cxi=λxi
Let’s consider example:
9
11. We have to normalize these so that the vectors have a
length equal to 1: dividing each component y the square
root of the sum of the squares of each component:
11
12. • Will be as many eigenvectors as there are
variables in the variance-covariance matrix.
Thus in a 2x2 matrix there will be two
eigenvectors, and in an nxn matrix there will
be n eigenvectors.
Find eigenvalues
Multiply eigenvector and matrix C:
12
13. Stage 2. Construct three matrices Q, D
and Q-1
• Matrix Q is constructed from the eigenvectors
by writing them as a columns of the matrix,
ranking them in the order of their respective
eigenvalues.
13
14. • Matrix D is a diagonal matrix, the diagonal
elements being the eigenvalues written in the
same order as the eigenvectors in Q:
14
16. Stage 3. Identify combinations of
variables and rank these combinations
according to eigenvalue.
Consider the variance/covariance matrix from
two assets X and Y. The variance of this two-
asset portfolio can be written as:
16
17. 17
First principal component
Second main component
(corresponds to the smaller eigenvalue)
Total variance equal sum of eigenvalues:
D=0,000271+0,000129=0,0004
First eigenvector contributes:
0,000271/0,0004=0,6775=67,75% of the total variance
24. Laboratory work 7
• Repeat the research conducted in the lecture,
adding at your discretion one (or more)
indicators that correlate with the exchange
rate of the UAH (in relation to USD)
24