Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

As a preliminary to regression, we will express bilinearity in a compact form using matrix notation. The results of this section are not new. They are simply restatements of familiar results about variances and covariances, using new notation and matrix representations.

Let X\mathbf{X} be a p×1p \times 1 vector of predictor variables. We know that for an m×pm \times p matrix A\mathbf{A} and an m×1m \times 1 vector b\mathbf{b},

Var(AX+b) = AΣXATVar(\mathbf{AX} + \mathbf{b}) ~ = ~ \mathbf{A}\boldsymbol{\Sigma}_\mathbf{X} \mathbf{A}^T

The results below are special cases of this.

25.1.1Linear Combinations

To define two generic linear combinations of elements of X\mathbf{X}, let

A = [a1a2apc1c2cp] = [aTcT]      and      b = [bd]\mathbf{A} ~ = ~ \begin{bmatrix} a_1 & a_2 & \cdots & a_p \\ c_1 & c_2 & \cdots & c_p \end{bmatrix} ~ = ~ \begin{bmatrix} \mathbf{a}^T \\ \mathbf{c}^T \end{bmatrix} ~~~~~~ \text{and} ~~~~~~ \mathbf{b} ~ = ~ \begin{bmatrix} b \\ d \end{bmatrix}

Then

AX+b = [a1X1+a2X2++apXp+bc1X1+c2X2++cpXp+d] = [aTX+bcTX+d]\mathbf{AX} + \mathbf{b} ~ = ~ \begin{bmatrix} a_1X_1 + a_2X_2 + \cdots + a_pX_p + b \\ c_1X_1 + c_2X_2 + \cdots + c_pX_p + d \end{bmatrix} ~ = ~ \begin{bmatrix} \mathbf{a}^T\mathbf{X} + b \\ \mathbf{c}^T\mathbf{X} + d \end{bmatrix}

25.1.2Covariance of Two Linear Combinations

The covariance of the two linear combinations is the (1,2)(1, 2) element of the covariance matrix of AX+b\mathbf{AX} + \mathbf{b}, which is the (1,2)(1, 2) element of AΣXAT\mathbf{A}\boldsymbol{\Sigma}_\mathbf{X}\mathbf{A}^T.

Cov(aTX+b,cTX+d) = aTΣXcCov(\mathbf{a}^T\mathbf{X} + b, \mathbf{c}^T\mathbf{X} + d) ~ = ~ \mathbf{a}^T \boldsymbol{\Sigma}_\mathbf{X} \mathbf{c}

25.1.3Variance of a Linear Combination

The variance of the first linear combination is the (1,1)(1, 1) element of AΣXAT\mathbf{A}\boldsymbol{\Sigma}_\mathbf{X}\mathbf{A}^T.

Var(aTX+b) = aTΣXaVar(\mathbf{a}^T\mathbf{X} + b) ~ = ~ \mathbf{a}^T \boldsymbol{\Sigma}_\mathbf{X} \mathbf{a}

25.1.4Covariance Vector

To predict YY based on X\mathbf{X} we will need to work with the covariance of YY and each of the elements of X\mathbf{X}. Let

σXi,Y = Cov(Xi,Y)\sigma_{X_i, Y} ~ = ~ Cov(X_i, Y)

and define the covariance vector of X\mathbf{X} and YY to be

ΣX,Y = [σX1,YσX2,YσXp,Y]\boldsymbol{\Sigma}_{\mathbf{X}, Y} ~ = ~ \begin{bmatrix} \sigma_{X_1, Y} \\ \sigma_{X_2, Y} \\ \vdots \\ \sigma_{X_p, Y} \end{bmatrix}

It will be convenient to also have a notation for the transpose of the covariance vector:

ΣY,X = ΣX,YT = [σX1,Y σX2,Y  σXp,Y]\boldsymbol{\Sigma}_{Y, \mathbf{X}} ~ = ~ \boldsymbol{\Sigma}_{\mathbf{X}, Y}^T ~ = ~ [\sigma_{X_1, Y} ~ \sigma_{X_2, Y} ~ \ldots ~ \sigma_{X_p, Y}]

By the linearity of covariance,

Cov(aTX,Y) = aTΣX,YCov(\mathbf{a}^T\mathbf{X}, Y) ~ = ~ \mathbf{a}^T \boldsymbol{\Sigma}_{\mathbf{X}, Y}