Tutorials › Statistical Theory I - Probability and Distribution Theory › Centering and Orthogonal Contrasts for Normal Vectors

Gaussian Quadratic Forms · Tutorial 766 of 994

Centering and Orthogonal Contrasts for Normal Vectors

Learn how centering and orthogonal contrasts split a normal vector into independent mean-direction and residual components with explicit chi-square distributions.

Advanced 11 min read

What You'll Learn

  • Write the projection matrices for the constant-vector direction and its orthogonal complement.
  • Express centering as an orthogonal projection and identify its rank and degrees of freedom.
  • Construct an orthonormal basis of contrasts and relate its coordinates to the centered component.
  • Derive the independent chi-square laws for the two projected squared lengths.
  • Extend the laws to a normal vector whose mean is not constant.
  • Recognize why orthogonality alone does not ensure independence outside the isotropic normal setting.

Introduction

For a vector of measurements, centering removes the part that points in the constant-vector direction: the direction in which every coordinate changes by the same amount. The remaining component consists of contrasts, which compare coordinates while summing to zero. For an isotropic normal vector, these two pieces are not merely geometrically perpendicular; they are independent, and their squared lengths have chi-square distributions after scaling.

This connection is useful whenever a Gaussian sum of squares is split into a component along a specified direction and a component orthogonal to it. The key is to identify the two projection matrices, then express the normal vector in an orthonormal coordinate system adapted to those projections.

The Constant-Vector Projection and Centering

Let \(n\geq 2\), and let \(\mathbf{1}\in\mathbb{R}^n\) denote the vector whose entries are all one. The unit vector in the constant-vector direction is \(e=\mathbf{1}/\sqrt{n}\). The orthogonal projection onto this direction and the projection onto its orthogonal complement are

$$ P=ee'=\frac{1}{n}\mathbf{1}\mathbf{1}',\qquad M=I_n-P. $$

The matrix \(P\) is symmetric and idempotent: \(P'=P\) and \(P^2=P\). The same is true of \(M\). Also \(PM=MP=0\) and \(P+M=I_n\). The range of \(P\) is the one-dimensional space spanned by \(\mathbf{1}\); the range of \(M\) is the \((n-1)\)-dimensional space of vectors whose coordinates sum to zero.

Definition: For \(x=(x_1,\ldots,x_n)'\), the constant-direction component is \(Px\), and the centered component is \(Mx\). Explicitly, \(Px=\bar{x}\mathbf{1}\), where \(\bar{x}=n^{-1}\sum_{i=1}^n x_i\), and \(Mx=x-\bar{x}\mathbf{1}\). A contrast is a linear combination of the coordinates whose coefficients sum to zero.

These are orthogonal components, so \(x' x=\|Px\|^2+\|Mx\|^2\). In particular, \(\|Px\|^2=n\bar{x}^{\,2}\), while \(\|Mx\|^2=\sum_{i=1}^n(x_i-\bar{x})^2\). The latter is a squared length in a space of dimension \(n-1\), not \(n\).

Worked Example: Computing the Two Components

Take \(x=(2,4,1,5)'\). Its coordinate average is \(\bar{x}=(2+4+1+5)/4=3\), so

$$ Px=(3,3,3,3)',\qquad Mx=(-1,1,-2,2)'. $$

The squared lengths are \(\|Px\|^2=3^2+3^2+3^2+3^2=36\) and \(\|Mx\|^2=1+1+4+4=10\). Their sum is \(46\), which agrees with \(\|x\|^2=2^2+4^2+1^2+5^2=46\). The centered entries sum to \(-1+1-2+2=0\), as required.

Orthonormal Contrasts

Choose an \(n\times(n-1)\) matrix \(C\) whose columns form an orthonormal basis of the space perpendicular to \(\mathbf{1}\). Thus \(C'C=I_{n-1}\) and \(C'\mathbf{1}=0\). Such a basis exists by choosing a basis for that subspace and orthonormalizing it. Its projection matrix is \(CC'=M\). Consequently, the contrast coordinates \(C'x\) determine the centered component, and

$$ \|Mx\|^2=x'Mx=x'CC'x=\|C'x\|^2. $$

This gives \(n-1\) orthonormal coordinates for the centered component. The particular contrast basis may vary, but the projection \(M\) and the squared length \(\|Mx\|^2\) do not.

Worked Example: A Helmert Contrast Basis

For \(n=4\), one orthonormal basis consisting of the constant direction followed by three contrasts is

$$ e=\frac{1}{2}(1,1,1,1)',\quad c_1=\frac{1}{\sqrt{2}}(1,-1,0,0)',\quad c_2=\frac{1}{\sqrt{6}}(1,1,-2,0)',\quad c_3=\frac{1}{\sqrt{12}}(1,1,1,-3)'. $$

Each contrast sums to zero. Their squared lengths are respectively \(2/2=1\), \(6/6=1\), and \(12/12=1\). Their pairwise dot products are zero: for example, \(c_1'c_2=(1-1)/\sqrt{12}=0\), \(c_1'c_3=(1-1)/\sqrt{24}=0\), and \(c_2'c_3=(1+1-2)/\sqrt{72}=0\). Each is also perpendicular to \(e\), since its entries sum to zero. Together, these four vectors therefore form an orthonormal basis of \(\mathbb{R}^4\).

For the vector \(x=(2,4,1,5)'\), the coordinates in the constant and contrast directions are

$$ e'x=6,\qquad c_1'x=-\sqrt{2},\qquad c_2'x=\frac{4}{\sqrt{6}},\qquad c_3'x=-\frac{4}{\sqrt{3}}. $$

The constant-direction squared length is \(6^2=36\). The contrast-coordinate squares sum to \(2+16/6+16/3=2+8/3+16/3=10\), the centered squared length calculated above.

Independent Chi-Square Laws for a Normal Vector

Definition: A random variable has a noncentral chi-square distribution with \(r\) degrees of freedom and noncentrality parameter \(\lambda\), written \(\chi^2_r(\lambda)\), if it has the distribution of \(\sum_{j=1}^r Z_j^2\), where the \(Z_j\) are independent normal random variables with variance one and means \(\delta_j\), with \(\lambda=\sum_{j=1}^r\delta_j^2\). When \(\lambda=0\), this is the central chi-square distribution \(\chi^2_r\).

The following result applies more generally than the equal-mean case. It identifies how the mean vector determines the noncentrality in each subspace.

Theorem: Let \(X\sim N_n(\eta,\sigma^2 I_n)\), where \(\eta\in\mathbb{R}^n\), \(\sigma^2>0\), and \(n\geq2\). Then
$$ \frac{\|PX\|^2}{\sigma^2}\sim\chi^2_1\left(\frac{\|P\eta\|^2}{\sigma^2}\right),\qquad \frac{\|MX\|^2}{\sigma^2}\sim\chi^2_{n-1}\left(\frac{\|M\eta\|^2}{\sigma^2}\right), $$

and these two random variables are independent. In particular, if \(\eta=\mu\mathbf{1}\), then \(M\eta=0\) and \(\|P\eta\|^2=n\mu^2\), giving

$$ \frac{\|PX\|^2}{\sigma^2}\sim\chi^2_1\left(\frac{n\mu^2}{\sigma^2}\right),\qquad \frac{\|MX\|^2}{\sigma^2}\sim\chi^2_{n-1}, $$

independently. The centered component has a central chi-square law even when the common mean \(\mu\) is nonzero.

Proof. Form the orthogonal matrix \(Q=[e\ C]\), whose first column is \(e\) and whose remaining columns are the orthonormal contrasts. Set \(Z=Q'X\). An orthogonal transformation of a multivariate normal vector is multivariate normal, so

$$ Z\sim N_n(Q'\eta,\sigma^2 Q'Q)=N_n(Q'\eta,\sigma^2 I_n). $$

A multivariate normal vector with diagonal covariance matrix has independent coordinates. More explicitly, its density factors into the product of the univariate normal densities, since its covariance is \(\sigma^2 I_n\). Thus \(Z_1=e'X\) and the contrast coordinates \(Z_2,\ldots,Z_n\) are independent, with variance \(\sigma^2\) each.

The projection onto the constant direction is \(PX=eZ_1\), so \(\|PX\|^2=Z_1^2\). Its scaled value is the square of a variance-one normal coordinate with mean \(e'\eta/\sigma\). By the definition above, it has a \(\chi^2_1((e'\eta)^2/\sigma^2)\) distribution. Since \(P=ee'\), \((e'\eta)^2=\|P\eta\|^2\).

The centered projection has contrast coordinates \(C'X=(Z_2,\ldots,Z_n)'\), and \(\|MX\|^2=\|C'X\|^2\). After division by \(\sigma^2\), it is the sum of squares of \(n-1\) independent variance-one normal coordinates with means given by \(C'\eta/\sigma\). Their squared means sum to

$$ \frac{\|C'\eta\|^2}{\sigma^2} =\frac{\eta'CC'\eta}{\sigma^2} =\frac{\eta'M\eta}{\sigma^2} =\frac{\|M\eta\|^2}{\sigma^2}. $$

This gives the stated noncentral chi-square distribution for the centered component. The constant-direction coordinate and the contrast coordinates are independent, so their functions \(\|PX\|^2\) and \(\|MX\|^2\) are independent as well. If \(\eta=\mu\mathbf{1}\), then \(M\eta=0\), while \(P\eta=\eta\) and \(\|\eta\|^2=n\mu^2\). Substitution gives the equal-mean case. \(\square\)

Worked Example: Equal Means Give a Central Centered Sum of Squares

Suppose \(X\sim N_4(1.5\mathbf{1},4I_4)\). Here \(n=4\), \(\mu=1.5\), and \(\sigma^2=4\). The noncentrality parameter for the constant-direction squared length is

$$ \frac{n\mu^2}{\sigma^2}=\frac{4(1.5)^2}{4}=2.25. $$

Therefore \(\|PX\|^2/4\sim\chi^2_1(2.25)\). The mean vector is entirely in the constant-vector direction, so \(M\eta=0\); hence \(\|MX\|^2/4\sim\chi^2_3\). The two scaled squared lengths are independent. The degrees of freedom of the centered component are three because the contrast space has dimension \(4-1=3\).

Worked Example: A Nonconstant Mean Shifts Both Components

Let \(X\sim N_3(\eta,4I_3)\) with \(\eta=(1,1,3)'\). The average of the entries of \(\eta\) is \(5/3\), so

$$ P\eta=(5/3,5/3,5/3)',\qquad M\eta=(-2/3,-2/3,4/3)'. $$

The squared lengths are \(\|P\eta\|^2=3(25/9)=25/3\) and \(\|M\eta\|^2=(4+4+16)/9=8/3\). Dividing by \(\sigma^2=4\) gives noncentrality parameters \(25/12\) and \(2/3\), respectively. Thus

$$ \frac{\|PX\|^2}{4}\sim\chi^2_1(25/12),\qquad \frac{\|MX\|^2}{4}\sim\chi^2_2(2/3), $$

and the two variables are independent. The centered component is noncentral here because the mean vector is not constant: its contrast component \(M\eta\) is nonzero. As a check, the noncentrality parameters add to \(25/12+2/3=11/4=\|\eta\|^2/4\), consistent with the orthogonal decomposition of \(\eta\).

Why the Decomposition Matters

The projection view separates geometry from distribution. The matrix \(P\) identifies the direction shared by all coordinates; \(M\) identifies the contrasts that remain after removing that direction. Under covariance \(\sigma^2I_n\), an orthonormal change of coordinates preserves the covariance matrix, so the coordinates in these perpendicular subspaces are independent. The resulting degrees of freedom are the dimensions of the subspaces: one for the constant direction and \(n-1\) for the contrasts.

A common mistake is to argue that perpendicular projections are independent simply because their covariance is zero. Zero covariance alone does not imply independence for arbitrary random vectors. In this result, independence follows because the vector is jointly normal and its covariance is isotropic; in the proof, the adapted normal coordinates have diagonal covariance and their joint density factors. Without the stated normal and covariance assumptions, the chi-square laws and independence need not hold.

Another error is to assign \(n\) degrees of freedom to the centered squared length. The centered vectors satisfy one linear constraint, namely that their entries sum to zero, so they occupy an \((n-1)\)-dimensional space. Finally, \(\|PX\|^2\) is \(n\) times the square of the coordinate average, not just the square of that average.

Key takeaway: For an isotropic normal vector, the projection onto the constant-vector direction and the centered projection are independent. Their scaled squared lengths have one and \(n-1\) degrees of freedom, respectively; each component of the mean vector determines the corresponding noncentrality.

Check Your Understanding

Use the projection identities and theorem to answer the following questions.

  1. For \(n=5\), what are the ranks of \(P\) and \(M\), and what is the degrees-of-freedom parameter for the centered squared length?
  2. If \(X\sim N_4(2\mathbf{1},9I_4)\), find the noncentrality parameter for \(\|PX\|^2/9\). Is \(\|MX\|^2/9\) central or noncentral?
  3. Why does \(C'x\) contain \(n-1\) contrast coordinates when \(C'\mathbf{1}=0\) and \(CC'=M\)?
  4. For a general mean vector \(\eta\), which part of \(\eta\) determines the noncentrality of the centered squared length?
  5. What conditions in the theorem justify independence of the two projected squared lengths?