Tutorials › Multivariate Statistics (Graduate) › Profiling a Gaussian Scale-Shape Model

Gaussian Likelihood and Invariance · Tutorial 170 of 975

Profiling a Gaussian Scale-Shape Model

Learn to eliminate a positive Gaussian covariance scale analytically and use the resulting concentrated likelihood to study covariance shape.

Intermediate 10 min read

What You'll Learn

  • Set up the Gaussian likelihood when covariance is a positive scale times a shape matrix
  • Derive and verify the maximum-likelihood estimate of the scale for fixed shape
  • Write the concentrated likelihood and identify the criterion it gives for shape
  • Optimize a diagonal two-dimensional shape parameter in a worked example
  • Explain why multiplying the shape by a constant does not change the profiled likelihood
  • Recognize the zero-residual case in which no finite scale estimate exists

Why Separate Scale From Shape?

A covariance matrix determines both the overall magnitude of variation and its pattern across coordinates. In some models it is useful to write these features separately: a positive scalar controls the overall scale, while a matrix indexed by a parameter describes the shape. Profiling means maximizing the likelihood over the scale for each fixed shape, then using the resulting likelihood to assess the shape parameter.

We use independent observations \(X_1,\ldots,X_n\) from a \(p\)-dimensional Gaussian distribution with known mean \(\mu\). The covariance is \(\tau\Omega(\eta)\), where \(\tau\) is positive and \(\eta\) indexes the shape. Thus this tutorial concerns covariance estimation with the mean held fixed. The key calculation is that the best scale for any fixed shape has a closed form.

Definition: Let \(\eta\) belong to an admissible set \(\mathcal H\), and suppose \(\Omega(\eta)\) is a \(p\times p\) symmetric positive-definite matrix for every \(\eta\in\mathcal H\). The Gaussian scale-shape model has \(X_i\sim N_p(\mu,\tau\Omega(\eta))\), independently, with known \(\mu\), unknown \(\tau>0\), and unknown \(\eta\). Define the residual scatter matrix and the shape-specific quadratic form by \(Q=\sum_{i=1}^n(X_i-\mu)(X_i-\mu)^\mathsf T\) and \(A(\eta)=\operatorname{tr}\{\Omega(\eta)^{-1}Q\}\).

The scatter matrix \(Q\) is positive semidefinite. If at least one observed residual is nonzero, then \(A(\eta)>0\) for every admissible \(\eta\): the trace is a sum of positive quadratic forms in the residuals, and a positive-definite inverse shape matrix gives a strictly positive value for each nonzero residual. This condition is important for a finite maximizing scale.

Profiling the Scale

For a fixed \(\eta\), the Gaussian log-likelihood is obtained by summing the \(n\) observation log-densities. Since \(|\tau\Omega(\eta)|=\tau^p|\Omega(\eta)|\), it can be written as

$$ \ell(\tau,\eta) =-\frac{np}{2}\log(2\pi) -\frac{n}{2}\log|\Omega(\eta)| -\frac{np}{2}\log\tau -\frac{A(\eta)}{2\tau}. $$

Only the last two terms depend on \(\tau\). The next result identifies their unique maximum when \(A(\eta)>0\).

Theorem: For each fixed admissible \(\eta\) with \(A(\eta)>0\), the log-likelihood is uniquely maximized over \(\tau>0\) at \(\hat\tau(\eta)=A(\eta)/(np)\). The resulting profile log-likelihood is
$$ \ell_p(\eta) =-\frac{np}{2}\log(2\pi) -\frac{n}{2}\log|\Omega(\eta)| -\frac{np}{2}\log\!\left(\frac{A(\eta)}{np}\right) -\frac{np}{2}. $$

Proof. Fix \(\eta\) and abbreviate \(A=A(\eta)>0\). Differentiating the log-likelihood with respect to \(\tau\) gives

$$ \frac{\partial\ell}{\partial\tau} =-\frac{np}{2\tau}+\frac{A}{2\tau^2} =\frac{A-np\tau}{2\tau^2}. $$

Because \(2\tau^2>0\), the derivative is positive for \(0<\tau<A/(np)\) and negative for \(\tau>A/(np)\). The log-likelihood therefore increases up to \(\tau=A/(np)\) and decreases afterward, so this is its unique maximum. Substitution gives \(A/(2\hat\tau)=np/2\), yielding the stated profile log-likelihood. \(\square\)

Equivalently, the profile likelihood itself is

$$ L_p(\eta) =(2\pi)^{-np/2}|\Omega(\eta)|^{-n/2} \left(\frac{A(\eta)}{np}\right)^{-np/2} \exp\!\left(-\frac{np}{2}\right). $$

For fixed data, maximizing this expression over \(\eta\) is equivalent to minimizing \(\log|\Omega(\eta)|+p\log A(\eta)\), or, equivalently, minimizing \(|\Omega(\eta)|A(\eta)^p\). These equivalent forms make clear that the shape is judged not by its determinant or its fit to the scatter alone, but by their combination.

Worked Example: Profiling at a Fixed Shape

Take \(n=4\), \(p=2\), known mean \(\mu=0\), and the four observed vectors \((\sqrt{6},0)^\mathsf T\), \((-\sqrt{6},0)^\mathsf T\), \((0,2)^\mathsf T\), and \((0,-2)^\mathsf T\). Their scatter matrix is \(Q=\operatorname{diag}(12,8)\). For the fixed shape \(\Omega=\operatorname{diag}(1,2)\), calculate the profiled scale and likelihood.

The inverse shape is \(\operatorname{diag}(1,1/2)\), so \(A=\operatorname{tr}(\Omega^{-1}Q)=12+8/2=16\). Since \(np=4\cdot2=8\),

$$ \hat\tau=\frac{16}{8}=2. $$

The fitted covariance at this fixed shape is \(\hat\tau\Omega=\operatorname{diag}(2,4)\). Also, \(|\Omega|=2\), so the profile likelihood is

$$ L_p =(2\pi)^{-4}\,2^{-4/2}\,2^{-8/2}\,e^{-8/2} =(2\pi)^{-4}\,2^{-2}\,2^{-4}\,e^{-4}. $$

The factor \(2^{-2}\) comes from the shape determinant and \(2^{-4}\) from the fitted scale. Keeping these contributions distinct is a useful check on the powers of \(n\) and \(p\).

Estimating the Shape After Profiling

Once the scale has been maximized out, an estimate of \(\eta\) maximizes \(\ell_p(\eta)\) over the admissible shape set. The likelihood calculation does not guarantee that such a maximum exists: the parameter set may be open, or the profile likelihood may approach its supremum only at a boundary. When a maximizing shape \(\hat\eta\) does exist, the corresponding joint maximum-likelihood scale estimate is \(\hat\tau(\hat\eta)\).

A simple model illustrates how profiling can reduce a joint optimization to a one-dimensional calculation.

Worked Example: Estimating a Diagonal Shape Parameter

Let \(n=5\), \(p=2\), \(\mu=0\), and take observations \((2,0)^\mathsf T\), \((-2,0)^\mathsf T\), \((0,3)^\mathsf T\), \((0,-3)^\mathsf T\), and \((0,0)^\mathsf T\). Then \(Q=\operatorname{diag}(8,18)\). Suppose \(\Omega(\eta)=\operatorname{diag}(1,\eta)\), with \(\eta>0\). Find the maximizing shape and its fitted scale.

For this shape, \(|\Omega(\eta)|=\eta\) and \(A(\eta)=8+18/\eta\). Ignoring terms constant in \(\eta\), the profile log-likelihood is

$$ \ell_p(\eta) =-\frac{5}{2}\log\eta -5\log\!\left(8+\frac{18}{\eta}\right) +\text{constant}. $$

Its derivative is

$$ \ell_p'(\eta) =-\frac{5}{2\eta} +\frac{90}{\eta^2(8+18/\eta)} =\frac{5(18-8\eta)}{2\eta^2(8+18/\eta)}. $$

The denominator is positive for every \(\eta>0\), so the derivative is positive below \(\eta=18/8=9/4\) and negative above it. Thus the unique maximizing shape is \(\hat\eta=9/4\). At that value, \(A=8+18/(9/4)=8+8=16\), and therefore

$$ \hat\tau=\frac{16}{np}=\frac{16}{10}=\frac{8}{5}. $$

The fitted covariance is \(\hat\tau\Omega(\hat\eta)=\operatorname{diag}(8/5,18/5)\). The optimization used both terms of the profile likelihood; maximizing only the quadratic-form part would not account for the determinant penalty.

Scale and Shape Are Not Automatically Identifiable

A scalar multiple of a shape matrix can be absorbed into the scale parameter. This is not merely a notational issue: unless the shape family is normalized or otherwise restricted, different parameter pairs can describe exactly the same covariance matrix. Profiling makes the corresponding likelihood invariance explicit.

Proposition: For any \(c>0\), replacing \(\Omega(\eta)\) by \(c\Omega(\eta)\) leaves the profile likelihood unchanged. The profiled scale changes to \(\hat\tau/c\), so the fitted covariance is unchanged.

Proof. Under this replacement, the determinant and quadratic form become \(|c\Omega|=c^p|\Omega|\) and \(\operatorname{tr}\{(c\Omega)^{-1}Q\}=A/c\). Consequently, the determinant factor in \(L_p\) is multiplied by \(c^{-np/2}\), while its quadratic-form factor is multiplied by \(c^{np/2}\). The factors cancel, so \(L_p\) is unchanged. The scale estimate becomes \((A/c)/(np)=\hat\tau/c\), and \((\hat\tau/c)(c\Omega)=\hat\tau\Omega\). \(\square\)

A common way to distinguish scale from shape is to impose a normalization such as \(|\Omega(\eta)|=1\) or \(\operatorname{tr}\{\Omega(\eta)\}=p\), provided that normalization is compatible with the model. The precise choice depends on the application. Without such a restriction, the likelihood can still identify a covariance matrix while failing to identify a unique division of that matrix into a scale and a shape.

Worked Example: Checking Scale-Shape Invariance

Let \(n=2\), \(p=2\), \(\mu=0\), and take observations \((\sqrt{8},0)^\mathsf T\) and \((0,\sqrt{8})^\mathsf T\). Then \(Q=\operatorname{diag}(8,8)\). Start with \(\Omega=\operatorname{diag}(1,4)\), and then replace it by \(3\Omega\).

For the first representation, \(A=8+8/4=10\), so \(\hat\tau=10/(np)=10/4=5/2\). The fitted covariance is \(\operatorname{diag}(5/2,10)\). For the rescaled shape, \(\Omega^*=\operatorname{diag}(3,12)\), and \(A^*=8/3+8/12=10/3\). Thus \(\hat\tau^*=(10/3)/4=5/6\), giving

$$ \hat\tau^*\Omega^* =\frac{5}{6}\operatorname{diag}(3,12) =\operatorname{diag}\!\left(\frac{5}{2},10\right). $$

The likelihood factors agree as well. Before rescaling, the determinant and scale factors are \(4^{-1}(5/2)^{-2}=1/25\). After rescaling, they are \(36^{-1}(5/6)^{-2}=1/25\). The common factor \((2\pi)^{-2}e^{-2}\) is unchanged.

Boundary Case and Common Pitfall

If every residual is zero, then \(Q=0\) and \(A(\eta)=0\) for every admissible shape. In that case the log-likelihood contains the scale-dependent term \(-np\log(\tau)/2\) but has no quadratic penalty \(-A/(2\tau)\). As \(\tau\) tends to zero, the log-likelihood tends to \(+\infty\); there is no finite maximizing scale. The formula \(\hat\tau=A/(np)\) would give zero, which is outside the parameter space \(\tau>0\), not a valid maximum-likelihood estimate.

Common mistake: It is tempting to maximize the likelihood over \(\tau\) by setting the quadratic-form term \(A(\eta)/(2\tau)\) as small as possible, and conclude that the best scale is arbitrarily large. That reasoning ignores the determinant contribution \(-np\log(\tau)/2\), which penalizes large scales. The derivative of the complete log-likelihood balances these two terms and gives \(\hat\tau=A(\eta)/(np)\) when \(A(\eta)>0\).

Profiling is useful because it removes a nuisance scale parameter exactly, leaving a likelihood involving only the shape. It also provides a diagnostic: if a proposed shape parameterization contains an unconstrained overall multiplier, the resulting shape is not separately identified from scale. Always check both the residual condition for a finite scale estimate and the identifiability of the scale-shape decomposition.

Check Your Understanding

Use the likelihood and definitions above to answer these questions.

  1. For fixed \(\eta\), what condition on \(A(\eta)\) gives a finite maximizing scale, and what is that scale?
  2. Why must the determinant term be included when optimizing the scale?
  3. For \(\Omega(\eta)=\operatorname{diag}(1,\eta)\) in dimension two, express \(A(\eta)\) in terms of the diagonal entries of \(Q\).
  4. What happens to the profiled scale and fitted covariance if the shape matrix is multiplied by a positive constant \(c\)?
  5. Why does \(Q=0\) prevent a finite maximum-likelihood estimate of \(\tau\)?
Clinical Biostats