23.1. Random Vectors#

Vectors and matrices give us a compact way of referring to random sequences like X1,X2,,Xn. The algebra of vectors and matrices gives us powerful tools for studying linear combinations of random variables.

In this section we will develop matrix notation for random sequences and then express familiar consequences of linearity of expectation and bilinearity of covariance in matrix notation. The probability theory in this section is not new – it consists of expectation and covariance facts that you have known for some time. But the representation is new and leads us to new insights.

A vector valued random variable, or more simply, a random vector, is a list of random variables defined on the same space. We will think of it as an n×1 column vector.

X = [X1X2Xn]

For ease of display, we will sometimes write X=[X1X2Xn]T where MT is notation for the transpose of the matrix M.

The mean vector of X is μ=[μ1 μ2  μn]T where μi=E(Xi).

The covariance matrix of X is the n×n matrix Σ whose (i,j) element is Cov(Xi,Xj).

The ith diagonal element of Σ is the variance of Xi. The matrix is symmetric because of the symmetry of covariance.

Quick Check

A random vector [XY] has mean vector [00] and covariance matrix [12.4?9].

Which (if any) of X and Y are in standard units? Pick one option.

(i) Only X

(ii) Only Y

(iii) Both X and Y

(iv) Neither X nor Y

(v) There is not enough information to answer.

Quick Check

(Continuing the Quick Check above) Fill in the ? in the covariance matrix.

Quick Check

(Continuing the Quick Check above) Find the correlation between X and Y.

Click to show

23.1.1. Linear Transformation: Mean Vector#

Let A be an m×n numerical matrix and b an m×1 numerical vector. Consider the m×1 random vector Y=AX+b.

We will call this a “linear transformation” of X though in fact it is an affine transformation, that is, a composition of the linear transformation AX and the translation by b.

This representation gives us a compact way to describe multiple linear combinations of X simultaneously. For example, if b=[0  0  0]T and

A = [10000110001n1n1n1n1n]

then

AX+b = [X1X1X2X¯n]

In general, if Y=AX+b then the ith element of Y is

Yi = AiX+b(i)

where Ai denotes the ith row of A and b(i) denotes the ith element of b. Written longhand,

Yi = ai1X1+ai2X2++ainXn+bi

where aij is the (i,j) entry of A and bi=b(i).

Thus Yi is a linear combination of the elements of X. Therefore by linearity of expectation,

E(Yi) = Aiμ+b(i)

Let μY be the mean vector of Y. Then by the calculation above,

μY = Aμ+b
Click to show

23.1.2. Linear Transformation: Covariance Matrix#

Cov(Yi,Yj) can be calculated using bilinearity of covariance.

Cov(Yi,Yj) = Cov(AiX,AjX)= Cov(k=1naikXk,l=1najlXl)= k=1nl=1naikajlCov(Xk,Xl)= k=1nl=1naikCov(Xk,Xl)tlj     where tlj=AT(l,j)

This is the (i,j) element of AΣAT. So if ΣY denotes the covariance matrix Y, then

ΣY = AΣAT
Click to show

Let us see what this formula implies for the variance of a single component of Y.

Any component of Y is a linear combination of the elements of X and hence can be written as aX+b for some 1×n vector a and some real number b.

The variance of this component of Y is a diagonal element of ΣY. By our calculation above, the diagonal element is equal to aΣaT.

23.1.3. Constraints on Σ#

We know that Σ has to be symmetric. Also, no matter what A is, the elements on the main diagonal of ΣY must all be non-negative as they are the variances of the elements of Y.

By the observation above, this implies

aΣaT  0    for all 1×n vectors a

That is, Σ must be positive semidefinite.

Usually, we will be working with covariance matrices that are positive definite, defined by

aΣaT > 0    for all 1×n vectors a

The reason is that if aΣaT=0 for some a, then the linear transformation aX has variance 0 and hence is a constant. Hence you can write some of the elements of X as linear combinations of the others and just study a reduced set of elements.