Why Covariance Volume Enters a QDA Score
Quadratic discriminant analysis (QDA) allows each class to have its own covariance matrix. That flexibility affects classification in two ways: the covariance determines the quadratic distance from an observation to a class mean, and its determinant contributes a separate adjustment to the class score. The second part is easy to overlook. It matters because a class with a more spread-out distribution has its probability density distributed over a larger region.
In plug-in QDA, unknown class parameters are replaced by estimates from training data. We focus here on how the estimated covariance determinant affects the resulting classification, while keeping the quadratic-distance and prior contributions visible for comparison.
The score follows by evaluating the Gaussian log density at \(x\), adding the log prior, and replacing the unknown parameters by their estimates. The omitted term is \(-\frac{p}{2}\log(2\pi)\), which is the same for every class when all classes use the same \(p\)-dimensional feature vector. It therefore cannot affect the ranking.
A larger covariance determinant corresponds to a larger covariance volume. Its log-determinant adjustment is consequently more negative, all else equal. This is a relative comparison: the determinant is not itself a probability or a penalty that can be interpreted independently of the other score terms.
Determinant as a Volume Adjustment
For a positive number \(c\), consider the set of points whose squared Mahalanobis distance from \(\mu\) under a positive definite covariance matrix \(\Sigma\) is at most \(c\). This set is an ellipsoid. Its volume is proportional to \(|\Sigma|^{1/2}\), so the determinant records its volume scale, not its orientation or every detail of its shape.
Proof. By the spectral theorem, a positive definite \(\Sigma\) has a symmetric positive definite square root \(\Sigma^{1/2}\). Make the change of variables \(x=\mu+\sqrt{c}\,\Sigma^{1/2}u\). Then
Thus \(x\in E_c\) exactly when \(u\in B_p\). Integrating the Jacobian over the unit ball gives \(\operatorname{Vol}(E_c)=c^{p/2}|\Sigma|^{1/2}V_p\), as claimed. \(\square\)
This volume connection explains the density normalization. If two classes have equal priors and an observation is equally far from their means in their respective Mahalanobis metrics, the class with the larger covariance volume has the lower density at that observation. QDA does not, however, classify by volume alone: the quadratic distances and priors remain part of the score.
Worked Example: Comparing Determinant Adjustments at the Means
In two dimensions, suppose two classes have equal priors and both estimated means are \((0,0)^\mathsf{T}\). Their estimated covariance matrices are
At \(x=(0,0)^\mathsf{T}\), both quadratic distances are zero. The determinants are
Since the priors are equal, their log-prior contributions cancel. The remaining scores are
Class 2 has the larger score and is selected. The quadratic distances provide no preference here; the smaller determinant gives class 2 the less negative log-determinant adjustment.
How the Determinant Can Change a Classification
For any two classes \(a\) and \(b\), subtracting their scores separates the contributions that determine the ranking:
where \(\hat{q}_k(x)=(x-\hat{\mu}_k)^\mathsf{T}\hat{\Sigma}_k^{-1}(x-\hat{\mu}_k)\). A positive difference favors class \(a\); a negative difference favors class \(b\). This form makes clear that a small advantage in quadratic distance can be outweighed by a larger determinant adjustment or a prior difference.
Worked Example: A Determinant Term Reverses the Distance Ranking
Let both classes have prior \(1/2\), let \(x=(0,0)^\mathsf{T}\), and use the following estimated means and covariances:
The determinants are \(1\) and \(16\). Since \((cI_2)^{-1}=c^{-1}I_2\), the quadratic distances are
Distance alone would rank class 2 ahead because \(2.0<2.1\). But the full scores, omitting the equal log priors, are
The full QDA rule selects class 1. Its quadratic distance is only \(0.1\) larger, while the determinant ratio contributes \(\frac12\log 16=\log 4\approx1.386\) in class 1's favor. This example shows why ranking classes by distance alone does not implement QDA.
What the Determinant Does Not Tell You
Equal determinants do not imply equal covariance matrices. Matrices can have the same volume scale while spreading variation in different directions. In that situation, determinant adjustments tie, but the quadratic distances can differ substantially. The determinant is therefore a volume summary; the inverse covariance in the quadratic term accounts for directional scaling.
Worked Example: Equal Volume, Different Quadratic Distances
Let two equally likely classes have means \((0,0)^\mathsf{T}\) and covariance estimates
Both determinants equal one, since \(9(1/9)=1\). At \(x=(3,0)^\mathsf{T}\), the quadratic distances are
The log-determinant terms and log priors tie, so the scores are \(\hat{\delta}_1(x)=-1/2\) and \(\hat{\delta}_2(x)=-9/2\). Class 1 is selected because its covariance allows more variation in the first coordinate, even though its overall volume matches that of class 2.
A change in the units of a feature changes covariance determinants. For instance, expressing one coordinate in different units rescales the corresponding covariance row and column. If the same invertible change of coordinates is applied to every class, each determinant receives the same multiplicative factor, so the common change in log determinant cancels in pairwise comparisons. Comparing determinants computed under inconsistent units, however, has no coherent interpretation.
Common Mistake and Practical Checks
- Ignoring the determinant because the distance is smaller. The QDA score contains both terms. Compare complete scores, or use the pairwise score difference, before assigning a class.
- Treating a larger determinant as automatically decisive. It contributes a relative adjustment, but a sufficiently better quadratic fit or a larger prior can outweigh it.
- Calling the determinant the covariance shape. It summarizes volume scale. Covariances with the same determinant can have different directional spreads, as the previous calculation illustrates.
- Using a singular covariance estimate without comment. The displayed plug-in score requires an inverse and a log determinant, so the covariance estimate must be positive definite. If it is singular, this formula is not defined; a suitable estimation or regularization choice must be made before applying it.
A reliable calculation keeps three contributions visible: \(\log\hat{\pi}_k\), \(-\frac12\log|\hat{\Sigma}_k|\), and \(-\frac12\hat{q}_k(x)\). This prevents the determinant adjustment from disappearing inside a numerical score and makes it possible to explain why a class won.
Check Your Understanding
For each question, distinguish the determinant contribution from the other parts of the QDA score.
- For two equally likely classes with equal quadratic distances, which class has the larger score if its estimated covariance determinant is smaller?
- Why does a covariance determinant describe volume scale but not the full shape of a covariance matrix?
- With equal priors, state the condition under which class \(a\) outranks class \(b\) using their quadratic distances and determinants.
- Can a class with a larger quadratic distance still be selected by QDA? Explain which other score contributions could make this happen.
- What condition on an estimated covariance matrix is needed for the plug-in QDA score as written, and why?