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=⎣⎡X1X2⋮Xn⎦⎤
For ease of display, we will sometimes write X=[X1X2…Xn]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.
Answer
(i)
Answer
2.4
Answer
0.8
from IPython.display import YouTubeVideo
YouTubeVideo('yE1FWjup0WE')
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=[000]T and
A=⎣⎡11n10−1n100n100n1⋯⋯⋯00n1⎦⎤
then
AX+b=⎣⎡X1X1−X2Xˉn⎦⎤
In general, if Y=AX+b then the ith element of Y is
Yi=Ai∗X+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,
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≥0for 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>0for 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.