Tutorials › Statistical Theory I - Probability and Distribution Theory › Noncentral Chi-Square Laws from Gaussian Projections

Gaussian Quadratic Forms · Tutorial 752 of 994

Noncentral Chi-Square Laws from Gaussian Projections

Learn why a rank-\(r\) orthogonal projection of an isotropic Gaussian vector yields a noncentral chi-square variable, and how to compute its degrees of freedom and noncentrality parameter.

Advanced 10 min read

What You'll Learn

  • Define the noncentral chi-square distribution through shifted standard normal squares.
  • Prove the projection result using orthonormal coordinates for the subspace.
  • Calculate the noncentrality parameter from the projected mean.
  • Derive the moment-generating function, mean, and variance.
  • Distinguish a nonzero ambient mean from a nonzero projected mean.
  • Recognize when covariance scaling changes the quadratic form.

Why the Mean Component Matters

A squared projection of a standard Gaussian vector onto an \(r\)-dimensional subspace is a sum of \(r\) independent squared standard normal variables, so it has a central chi-square distribution with \(r\) degrees of freedom. If the Gaussian vector has a nonzero mean, the projected coordinates are shifted. The resulting sum of squares is generally noncentral chi-square. Its noncentrality parameter measures the squared size of the mean component that lies in the subspace—not the squared size of the entire mean vector.

This distinction is useful when a quadratic form represents a sum of squares in selected directions, such as a fitted or contrast subspace. The geometry identifies both the degrees of freedom and the part of the mean that affects the distribution.

Definition and Projection Setup

Definition: Let \(G_1,\ldots,G_r\) be independent \(N(0,1)\) random variables, and let \(a_1,\ldots,a_r\) be fixed real numbers. The sum \(W=\sum_{i=1}^r(G_i+a_i)^2\) has a noncentral chi-square distribution with \(r\) degrees of freedom and noncentrality parameter \(\lambda=\sum_{i=1}^r a_i^2\). Write \(W\sim\chi^2_r(\lambda)\). When \(\lambda=0\), this is the central chi-square distribution \(\chi^2_r\).

Consider a Gaussian vector \(X\sim N_p(\mu,I_p)\), where \(I_p\) is the \(p\times p\) identity matrix. Let \(P\) be the orthogonal projection matrix onto a subspace of dimension \(r\). Thus \(P=P'\), \(P^2=P\), and \(\operatorname{rank}(P)=r\). The squared length of the projected vector is \(Q=X'PX=\|PX\|^2\).

Theorem: If \(X\sim N_p(\mu,I_p)\) and \(P\) is a symmetric idempotent matrix of rank \(r\), then \(X'PX\sim\chi^2_r(\lambda)\), where \(\lambda=\mu'P\mu=\|P\mu\|^2\).

The rank determines the number of projected coordinates and therefore the degrees of freedom. The noncentrality parameter is the squared length of the projection of \(\mu\), because \(P\mu\) is the mean vector in the directions retained by the projection.

Proof in Orthonormal Coordinates

Choose a \(p\times r\) matrix \(U\) whose columns form an orthonormal basis for the subspace onto which \(P\) projects. Then \(U'U=I_r\) and \(P=UU'\). Extend those columns to an orthonormal basis of \(\mathbb{R}^p\), giving an orthogonal matrix \(O\) whose first \(r\) columns are the columns of \(U\).

1
Rotate the coordinates.
Write \(Z=X-\mu\), so \(Z\sim N_p(0,I_p)\). The density of \(Z\) is proportional to \(\exp(-z'z/2)\). Since an orthogonal transformation preserves \(z'z\) and has absolute Jacobian determinant \(1\), \(O'Z\sim N_p(0,I_p)\). Its coordinates are independent standard normals.
2
Keep the projected coordinates.
The first \(r\) coordinates of \(O'X\) are \(U'X=U'\mu+U'Z\). Thus they are independent normal variables with unit variance and mean components given by \(U'\mu\).
3
Identify the sum of squares.
Because \(P=UU'\), \(X'PX=X'UU'X=\|U'X\|^2\). This is the sum of the squares of the \(r\) independent normal coordinates from Step 2.
4
Compute the parameter.
The sum of squared coordinate means is \((U'\mu)'(U'\mu)=\mu'UU'\mu=\mu'P\mu=\|P\mu\|^2\). By the definition of a noncentral chi-square variable, the claimed distribution follows. \(\square\)

This proof also shows why a particular choice of basis does not affect the answer. The basis changes the list of projected mean coordinates, but not their total squared length \(\|P\mu\|^2\).

Worked Examples

Worked Example: A Rank-Two Projection in Three Dimensions

Let \(X\sim N_3(\mu,I_3)\), with \(\mu=(1,2,-1)'\). Project onto the plane spanned by the orthonormal vectors \(u=(1,1,0)'/\sqrt{2}\) and \(v=(0,0,1)'\). Find the distribution of the squared projected length.

The projection matrix is \(P=uu'+vv'\). For any \(x=(x_1,x_2,x_3)'\), its projected coordinates along \(u\) and \(v\) are \((x_1+x_2)/\sqrt{2}\) and \(x_3\). Therefore

$$ X'PX=\frac{(X_1+X_2)^2}{2}+X_3^2. $$

The rank is \(2\), so the degrees of freedom are \(2\). The mean coordinates in the plane are

$$ u'\mu=\frac{1+2}{\sqrt{2}}=\frac{3}{\sqrt{2}}, \qquad v'\mu=-1. $$

Consequently,

$$ \lambda=(u'\mu)^2+(v'\mu)^2 =\frac{9}{2}+1=\frac{11}{2}. $$

Thus \(X'PX\sim\chi^2_2(11/2)\). The result uses only the mean components within the plane; the projection discards the direction perpendicular to it.

Worked Example: A One-Dimensional Contrast

Let \(X\sim N_3((2,1,4)',I_3)\), and project onto the line spanned by \(u=(1,-1,0)'/\sqrt{2}\). Find the law of the squared projected length.

The projection is \(P=uu'\), which has rank \(1\). Hence \(X'PX=(u'X)^2=(X_1-X_2)^2/2\). The mean of the projected coordinate is

$$ u'\mu=\frac{2-1}{\sqrt{2}}=\frac{1}{\sqrt{2}}. $$

Its squared value is the noncentrality parameter:

$$ \lambda=\mu'P\mu=(u'\mu)^2=\frac{1}{2}. $$

Therefore \(X'PX\sim\chi^2_1(1/2)\). The third component of \(\mu\) has no effect because the chosen line has zero third coordinate.

Worked Example: A Nonzero Mean Can Still Give a Central Law

Let \(X\sim N_3((0,0,5)',I_3)\), and project onto the plane spanned by the first two coordinate axes. The projection matrix is \(P=\operatorname{diag}(1,1,0)\), with rank \(2\). The quadratic form is \(X'PX=X_1^2+X_2^2\).

The projected mean is \(P\mu=(0,0,0)'\), even though \(\mu\) itself is nonzero. Thus

$$ \lambda=\mu'P\mu=0. $$

It follows that \(X'PX\sim\chi^2_2\), a central chi-square distribution. The mean lies entirely outside the projected subspace, so it does not shift either retained coordinate.

Moment-Generating Function and Moments

The defining representation gives a direct check on the parameterization. For a standard normal \(G\), a fixed real \(a\), and \(t<1/2\), completing the square in the normal density gives

$$ \begin{aligned} E[\exp\{t(G+a)^2\}] &=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} \exp\left(t(g+a)^2-\frac{g^2}{2}\right)\,dg\\ &=(1-2t)^{-1/2} \exp\left(\frac{a^2t}{1-2t}\right). \end{aligned} $$

For the second equality, the exponent is a quadratic in \(g\) with coefficient \(-(1-2t)/2\). Since \(t<1/2\), its integral is finite; shifting the integration variable to complete the square yields the displayed normal integral. Applying this expression to the independent coordinates and multiplying their moment-generating functions gives the following result.

Result: If \(W\sim\chi^2_r(\lambda)\), then for \(t<1/2\),
$$ M_W(t)=E[e^{tW}] =(1-2t)^{-r/2}\exp\left(\frac{\lambda t}{1-2t}\right). $$

For completeness, the mean and variance can be obtained directly from the defining sum. For each term, \(E[(G_i+a_i)^2]=1+a_i^2\). Also, using \(E[G_i]=E[G_i^3]=0\), \(E[G_i^2]=1\), and \(E[G_i^4]=3\), expansion gives \(\operatorname{Var}((G_i+a_i)^2)=2+4a_i^2\). The terms are independent, so their means and variances add:

$$ E[W]=r+\lambda, \qquad \operatorname{Var}(W)=2r+4\lambda. $$

For the projected Gaussian quadratic form, these become \(E[X'PX]=r+\mu'P\mu\) and \(\operatorname{Var}(X'PX)=2r+4\mu'P\mu\). In particular, a nonzero projected mean raises both the mean and the variance relative to the central case.

When Covariance Is a Scalar Multiple of the Identity

If \(X\sim N_p(\mu,\sigma^2 I_p)\) with \(\sigma>0\), the same result applies after dividing by \(\sigma\). Indeed, \(X/\sigma\sim N_p(\mu/\sigma,I_p)\), and

$$ \frac{X'PX}{\sigma^2} \sim \chi^2_r\left(\frac{\mu'P\mu}{\sigma^2}\right). $$

The scaling is essential: \(X'PX\) itself is \(\sigma^2\) times a noncentral chi-square variable, not generally a noncentral chi-square variable in the unit-scale convention used here. For a general covariance matrix, the conclusion does not follow just by inserting that covariance into this formula; the projected coordinates need not have identity covariance.

Common Mistake: Using the Entire Mean

A tempting but incorrect calculation is to set the noncentrality parameter equal to \(\mu'\mu\) whenever \(\mu\ne 0\). The error is that \(X'PX\) only measures components in the range of \(P\). The correct calculation is

$$ \lambda=\mu'P\mu=\|P\mu\|^2, $$

not \(\mu'\mu\). For example, in the third worked example, \(\mu'\mu=25\), but \(P\mu=0\) and the actual noncentrality parameter is \(0\). Compute the projected mean first; then square its length.

Key takeaway: For \(X\sim N_p(\mu,I_p)\) and a rank-\(r\) orthogonal projection \(P\), the quadratic form \(X'PX\) has \(r\) degrees of freedom and noncentrality parameter \(\mu'P\mu\). Degrees of freedom count projected directions; noncentrality measures the mean shift within those directions.

Check Your Understanding

Use the projection matrix and the projected mean to answer each question.

  1. If \(X\sim N_4(\mu,I_4)\) and \(P\) projects onto a three-dimensional subspace, what determines the degrees of freedom of \(X'PX\)?
  2. For a projection matrix \(P\), explain why \(\mu'P\mu=\|P\mu\|^2\).
  3. Suppose \(P=\operatorname{diag}(1,0,0)\) and \(\mu=(0,3,4)'\). What is the noncentrality parameter, and is the projected quadratic form central or noncentral?
  4. If \(X\sim N_p(\mu,\sigma^2 I_p)\), what scaling gives a noncentral chi-square variable, and what is its noncentrality parameter?
  5. For \(W\sim\chi^2_r(\lambda)\), state its mean and variance and describe how both differ from the central case when \(\lambda>0\).