Tutorials › Statistical Theory III - Theories of Inference, Multivariate Methods, and Contingency Tables › Principal Axes and Volume of Confidence Ellipsoids

Confidence and Prediction Regions · Tutorial 249 of 972

Principal Axes and Volume of Confidence Ellipsoids

Use the covariance shape matrix to find a contrast confidence ellipsoid’s principal axes, orientation, and volume.

Intermediate 9 min read

What You'll Learn

  • Connect the exact contrast ellipsoid to its covariance shape matrix
  • Find principal directions and semiaxis lengths from eigenvalues and eigenvectors
  • Interpret the orientation of a two-dimensional confidence ellipse
  • Derive the volume formula using an orthogonal change of coordinates
  • Calculate axes and volumes in two and three dimensions
  • Recognize why eigenvalues are not themselves axis lengths

From a Contrast Confidence Region to Its Geometry

A confidence ellipsoid is more than a formula describing which parameter vectors are plausible. Its shape shows which combinations of contrasts are estimated precisely and which directions have greater uncertainty. The eigenvectors of its covariance shape matrix give the principal directions; the corresponding eigenvalues determine the lengths of the axes.

For context, consider the fixed-design normal linear model \(Y=X\beta+\varepsilon\), where \(X\) has full column rank \(p\), \(\varepsilon\sim N_n(0,\sigma^2 I)\), and \(s^2=\mathrm{SSE}/\nu\) with \(\nu=n-p\). Let \(\theta=C\beta\) be an \(r\)-dimensional contrast, where \(C\) has row rank \(r\), and let \(\hat{\theta}=C\hat{\beta}\). Define \(A=C(X'X)^{-1}C'\). The exact \(1-\alpha\) contrast confidence ellipsoid is

$$ \mathcal{E}_{1-\alpha} = \left\{\theta: (\hat{\theta}-\theta)'A^{-1}(\hat{\theta}-\theta) \le r s^2 F_{r,\nu}(1-\alpha) \right\}. $$

Here \(F_{r,\nu}(1-\alpha)\) is the \(1-\alpha\) quantile of the \(F\) distribution with \(r\) and \(\nu\) degrees of freedom. This is the exact region for the stated normal model. Its center is \(\hat{\theta}\). The matrix \(A\) describes the relative shape, while \(s^2\) and the \(F\) cutoff set the overall scale.

Definition: For a positive definite matrix \(H\), the ellipsoid centered at \(m\) with shape matrix \(H\) is \(\{x:(x-m)'H^{-1}(x-m)\le 1\}\). Its principal axes are the orthogonal directions given by the eigenvectors of \(H\). The semiaxis length in an eigenvector direction is the square root of the corresponding eigenvalue of \(H\).

For the contrast region, write \(q=rF_{r,\nu}(1-\alpha)\). Its shape matrix is \(H=q s^2 A\), so the region can equivalently be written as \((\theta-\hat{\theta})'H^{-1}(\theta-\hat{\theta})\le 1\). Because \(C\) has full row rank and \(X\) has full column rank, \(A\) is positive definite: for every nonzero \(v\), \(v'Av=(C'v)'(X'X)^{-1}(C'v)>0\). Thus its eigenvalues are positive and its axes have nonzero lengths.

Principal Directions and Axis Lengths

A real symmetric positive definite matrix has an orthonormal eigenbasis. Let the eigenvalues of \(A\) be \(\lambda_1,\ldots,\lambda_r\), with corresponding unit eigenvectors \(u_1,\ldots,u_r\). Along \(u_i\), the shape matrix \(H=q s^2 A\) has eigenvalue \(q s^2\lambda_i\). Therefore the ellipsoid’s semiaxis length in that direction is \(\sqrt{q s^2\lambda_i}\). The full axis length is twice this value.

Theorem: If \(A u_i=\lambda_i u_i\), then the contrast confidence ellipsoid has principal direction \(u_i\) and semiaxis length \(\sqrt{r s^2F_{r,\nu}(1-\alpha)\lambda_i}\). The eigenvectors determine the orientation, and the eigenvalues determine the relative squared axis lengths.

To verify the result, collect the unit eigenvectors into an orthogonal matrix \(U\). Then \(U'U=I\) and \(A=U\operatorname{diag}(\lambda_1,\ldots,\lambda_r)U'\). Set \(z=U'(\theta-\hat{\theta})\), which expresses displacement from the center in principal coordinates. Substitution in the ellipsoid inequality gives

$$ \sum_{i=1}^r \frac{z_i^2}{q s^2\lambda_i}\le 1. $$

This is the equation of an ellipsoid whose \(i\)th semiaxis has length \(\sqrt{q s^2\lambda_i}\). This also shows why the eigenvalues are not the lengths themselves: they must first be multiplied by the region’s scale and then square-rooted.

In two dimensions, the eigenvector for the larger eigenvalue gives the direction of the major axis. For a symmetric matrix \(A=\begin{pmatrix}a&b\\b&d\end{pmatrix}\), the angle \(\phi\) of that direction, measured from the first coordinate axis, can be found from \(\phi=\tfrac12\operatorname{atan2}(2b,a-d)\), modulo \(\pi\). When the eigenvalues are equal, every direction is a principal direction, so there is no unique orientation.

Worked Example: Axes of a Two-Contrast Ellipsoid

Suppose \(\hat{\theta}\sim N_2(\theta,A)\), independently of \(s^2\), with \(10s^2\sim\chi^2_{10}\), and \(A=\begin{pmatrix}4&2\\2&4\end{pmatrix}\). For a 95% exact region, \(r=2\), \(\nu=10\), and \(F_{2,10}(0.95)\approx4.1028\). Thus \(q=2(4.1028)=8.2056\).

The eigenvalues are \(6\) and \(2\): the vectors proportional to \((1,1)'\) and \((1,-1)'\) satisfy \(A(1,1)'=6(1,1)'\) and \(A(1,-1)'=2(1,-1)'\), respectively. The unit principal directions are therefore \(u_1=(1,1)'/\sqrt{2}\) and \(u_2=(1,-1)'/\sqrt{2}\). The major axis is oriented at \(45^\circ\) to the first coordinate axis.

Since \(s^2\) is estimated in the data, the semiaxis lengths are \(\sqrt{8.2056s^2(6)}\) and \(\sqrt{8.2056s^2(2)}\). For \(s^2=1\), these are approximately \(7.017\) and \(4.051\). The full axis lengths are approximately \(14.034\) and \(8.102\). Increasing \(s^2\) multiplies both lengths by \(\sqrt{s^2}\), without changing the orientation.

Worked Example: Finding the Orientation of a Tilted Ellipse

Consider a two-dimensional exact contrast region with \(A=\begin{pmatrix}5&2\\2&2\end{pmatrix}\) and \(s^2=1\). Suppose its cutoff is \(q=4\), so its shape matrix is \(H=4A\). The eigenvalues of \(A\) solve \(\det(A-\lambda I)=(5-\lambda)(2-\lambda)-4=\lambda^2-7\lambda+6=0\), giving \(\lambda_1=6\) and \(\lambda_2=1\).

For \(\lambda_1=6\), solving \((A-6I)u=0\) gives a vector proportional to \((2,1)'\). Its direction angle is \(\arctan(1/2)\approx26.565^\circ\). For \(\lambda_2=1\), an orthogonal direction is proportional to \((-1,2)'\), at \(116.565^\circ\). The semiaxis lengths are \(\sqrt{4(6)}=\sqrt{24}\approx4.899\) and \(\sqrt{4(1)}=2\).

In coordinates along the unit eigenvectors, the region is \(\frac{z_1^2}{24}+\frac{z_2^2}{4}\le1\). This verifies both the axis lengths and the orientation: the ellipse is longest along the direction \((2,1)'\), not along either original coordinate axis.

Volume of a Confidence Ellipsoid

The same principal-axis representation gives the volume in any dimension. The unit ball in \(r\) dimensions has volume \(\pi^{r/2}/\Gamma(r/2+1)\), where \(\Gamma\) is the gamma function. Scaling each of its axes by the ellipsoid’s semiaxis length multiplies volume by the product of those lengths.

Theorem: For the contrast confidence ellipsoid with \(H=q s^2A\), its \(r\)-dimensional volume is \[ \operatorname{Vol}_r(\mathcal{E}_{1-\alpha}) = \frac{\pi^{r/2}}{\Gamma(r/2+1)} (qs^2)^{r/2}\sqrt{\det(A)} = \frac{\pi^{r/2}}{\Gamma(r/2+1)} \bigl(rs^2F_{r,\nu}(1-\alpha)\bigr)^{r/2}\sqrt{\det(A)}. \]

For a derivation, use the eigenvector coordinates and map the unit ball to the ellipsoid by \(\theta=\hat{\theta}+U\operatorname{diag}(\sqrt{q s^2\lambda_1},\ldots,\sqrt{q s^2\lambda_r})w\), where \(w'w\le1\). The absolute determinant of this linear map is \(\prod_{i=1}^r\sqrt{q s^2\lambda_i}=(q s^2)^{r/2}\sqrt{\prod_i\lambda_i}\). Since \(\prod_i\lambda_i=\det(A)\), the change-of-variables formula multiplies the unit-ball volume by exactly this determinant. This proves the stated formula. \(\square\)

The volume depends on the product of the eigenvalues, not their individual ordering. A larger confidence cutoff expands every semiaxis by the square root of the cutoff and expands volume by its \(r/2\) power. The orientation remains fixed because the cutoff scales all eigenvalues equally.

Worked Example: Volume of a Three-Dimensional Ellipsoid

Let the contrast shape matrix be \(A=\operatorname{diag}(9,4,1)\), with \(s^2=1\) and cutoff \(q=5\). Its principal directions are the three coordinate axes. Its semiaxis lengths are \(\sqrt{45}=3\sqrt{5}\), \(\sqrt{20}=2\sqrt{5}\), and \(\sqrt{5}\).

The volume of a three-dimensional ellipsoid is \(4\pi/3\) times the product of its semiaxis lengths. Here that product is \((3\sqrt5)(2\sqrt5)(\sqrt5)=30\sqrt5\), so the volume is \((4\pi/3)(30\sqrt5)=40\pi\sqrt5\approx280.99\) cubic units.

The determinant formula gives the same check: \(\det(A)=9(4)(1)=36\), and \(\frac{4\pi}{3}q^{3/2}\sqrt{\det(A)} =\frac{4\pi}{3}(5^{3/2})(6)=40\pi\sqrt5\).

Common Mistakes and Interpretation

A frequent mistake is to report an eigenvalue as an axis length. An eigenvalue is a squared scale in its direction: for the confidence region it must be multiplied by \(q s^2\), and the semiaxis length is the square root of that product. A second mistake is to infer the orientation directly from the diagonal entries of \(A\). When the off-diagonal entries are nonzero, the principal directions can be rotated relative to the coordinate axes; diagonalization, not inspection of the marginal variances alone, determines the orientation.

The axes describe joint uncertainty in the contrast vector. A long axis indicates a direction in which combinations of contrasts can vary more while remaining inside the confidence region. It does not mean every individual coordinate has that much uncertainty. The ellipsoid’s projection onto a coordinate axis and its principal semiaxis are generally different geometric quantities.

Key takeaway: Diagonalize \(A\) to obtain the principal directions and eigenvalues. Multiply each eigenvalue by the common scale \(rs^2F_{r,\nu}(1-\alpha)\) and take its square root for the semiaxis length. Multiply all semiaxis lengths by the unit-ball volume to obtain the ellipsoid’s volume.

Check Your Understanding

Use the eigenvalue and volume formulas to answer these questions.

  1. If an eigenvalue of \(A\) is multiplied by four while the other quantities stay fixed, by what factor does the corresponding semiaxis length change?
  2. Why do the principal directions remain unchanged when \(s^2\) changes?
  3. For a two-dimensional ellipse with shape-matrix eigenvalues \(9\) and \(1\), what is the ratio of its major to minor semiaxis lengths?
  4. What role does \(\det(A)\) play in the volume formula?
  5. When the two eigenvalues of a two-dimensional shape matrix are equal, what can be said about the ellipse’s orientation?
Clinical Biostats