Why the Variance of a Score Matters
A multivariate observation can be reduced to one number by projecting it onto a chosen direction. That number is called a linear score. Its variance describes how much the observations vary along that direction. To calculate it correctly, both the component variances and the covariances between components matter.
This calculation is a basic part of population principal component analysis. It gives a precise meaning to the variance associated with a direction, without yet deciding which direction should be chosen. The direction will be taken to have unit length, so that its coefficients specify orientation rather than an arbitrary change of scale.
Definition and Covariance-Matrix Formula
The score is a scalar random variable. Centering the vector before projection makes the score have mean zero. The unit-length condition is \(\sum_{i=1}^p a_i^2=1\); it does not require the entries of \(a\) to be positive or to sum to one.
Proof. By linearity of expectation,
Since the score has mean zero, its variance is its expected square. Multiplication of a scalar by its transpose gives
The expectation can be moved between the matrix entries and the fixed vectors because the entries of \(X\) have finite second moments. Thus every entry of the matrix expectation exists, and the finite sums in the matrix product can be evaluated term by term. \(\square\)
Writing the formula by components makes the covariance contributions explicit:
The second equality uses the symmetry \(\operatorname{Cov}(X_i,X_j)=\operatorname{Cov}(X_j,X_i)\). In particular, a calculation that uses only the diagonal entries of \(\Sigma\) is correct only when the off-diagonal covariance terms are zero (or their weighted contributions happen to cancel).
Worked Calculations
Worked Example: A Direction Through Independent Variables
Suppose \(X_1\sim N(0,9)\), \(X_2\sim N(0,4)\), and \(X_3\sim N(0,1)\) are mutually independent. Take \(a=(1/3,\,2/3,\,2/3)^T\). Find the variance of the centered score.
The direction is a unit vector because \(a^Ta=1/9+4/9+4/9=1\). Independence makes each covariance between distinct components zero, so
Therefore the score variance is
The squared coefficients weight the component variances. Here the first component has the largest variance, but the direction also places a substantial coefficient on the second component; both contributions appear in the final value.
Worked Example: Including a Nonzero Covariance
Let \(X\sim N_2(0,\Sigma)\), where \( \Sigma=\begin{pmatrix}4&1\\1&2\end{pmatrix} \), and take \(a=(3/5,\,4/5)^T\). Calculate the variance of the score.
The matrix is a valid covariance matrix: it is symmetric, its first diagonal entry is positive, and its determinant is \(4(2)-1^2=7>0\), so it is positive definite. The direction has unit length since \(9/25+16/25=1\). Direct multiplication gives
The middle term is the contribution from the covariance between \(X_1\) and \(X_2\). It is positive here because both the covariance and the two direction coefficients are positive. Omitting that term would give \(68/25\), not the variance of this score.
Worked Example: Centering Changes the Mean, Not the Variance
Let \(X\sim N_3(\mu,\Sigma)\), with \( \mu=(1,-2,4)^T \), \( \Sigma=\begin{pmatrix}2&1&0\\1&2&0\\0&0&1\end{pmatrix} \), and \(a=(1/\sqrt{3},\,1/\sqrt{3},\,1/\sqrt{3})^T\). Find the mean and variance of both \(a^T(X-\mu)\) and the uncentered score \(a^TX\).
The direction is unit length because its three squared entries sum to \(3(1/3)=1\). The covariance matrix is positive definite: its upper-left block has eigenvalues \(3\) and \(1\), and its remaining diagonal entry is \(1\). For the centered score, the variance is
The two diagonal entries \(2,2\) and \(1\) sum to \(5\), while the covariance between the first two components contributes twice, giving \(5+2=7\) before division by \(3\). The centered score has mean zero. For the uncentered score,
Subtracting a constant changes a variable's mean but not its variance, so \(\operatorname{Var}(a^TX)=\operatorname{Var}(a^T(X-\mu))=7/3\). Thus centering is useful for giving the score mean zero, but is not what determines its variance.
Covariance Between Two Scores
Derivation. Both centered scores have expectation zero. Therefore their covariance is the expectation of their product. Expanding that product and using the definition of \(\Sigma\) yields
All terms are integrable: each product of two components with finite second moments has a finite absolute expectation by the Cauchy–Schwarz inequality. Taking \(b=a\) recovers the variance formula. For distinct directions, the result describes how their scores co-vary, and it underscores that covariance structure acts on the coefficients from both directions.
How to Read the Formula—and a Common Pitfall
The expression \(a^T\Sigma a\) combines the direction coefficients with the full covariance structure. The diagonal entries describe variation in individual coordinates; off-diagonal entries describe whether pairs of coordinates tend to vary together or in opposite ways. The signs of the coefficients also matter: a negative coefficient can reverse the contribution of a positive covariance.
A common mistake is to argue, “The score is a weighted sum, so its variance is just the sum of the squared weights times the individual variances.” That reasoning silently assumes that all distinct components have zero covariance. In general, the correct expansion includes every pairwise term:
Another error is to treat the unit-length condition as \(\sum_i a_i=1\). A direction is normalized by its Euclidean length, \(a^Ta=1\), not by the sum of its entries. Also, replacing \(a\) by \(-a\) reverses every score value but leaves its variance unchanged, because \((-a)^T\Sigma(-a)=a^T\Sigma a\).
The unit convention prevents an arbitrary rescaling of coefficients from changing the numerical scale of the score. It does not itself select a direction or establish that a particular direction is preferable. For any specified direction, the covariance-matrix formula gives its variance directly.
Check Your Understanding
Use the covariance-matrix formula and the role of centering to answer these questions.
- What condition on \(X\) is needed for the covariance matrix and the score variance in this tutorial to be finite?
- For a unit vector \(a\), why can the variance calculation include off-diagonal entries of \(\Sigma\)?
- If \(a^Ta=1\), what is the variance of \(a^T(X-\mu)\) when \(\Sigma=I_p\)?
- Does subtracting \(\mu\) change the variance of \(a^TX\)? Explain.
- Why is a direction with entries summing to one not necessarily a unit direction?