Why Study a Wishart Log Determinant?
A positive-definite matrix has a determinant that measures volume scaling: a linear transformation with matrix \(A\) scales volume by \(|A|\). Its logarithm, \(\log|A|\), turns products of scale factors into sums and is often easier to analyze than the determinant itself. For a random Wishart matrix, the distribution of the determinant can be reduced to independent chi-square variables, so its log moments can be calculated explicitly.
This tutorial derives those moments. The central calculation is the mean and variance of \(\log Q\) when \(Q\) has a chi-square distribution. Applying that calculation to the independent factors of a Wishart determinant gives formulas that depend on the degrees of freedom and dimension, while the scale matrix contributes only a constant shift to the mean.
Wishart Determinant Factorization
The factorization is a distributional identity; it does not assert that the factors are diagonal entries of \(W\). Since each \(Q_j\) is positive with probability one, \(W\) is positive definite with probability one in this setting, and \(\log|W|\) is well-defined. Taking logarithms of the factorization gives
Thus, the log-determinant calculation reduces to finding the first two moments of \(\log Q\). We derive those moments before applying them to examples.
Log Moments of a Chi-Square Variable
Let \(Q\sim\chi^2_k\), where \(k>0\), and put \(a=k/2\). The density of \(Q\) is
For \(t>-a\), integration against this density gives the moment-generating function of \(\log Q\):
Define the digamma and trigamma functions by \(\psi(x)=\frac{d}{dx}\log\Gamma(x)\) and \(\psi_1(x)=\frac{d}{dx}\psi(x)\), for \(x>0\). The log moment-generating function is
Because \(a>0\), this expression is finite on an open interval containing zero. Its first two derivatives at zero are the mean and variance of \(\log Q\). This use of derivatives is valid directly from the density: for \(t\) in any sufficiently small closed interval around zero, the integrands obtained by differentiating once or twice are bounded by an integrable function proportional near zero to \(q^{a-\epsilon-1}(1+|\log q|^2)\), and at infinity to a polynomial times \(e^{-q/2}\), for some \(0<\epsilon<a\).
Proof. Differentiating \(K(t)\) yields \(K'(t)=\log 2+\psi(a+t)\) and \(K''(t)=\psi_1(a+t)\). Evaluating at zero gives \(E[\log Q]=K'(0)=\log 2+\psi(a)\) and \(\operatorname{Var}(\log Q)=K''(0)=\psi_1(a)\). Substituting \(a=k/2\) proves both formulas. \(\square\)
Mean and Variance for a Wishart Log Determinant
The independent factors in the determinant factorization make the expectations add, and independence also makes the variances add. Applying the chi-square formulas term by term gives the main result.
Proof. By the determinant factorization, \(\log|W|\) has the same distribution as \(\log|\Sigma|+\sum_{j=1}^{p}\log Q_j\), where the \(Q_j\) are independent and \(Q_j\sim\chi^2_{\nu-j+1}\). Each degree of freedom \(\nu-j+1\) is positive, so the chi-square log-moment formulas apply. Linearity of expectation gives the displayed sum for the mean, with the constant \(\log|\Sigma|\) included. Independence gives \(\operatorname{Var}(\sum_j\log Q_j)=\sum_j\operatorname{Var}(\log Q_j)\); adding a constant does not change variance. Substituting the degrees of freedom proves the variance formula. \(\square\)
The mean depends on \(\Sigma\) through \(\log|\Sigma|\), while the variance does not depend on \(\Sigma\). Changing the scale matrix therefore shifts the log-determinant distribution without changing its variance.
Worked Calculations
Worked Example: A Scalar Wishart Matrix
Let \(W\sim W_1(3,4)\), so the scale matrix is the scalar \(\Sigma=4\), with \(|\Sigma|=4\). The determinant factorization is \(W\overset{d}{=}4Q\), where \(Q\sim\chi^2_3\). Therefore,
Mean. Here \(k/2=3/2\), and the digamma recurrence and half-integer value give \(\psi(3/2)=\psi(1/2)+2=-\gamma-2\log 2+2\). Hence
The final approximation uses \(\gamma\approx0.5772156649\), giving \(0.6931471806+2-0.5772156649=2.1159315157\), which rounds to \(2.115932\).
Variance. The trigamma identity \(\psi_1(1/2)=\pi^2/2\) and recurrence \(\psi_1(x+1)=\psi_1(x)-1/x^2\) give
This example also checks the scale effect: the factor 4 adds \(\log 4\) to \(\log Q\) and does not alter its variance.
Worked Example: A Bivariate Wishart Matrix
Let \(W\sim W_2(4,\Sigma)\), where \(\Sigma=\begin{pmatrix}2&0\\0&1\end{pmatrix}\). Then \(|\Sigma|=2\), and the determinant factors have degrees of freedom 4 and 3. Thus
with \(Q_1,Q_2\) independent. For the mean, use \(\psi(2)=1-\gamma\) and \(\psi(3/2)=2-\gamma-2\log2\):
Using \(\gamma\approx0.5772156649\), the exact expression is approximately \(0.6931471806+3-1.1544313298=2.5387158508\), which rounds to \(2.538716\).
For the variance, \(\psi_1(2)=\pi^2/6-1\) and \(\psi_1(3/2)=\pi^2/2-4\), so
This is a low-dimensional instance of the general result: the two chi-square factors contribute separate log means and variances.
Worked Example: A Three-Dimensional Identity-Scale Case
Let \(W\sim W_3(3,I_3)\), where \(I_3\) is the \(3\times3\) identity matrix. The scale determinant is 1, and the chi-square degrees of freedom are 3, 2, and 1. The digamma values are \(\psi(3/2)=2-\gamma-2\log2\), \(\psi(1)=-\gamma\), and \(\psi(1/2)=-\gamma-2\log2\). Therefore,
The value can be negative even though \(|W|>0\) almost surely: a positive random quantity may be less than 1 often enough that its logarithm has a negative mean. For the variance, use \(\psi_1(3/2)=\pi^2/2-4\), \(\psi_1(1)=\pi^2/6\), and \(\psi_1(1/2)=\pi^2/2\):
The variance is substantial here because one factor has only one degree of freedom, producing a highly variable logarithm.
Interpretation and a Common Pitfall
The expected log determinant summarizes average log-volume scaling, and its variance quantifies the variability of that log scale. The chi-square factorization makes both quantities accessible without integrating the Wishart density over all matrix entries. It also makes clear which part of the result comes from dimension and degrees of freedom and which part comes from the scale matrix.
Common mistake: taking the logarithm after taking the expectation. In general, \(E[\log|W|]\) is not \(\log E[|W|]\). These are different summaries. For a positive random variable \(D\), concavity of the logarithm gives \(E[\log D]\leq\log E[D]\) when the expectations exist; equality requires \(D\) to be constant almost surely. The correct calculation for the log determinant uses the chi-square log moments above, not a determinant expectation placed inside a logarithm.
Check Your Understanding
Use the determinant factorization and the log-chi-square formulas to answer the following.
- For \(W\sim W_2(6,I_2)\), what degrees of freedom appear in the two independent determinant factors?
- Why does changing \(\Sigma\) change \(E[\log|W|]\) but not \(\operatorname{Var}(\log|W|)\)?
- State the mean and variance of \(\log Q\) when \(Q\sim\chi^2_k\).
- For \(W\sim W_1(2,1)\), write the mean and variance of \(\log|W|\) using \(\psi\) and \(\psi_1\).
- Explain why \(\log E[|W|]\) is not generally a valid substitute for \(E[\log|W|]\).