Tutorials › Statistical Theory I - Probability and Distribution Theory › Worked Problems on Gaussian Linear Combinations

Multivariate Normal Distributions · Tutorial 719 of 994

Worked Problems on Gaussian Linear Combinations

Learn to translate Gaussian mean and covariance specifications into distributions and probabilities for specified linear combinations.

Advanced 10 min read

What You'll Learn

  • Compute the mean and variance of a scalar linear combination from a Gaussian mean vector and covariance matrix.
  • Track covariance cross terms, including their signs and multiplicities.
  • Find the joint mean and covariance of two linear combinations.
  • Convert interval and tail events to standard normal probabilities.
  • Recognize when a calculated linear combination is degenerate.

From a Gaussian Specification to a Probability

A Gaussian vector is often specified by its mean vector and covariance matrix, while a question concerns a particular weighted sum of its components. The practical work is to translate between those descriptions without losing a covariance term or confusing a variance with a standard deviation. Once the linear combination's mean and variance are known, its probability calculations reduce to standard normal probabilities.

The key fact is that a linear combination of a jointly Gaussian vector is Gaussian. The entries of the covariance matrix determine the variance of that combination: diagonal entries contribute squared-coefficient terms, while off-diagonal entries contribute cross terms. The examples below emphasize both the matrix calculation and the final probability calculation.

Setup: Let \(X=(X_1,\ldots,X_p)^\mathsf{T}\) be jointly Gaussian with mean vector \(\mu=E[X]\) and covariance matrix \(\Sigma=\operatorname{Cov}(X)\). For a fixed vector \(a\in\mathbb{R}^p\) and constant \(c\), the scalar linear combination \(Y=c+a^\mathsf{T}X\) has \(E[Y]=c+a^\mathsf{T}\mu\) and \(\operatorname{Var}(Y)=a^\mathsf{T}\Sigma a\). If this variance is positive, \(Y\sim N(c+a^\mathsf{T}\mu,a^\mathsf{T}\Sigma a)\); if it is zero, \(Y\) is constant with probability one.

Here and below, the second argument of \(N(\cdot,\cdot)\) is a variance. For scalar coefficients \(a_1,\ldots,a_p\), the variance can be written componentwise as \(\sum_{i=1}^p a_i^2\operatorname{Var}(X_i)+2\sum_{i<j}a_i a_j\operatorname{Cov}(X_i,X_j)\). The factor of two appears because a symmetric covariance matrix contains each off-diagonal covariance twice in the matrix product.

Why the Formula Works

The affine-image property of Gaussian vectors gives the Gaussian distribution of \(c+a^\mathsf{T}X\). The mean and variance formulas can also be checked directly from expectation and covariance. This direct calculation is useful because it makes the signs of the cross terms explicit.

Result: For jointly Gaussian \(X\sim N_p(\mu,\Sigma)\), fixed vectors \(a,b\in\mathbb{R}^p\), and constants \(c,d\), define \(Y=c+a^\mathsf{T}X\) and \(Z=d+b^\mathsf{T}X\). Their mean vector is \((c+a^\mathsf{T}\mu,\ d+b^\mathsf{T}\mu)^\mathsf{T}\), and their covariance entries are \(\operatorname{Var}(Y)=a^\mathsf{T}\Sigma a\), \(\operatorname{Var}(Z)=b^\mathsf{T}\Sigma b\), and \(\operatorname{Cov}(Y,Z)=a^\mathsf{T}\Sigma b\). The pair \((Y,Z)\) is jointly Gaussian, including when its covariance matrix is singular.

To verify the scalar formulas, linearity of expectation gives \(E[c+a^\mathsf{T}X]=c+a^\mathsf{T}E[X]=c+a^\mathsf{T}\mu\). Since subtracting a constant does not affect variance, \(\operatorname{Var}(Y)=E[(a^\mathsf{T}(X-\mu))^2]\). Expanding the product and using \(E[(X-\mu)(X-\mu)^\mathsf{T}]=\Sigma\) yields \(\operatorname{Var}(Y)=a^\mathsf{T}\Sigma a\).

For the cross-covariance, constants again cancel: \(\operatorname{Cov}(Y,Z)=E[(a^\mathsf{T}(X-\mu))(b^\mathsf{T}(X-\mu))]=a^\mathsf{T}\Sigma b\). The pair \((Y,Z)\) is an affine image of \(X\), so it is jointly Gaussian by the affine-image property. These calculations establish the stated means and covariance entries. \(\square\)

When \(a^\mathsf{T}\Sigma a>0\), standardization gives \(P(Y\leq t)=\Phi((t-c-a^\mathsf{T}\mu)/\sqrt{a^\mathsf{T}\Sigma a})\), where \(\Phi\) is the standard normal cumulative distribution function. For \(r<s\), \(P(r<Y<s)=\Phi((s-E[Y])/\sqrt{\operatorname{Var}(Y)})-\Phi((r-E[Y])/\sqrt{\operatorname{Var}(Y)})\). These expressions follow by applying the increasing transformation \(y\mapsto (y-E[Y])/\sqrt{\operatorname{Var}(Y)}\) to the event.

Worked Probability Problems

Worked Example: A Tail Probability With a Negative Coefficient

Suppose \(X=(X_1,X_2)^\mathsf{T}\sim N_2(\mu,\Sigma)\), where \(\mu=(2,-1)^\mathsf{T}\) and \(\Sigma=\begin{pmatrix}4&1\\1&9\end{pmatrix}\). Find the distribution of \(Y=2X_1-X_2\), then calculate \(P(Y>5+1.1125\sqrt{21})\).

The coefficient vector is \(a=(2,-1)^\mathsf{T}\). The mean is \(E[Y]=a^\mathsf{T}\mu=2(2)+(-1)(-1)=5\). For the variance, using the matrix product,

$$ \operatorname{Var}(Y) = a^\mathsf{T}\Sigma a = 2^2(4)+(-1)^2(9)+2(2)(-1)(1) =16+9-4=21. $$

The negative coefficient makes the cross term negative. Thus \(Y\sim N(5,21)\), with standard deviation \(\sqrt{21}\). The specified cutoff is \(5+1.1125\sqrt{21}\), so its standardized value is exactly \(1.1125\):

$$ \begin{aligned} P(Y>5+1.1125\sqrt{21}) &=1-\Phi\left(\frac{5+1.1125\sqrt{21}-5}{\sqrt{21}}\right)\\ &=1-\Phi(1.1125)\\ &\approx 1-0.8670=0.1330. \end{aligned} $$

The cutoff is approximately \(10.0981\), and the upper-tail probability is about \(0.1330\). The calculation uses the variance \(21\) in the distribution and its square root only when standardizing.

Worked Example: Probability That a Sum Falls in an Interval

Let \(X=(X_1,X_2)^\mathsf{T}\) be jointly Gaussian with mean \((0,0)^\mathsf{T}\) and covariance matrix \(\begin{pmatrix}4&0\\0&3.2\end{pmatrix}\). Find \(P(-2<X_1+X_2<3)\).

Take \(a=(1,1)^\mathsf{T}\), so \(T=X_1+X_2\). Its mean and variance are

$$ \begin{aligned} E[T]&=1(0)+1(0)=0,\\ \operatorname{Var}(T) &=1^2(4)+1^2(3.2)+2(1)(1)(0)\\ &=7.2. \end{aligned} $$

Therefore \(T\sim N(0,7.2)\) and its standard deviation is \(\sqrt{7.2}\approx2.6833\). Standardizing the two endpoints gives \(-2/\sqrt{7.2}\approx-0.7454\) and \(3/\sqrt{7.2}\approx1.1180\). Consequently,

$$ \begin{aligned} P(-2<T<3) &=\Phi\left(\frac{3}{\sqrt{7.2}}\right) -\Phi\left(\frac{-2}{\sqrt{7.2}}\right)\\ &\approx \Phi(1.1180)-\Phi(-0.7454)\\ &\approx 0.8682-0.2280=0.6402. \end{aligned} $$

The order of subtraction matters: the upper endpoint's cumulative probability is reduced by the lower endpoint's cumulative probability. Using the unrounded standardized endpoints, the interval probability is approximately \(0.6402\).

Worked Example: A Three-Component Contrast

Let \(X=(X_1,X_2,X_3)^\mathsf{T}\sim N_3(\mu,\Sigma)\), with \(\mu=(1,0,-2)^\mathsf{T}\) and \(\Sigma=\begin{pmatrix}1&0.5&0\\0.5&4&1\\0&1&2\end{pmatrix}\). For \(T=X_1-X_2+2X_3\), find its distribution and calculate \(P(-5<T<1)\).

The coefficient vector is \(a=(1,-1,2)^\mathsf{T}\). First, \(E[T]=1(1)+(-1)(0)+2(-2)=-3\). For the variance, the diagonal contributions are \(1^2(1)+(-1)^2(4)+2^2(2)=13\). The three off-diagonal contributions, each counted twice, are \(2(1)(-1)(0.5)=-1\), \(2(1)(2)(0)=0\), and \(2(-1)(2)(1)=-4\). Thus

$$ \operatorname{Var}(T)=13-1+0-4=8, \qquad T\sim N(-3,8). $$

The standardized endpoints are \((-5-(-3))/\sqrt{8}=-2/\sqrt{8}\approx-0.7071\) and \((1-(-3))/\sqrt{8}=4/\sqrt{8}\approx1.4142\). Hence

$$ \begin{aligned} P(-5<T<1) &=\Phi(1.4142)-\Phi(-0.7071)\\ &\approx 0.9214-0.2398\\ &\approx 0.6816. \end{aligned} $$

This calculation illustrates why it is safer to list all three covariance contributions explicitly. In particular, the covariance between \(X_2\) and \(X_3\) contributes \(-4\), because the corresponding coefficients have opposite signs.

Two Linear Combinations at Once

Some questions specify more than one linear combination. The covariance formula for two combinations supplies their joint Gaussian parameters, even if the question asks only for their separate distributions. For example, with \(Y=c+a^\mathsf{T}X\) and \(Z=d+b^\mathsf{T}X\), compute \(a^\mathsf{T}\Sigma b\) to determine their covariance. This value is important for describing their joint distribution; marginal means and variances alone do not generally specify their joint law.

The joint covariance matrix is \(\begin{pmatrix}a^\mathsf{T}\Sigma a&a^\mathsf{T}\Sigma b\\b^\mathsf{T}\Sigma a&b^\mathsf{T}\Sigma b\end{pmatrix}\). It may be singular, for example if one combination is an exact linear function of the other. A zero variance for an individual combination means that combination is constant with probability one; it is not a nondegenerate normal variable to be standardized. These cases are consistent with the support properties of Gaussian laws.

Worked Example: Comparing Two Contrasts

Let \(X\sim N_2((0,0)^\mathsf{T},\begin{pmatrix}2&0.5\\0.5&1\end{pmatrix})\). Define \(U=X_1+X_2\) and \(V=X_1-X_2\). Find both marginal distributions and their covariance.

The coefficient vectors are \(a=(1,1)^\mathsf{T}\) and \(b=(1,-1)^\mathsf{T}\). Both means are zero. Their variances are

$$ \begin{aligned} \operatorname{Var}(U)&=2+1+2(0.5)=4,\\ \operatorname{Var}(V)&=2+1-2(0.5)=2. \end{aligned} $$

Thus \(U\sim N(0,4)\) and \(V\sim N(0,2)\). Their covariance is

$$ \operatorname{Cov}(U,V) =a^\mathsf{T}\Sigma b =\operatorname{Cov}(X_1+X_2,X_1-X_2) =\operatorname{Var}(X_1)-\operatorname{Var}(X_2) =2-1=1. $$

The cross-covariance is not zero, so the pair's covariance matrix has off-diagonal entries equal to \(1\). The marginal distributions alone would not reveal that feature of their joint law.

Common Mistakes and a Reliable Calculation Order

A common error is to calculate the variance of a weighted sum by adding only the squared-coefficient times variance terms. That is correct only when all relevant covariances are zero. For example, \(\operatorname{Var}(X_1-X_2)=\operatorname{Var}(X_1)+\operatorname{Var}(X_2)-2\operatorname{Cov}(X_1,X_2)\); the minus sign comes from multiplying the coefficients \(1\) and \(-1\). Ignoring that term can change both the distribution and the resulting probability.

A second frequent error is to use the variance where the standard deviation is required. If \(Y\sim N(m,v)\) with \(v>0\), the standardized value of \(t\) is \((t-m)/\sqrt{v}\), not \((t-m)/v\). A third is to subtract cumulative probabilities in the wrong order for an interval: the probability between \(r\) and \(s\), where \(r<s\), is the CDF at \(s\) minus the CDF at \(r\).

1
Write the coefficient vector.
Represent the requested combination as \(c+a^\mathsf{T}X\), including any constant offset.
2
Calculate the mean.
Evaluate \(c+a^\mathsf{T}\mu\), preserving signs in the coefficients.
3
Calculate the variance.
Use \(a^\mathsf{T}\Sigma a\), or show the diagonal and doubled cross terms separately.
4
Standardize the event.
Divide deviations from the mean by the square root of the variance, then use \(\Phi\) for tail or interval probabilities.
Key takeaway: For a Gaussian linear combination, the mean is transformed by the coefficients once, while the covariance matrix determines the variance through a quadratic form. Keep every cross term, take the square root of the variance when standardizing, and subtract the lower-endpoint CDF from the upper-endpoint CDF for an interval.

Check Your Understanding

For each question, identify the relevant coefficient vector before calculating.

  1. If \(X\) has mean \((1,2)^\mathsf{T}\), covariance \(\begin{pmatrix}3&-1\\-1&2\end{pmatrix}\), and \(Y=2X_1+X_2\), what are the mean and variance of \(Y\)?
  2. For \(Y=X_1-X_2\), explain why the covariance contribution to its variance has a negative sign when \(\operatorname{Cov}(X_1,X_2)>0\).
  3. If \(W\sim N(4,9)\), write the standard normal expression for \(P(1<W<7)\).
  4. For two combinations \(a^\mathsf{T}X\) and \(b^\mathsf{T}X\), which matrix product gives their covariance?
  5. What does \(a^\mathsf{T}\Sigma a=0\) imply about the corresponding Gaussian linear combination?