Tutorials › Multivariate Statistics (Graduate) › The C-Step Algorithm For The MCD

Robust Location and Scatter · Tutorial 718 of 975

The C-Step Algorithm For The MCD

Learn how the C-step replaces a subset by the observations closest to its current robust fit, why its determinant cannot increase, and when iteration stops.

Advanced 11 min read

What You'll Learn

  • Define the MCD concentration step for a fixed-size subset
  • Derive the updated subset’s covariance and determinant comparison
  • Prove the determinant is nonincreasing under a C-step
  • Understand how tie-breaking affects finite termination
  • Work through exact one- and two-dimensional C-step calculations
  • Distinguish convergence to a fixed subset from finding the global MCD solution

Why the MCD Uses a Concentration Step

The minimum covariance determinant (MCD) seeks a subset of a prescribed size whose covariance determinant is small. Searching every subset can be computationally demanding, so a useful algorithmic operation is to start from one subset, measure how far every observation lies from its fitted center and scatter, and keep the observations closest to that fit. This is the concentration step, or C-step.

A C-step is more than a convenient heuristic: under standard nonsingularity conditions, it cannot increase the determinant of the subset covariance. Repeated steps therefore give a controlled way to improve a candidate subset. They do not, by themselves, guarantee that the final subset is the globally optimal MCD subset; the algorithm can converge to a local solution.

Definition of the C-Step

Let \(x_1,\ldots,x_n\) be observations in \(\mathbb{R}^p\), and fix a subset size \(h\). For an index set \(H\) with \(|H|=h\), define its mean and its covariance with divisor \(h\) by

$$ \bar{x}_H=\frac{1}{h}\sum_{i\in H}x_i, \qquad C_H=\frac{1}{h}\sum_{i\in H}(x_i-\bar{x}_H)(x_i-\bar{x}_H)^T. $$

The MCD raw objective compares \(\det(C_H)\) across subsets of size \(h\). The divisor \(h\) is used consistently here; replacing it with another fixed divisor changes every subset determinant by the same factor and does not change which subset minimizes it.

Definition: Suppose \(C_H\) is positive definite. The squared Mahalanobis distance of observation \(x_i\), computed from \(H\), is \(d_i^2(H)=(x_i-\bar{x}_H)^TC_H^{-1}(x_i-\bar{x}_H)\). A C-step selects an index set \(H^+\) containing the \(h\) observations with the smallest values of \(d_i^2(H)\). A specified deterministic rule, such as ordering tied observations by index, resolves ties.

For the determinant comparison and finite-termination result below, assume \(n\ge h\ge p+1\), and assume every subset of size \(h\) being considered has positive-definite covariance. This condition ensures both that the distances are defined at each step and that the updated determinant is positive. When a candidate subset is singular, the inverse-based step is not defined for that candidate; singular subsets must be handled separately rather than silently applying the result below.

Why the Updated Covariance Has Controlled Spread

The key calculation compares the new subset using the old subset’s distance scale. For any set \(G\) of \(h\) observations, let \(\bar{x}_G\) and \(C_G\) denote its mean and covariance. Expanding each observation around \(\bar{x}_H\) gives

$$ \frac{1}{h}\sum_{i\in G}(x_i-\bar{x}_H)^TC_H^{-1}(x_i-\bar{x}_H) = \operatorname{tr}(C_H^{-1}C_G) + (\bar{x}_G-\bar{x}_H)^TC_H^{-1}(\bar{x}_G-\bar{x}_H). $$

To verify the identity, write \(x_i-\bar{x}_H=(x_i-\bar{x}_G)+(\bar{x}_G-\bar{x}_H)\). The two cross terms sum to zero because \(\sum_{i\in G}(x_i-\bar{x}_G)=0\). The remaining centered quadratic terms sum to \(h\operatorname{tr}(C_H^{-1}C_G)\), by the definition of \(C_G\) and the trace identity \(u^TAu=\operatorname{tr}(Auu^T)\).

For \(G=H\), the left side is \(p\): its value is \(\operatorname{tr}(C_H^{-1}C_H)=p\), and the mean-difference term is zero. Since \(H^+\) contains the \(h\) smallest distances among all observations, its total distance under the old fit cannot exceed the total for \(H\). Consequently,

$$ \operatorname{tr}(C_H^{-1}C_{H^+}) + (\bar{x}_{H^+}-\bar{x}_H)^TC_H^{-1}(\bar{x}_{H^+}-\bar{x}_H) \le p. $$

The second term is nonnegative, so \(\operatorname{tr}(C_H^{-1}C_{H^+})\le p\). This trace bound is what leads to the determinant guarantee.

The C-Step Determinant Theorem

Theorem: Under the stated nonsingularity conditions, one C-step satisfies \(\det(C_{H^+})\le\det(C_H)\).

Proof. The matrix \(C_H^{-1/2}C_{H^+}C_H^{-1/2}\) is positive definite. Let its positive eigenvalues be \(\lambda_1,\ldots,\lambda_p\). Their sum is \(\operatorname{tr}(C_H^{-1}C_{H^+})\le p\), and their product is \(\det(C_{H^+})/\det(C_H)\). The arithmetic-geometric mean inequality therefore gives

$$ \frac{\det(C_{H^+})}{\det(C_H)} =\prod_{j=1}^p\lambda_j \le \left(\frac{1}{p}\sum_{j=1}^p\lambda_j\right)^p \le 1. $$

Both determinants are positive, so multiplying by \(\det(C_H)\) proves the claim. \(\square\)

The argument also identifies the equality case. If the determinants are equal, the inequalities force every \(\lambda_j=1\), so \(C_{H^+}=C_H\). The earlier trace bound must also be an equality, which forces \(\bar{x}_{H^+}=\bar{x}_H\), since \(C_H^{-1}\) is positive definite. Thus equal determinant after a C-step entails equal subset mean and covariance, not merely an accidental equality of determinant values.

Worked Example: A One-Dimensional C-Step

Take the observations \(0,1,2,8\), set \(p=1\) and \(h=2\), and start from \(H=\{0,8\}\). Its mean is \(4\), and its covariance is \(C_H=\{(0-4)^2+(8-4)^2\}/2=16\). The squared distances are

$$ d^2_0(H)=\frac{16}{16}=1,\quad d^2_1(H)=\frac{9}{16},\quad d^2_2(H)=\frac{4}{16},\quad d^2_8(H)=\frac{16}{16}=1. $$

The two smallest distances belong to \(2\) and \(1\), so \(H^+=\{1,2\}\). Its mean is \(3/2\), and its covariance is \(\{(1-3/2)^2+(2-3/2)^2\}/2=1/4\). Thus the determinant, which in one dimension is the covariance itself, drops from \(16\) to \(1/4\).

From the new fit, the squared distances of \(1\) and \(2\) are both \(1\). Those of \(0\) and \(8\) are \(9\) and \(169\), respectively. The next C-step therefore retains \(\{1,2\}\).

Finite Convergence and What It Guarantees

There are only finitely many subsets of size \(h\). For a rigorous termination statement, use a fixed deterministic rule to resolve ties at every step. If a step strictly lowers the determinant, that exact subset cannot recur later: every later determinant is no larger, whereas a return to that subset would restore its original determinant. If a step changes the subset but leaves the determinant equal, the equality case above shows that the mean and covariance are unchanged. The distances and tie rule are then unchanged as well, so the next C-step selects the same updated subset again. Hence the iteration reaches a fixed subset in finitely many steps.

This is a finite termination result, not a global optimality result. A fixed subset is one that is reproduced by its C-step; it need not minimize \(\det(C_G)\) over every size-\(h\) subset \(G\). In practice, multiple initial subsets can be used to reduce dependence on initialization, and the resulting candidates can be compared by determinant.

Worked Example: Checking the Distant-Point Distance

Consider the five points \(A=(0,0)\), \(B=(2,0)\), \(C=(0,2)\), \(D=(2,2)\), and \(E=(10,10)\). Start with \(H=\{A,B,C\}\), with \(h=3\). Its mean is \((2/3,2/3)\), and direct centering gives

$$ C_H= \begin{pmatrix} 8/9 & -4/9\\ -4/9 & 8/9 \end{pmatrix}, \qquad C_H^{-1}= \begin{pmatrix} 3/2 & 3/4\\ 3/4 & 3/2 \end{pmatrix}. $$

The determinant of \(C_H\) is \(64/81-16/81=48/81=16/27\). For \(A\), the displacement from the mean is \((-2/3,-2/3)\), giving squared distance \(2\). For \(B\), the displacement is \((4/3,-2/3)\), giving \((3/2)(20/9)+(3/2)(-8/9)=2\). By symmetry, \(C\) also has squared distance \(2\). The competing point \(D\) has displacement \((4/3,4/3)\), giving squared distance \(8\).

For \(E\), the displacement is \((28/3,28/3)\). Both coordinates are equal, so the quadratic form uses the sum of all four entries of \(C_H^{-1}\), which is \(9/2\):

$$ d_E^2(H) = \left(\frac{28}{3},\frac{28}{3}\right) C_H^{-1} \left(\frac{28}{3},\frac{28}{3}\right)^T = \frac{9}{2}\left(\frac{28}{3}\right)^2 =392. $$

The three smallest distances are those of \(A,B,C\), so this C-step retains \(H\). The calculation illustrates why the inverse covariance and the full displacement must both be used: the distant point’s squared distance is \(392\), not a value obtained by omitting a coordinate or a cross term.

Worked Example: Following Iteration to a Fixed Subset

Use the same five points, but now start from \(H=\{A,B,E\}\), with \(h=3\). The mean is \((4,10/3)\). The centered covariance and its inverse are

$$ C_H= \begin{pmatrix} 56/3 & 20\\ 20 & 200/9 \end{pmatrix}, \qquad C_H^{-1}= \begin{pmatrix} 3/2 & -27/20\\ -27/20 & 63/50 \end{pmatrix}. $$

For each of \(A,B,E\), the squared distance is \(2\). For \(D\), the displacement is \((-2,-4/3)\), so \[ d_D^2(H)=\frac{3}{2}(4)+2\left(-\frac{27}{20}\right)\frac{8}{3} +\frac{63}{50}\frac{16}{9} =6-\frac{36}{5}+\frac{56}{25} =\frac{26}{25}. \] For \(C\), the displacement is \((-4,-4/3)\), giving \[ d_C^2(H)=24-\frac{72}{5}+\frac{56}{25} =\frac{296}{25}. \] Thus \(D\) is selected, together with two of \(A,B,E\), whose distances tie at \(2\). With the fixed tie rule \(A\) before \(B\) before \(E\), the updated subset is \(H^+=\{A,B,D\}\).

Its mean is \((4/3,2/3)\), and its covariance and determinant are

$$ C_{H^+}= \begin{pmatrix} 8/9 & 4/9\\ 4/9 & 8/9 \end{pmatrix}, \qquad \det(C_{H^+})=\frac{16}{27}. $$

The old determinant was \((56/3)(200/9)-20^2=400/27\), so this step reduces it from \(400/27\) to \(16/27\). Under the new fit, \(A,B,D\) each have squared distance \(2\); \(C\) has squared distance \(8\), and \(E\) has squared distance \(122\). The next step therefore selects \(A,B,D\) again. The algorithm has reached a fixed subset.

Common Pitfalls and Practical Meaning

  • Claiming the global MCD has been found. A C-step gives a nonincreasing determinant and reaches a fixed subset under the stated conditions. It does not prove that no other subset has a smaller determinant.
  • Using an inconsistent covariance convention. The proof and examples use divisor \(h\) for every subset covariance. A different fixed divisor can be used, but it must be applied consistently.
  • Treating ties as irrelevant. Ties can make the next subset depend on the tie rule. A deterministic rule makes the iteration reproducible and supports the finite-termination argument.
  • Assuming a singular subset has usable Mahalanobis distances. If its covariance is singular, its inverse does not exist. The C-step theorem as stated applies only when the covariances used in the iteration are positive definite.

The practical value of the C-step is that it turns a candidate subset into a subset more concentrated relative to its own location and scatter, while providing a mathematical guarantee on the raw determinant. That guarantee supports iterative search; careful initialization and comparison of candidate solutions remain necessary when the goal is a good approximation to the global MCD.

Check Your Understanding

Use the definitions and calculations above to answer these questions.

  1. Why does choosing the \(h\) smallest distances imply that the updated subset’s total distance under the old fit cannot exceed \(hp\)?
  2. Which inequality converts the trace bound into a determinant bound, and why must the eigenvalues in that argument be positive?
  3. In the five-point example beginning with \(\{A,B,E\}\), what role does the tie rule play in selecting the updated subset?
  4. What additional condition makes finite termination follow when a step leaves the determinant unchanged?
  5. Why does reaching a fixed subset not establish that the global MCD subset has been found?
Clinical Biostats