Data, Covariance, and Correlation Matrix

Data, Covariance, and Correlation Matrix

Nathaniel E. Helwig Assistant Professor of Psychology and Statistics

University of Minnesota (Twin Cities)

Updated 16-Jan-2017

Nathaniel E. Helwig (U of Minnesota)

Data, Covariance, and Correlation Matrix

Updated 16-Jan-2017 : Slide 1

Copyright

Copyright c 2017 by Nathaniel E. Helwig

Nathaniel E. Helwig (U of Minnesota)

Data, Covariance, and Correlation Matrix

Updated 16-Jan-2017 : Slide 2

Outline of Notes

1) The Data Matrix Definition Properties R code

2) The Covariance Matrix Definition Properties R code

3) The Correlation Matrix Definition Properties R code

4) Miscellaneous Topics Crossproduct calculations Vec and Kronecker Visualizing data

Nathaniel E. Helwig (U of Minnesota)

Data, Covariance, and Correlation Matrix

Updated 16-Jan-2017 : Slide 3

The Data Matrix

The Data Matrix

Nathaniel E. Helwig (U of Minnesota)

Data, Covariance, and Correlation Matrix

Updated 16-Jan-2017 : Slide 4

The Data Matrix Definition

The Organization of Data

The data matrix refers to the array of numbers

x11 x12 ? ? ? x1p

x21 x22 ? ? ? x2p

X = x31

x32

???

x3p

...

...

...

...

xn1 xn2 ? ? ? xnp

where xij is the j-th variable collected from the i-th item (e.g., subject). items/subjects are rows variables are columns

X is a data matrix of order n ? p (# items by # variables).

Nathaniel E. Helwig (U of Minnesota)

Data, Covariance, and Correlation Matrix

Updated 16-Jan-2017 : Slide 5

The Data Matrix Definition

Collection of Column Vectors

We can view a data matrix as a collection of column vectors:

X = x1

x2

???

xp

where xj is the j-th column of X for j {1, . . . , p}.

The n ? 1 vector xj gives the j-th variable's scores for the n items.

Nathaniel E. Helwig (U of Minnesota)

Data, Covariance, and Correlation Matrix

Updated 16-Jan-2017 : Slide 6

The Data Matrix Definition

Collection of Row Vectors

We can view a data matrix as a collection of row vectors:

x1

X=

x2 ...

xn

where xi is the i-th row of X for i {1, . . . , n}.

The 1 ? p vector xi gives the i-th item's scores for the p variables.

Nathaniel E. Helwig (U of Minnesota)

Data, Covariance, and Correlation Matrix

Updated 16-Jan-2017 : Slide 7

The Data Matrix Properties

Calculating Variable (Column) Means

The sample mean of the j-th variable is given by

x?j

=

1 n

n

xij

i =1

= n-11nxj

where 1n denotes an n ? 1 vector of ones xj denotes the j-th column of X

Nathaniel E. Helwig (U of Minnesota)

Data, Covariance, and Correlation Matrix

Updated 16-Jan-2017 : Slide 8

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download