Variance-Covariance Matrix

This lesson explains how to use matrix methods to generate a variance-covariance matrix from a matrix of raw data.

Variance

Variance is a measure of the variability or spread in a set of data. Mathematically, it is the average squared deviation from the mean score. We use the following formula to compute variance.

Var(X) = Σ ( Xi - X )2 / N = Σ xi2 / N

where

N is the number of scores in a set of scores
X is the mean of the N scores.
Xi is the ith raw score in the set of scores
xi is the ith deviation score in the set of scores
Var(X) is the variance of all the scores in the set

Covariance

Covariance is a measure of the extent to which corresponding elements from two sets of ordered data move in the same direction. We use the following formula to compute covariance.

Cov(XY) = Σ ( Xi - X ) ( Yi - Y ) / N = Σ xiyi / N

where

N is the number of scores in each set of data
X is the mean of the N scores in the first data set
Xi is the ithe raw score in the first set of scores
xi is the ith deviation score in the first set of scores
Y is the mean of the N scores in the second data set
Yi is the ithe raw score in the second set of scores
yi is the ith deviation score in the second set of scores
Cov(XY) is the covariance of corresponding scores in the two sets of data

Variance-Covariance Matrix

Variance and covariance are often displayed together in a variance-covariance matrix, (aka, a covariance matrix). The variances appear along the diagonal and covariances appear in the off-diagonal elements, as shown below.

V    =   
Σ x12 / N     Σ x1 x2 / N     . . .     Σ x1 xc / N  
Σ x2 x1 / N     Σ x22 / N     . . .     Σ x2 xc / N
. . .     . . .     . . .     . . .
Σ xc x1 / N     Σ xc x2 / N     . . .     Σ xc2 / N

where

V is a c x c variance-covariance matrix
N is the number of scores in each of the c data sets
xi is a deviation score from the ith data set
Σ xi2 / N is the variance of elements from the ith data set
Σ xi xj / N is the covariance for elements from the ith and jth data sets

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值