Tutorials › Multivariate Statistics (Graduate) › Marginal Versus Conditional Association in Gaussian Triples

Gaussian Geometry and Conditioning · Tutorial 115 of 975

Marginal Versus Conditional Association in Gaussian Triples

Learn how conditioning on a third Gaussian variable can weaken, create, or reverse an association, and when a zero partial correlation means conditional independence.

Intermediate 10 min read

What You'll Learn

  • Distinguish marginal correlation from conditional correlation in a Gaussian triple
  • Derive the three-variable partial-correlation formula from residuals
  • Determine when conditioning reverses the sign of an association
  • Relate zero partial correlation to conditional independence under Gaussianity
  • Check positive definiteness and interpret worked covariance examples

Why Marginal and Conditional Association Can Differ

Two variables can move together because they are directly associated, because both are related to a third variable, or because conditioning on a third variable changes the pattern of their variation. These possibilities are not interchangeable. The marginal association of \(X\) and \(Y\) describes their joint distribution without conditioning on \(Z\); their conditional association describes how they vary together when \(Z\) is held fixed. In a Gaussian triple, both can be summarized by correlations, but the two correlations need not agree in magnitude or sign.

This distinction matters when interpreting adjusted analyses. A positive marginal correlation does not guarantee a positive association at fixed values of a covariate, and a zero marginal correlation does not guarantee conditional independence. The formulas below make those differences explicit.

Definition: Let \((X,Y,Z)\) be a jointly Gaussian random vector with positive-definite covariance matrix. The marginal correlation of \(X\) and \(Y\) is \(\rho_{XY}=\operatorname{Corr}(X,Y)\). The conditional correlation given \(Z\) is \(\operatorname{Corr}(X,Y\mid Z=z)\), which is constant in \(z\) for a nonsingular Gaussian triple. This constant is also called the partial correlation of \(X\) and \(Y\) given \(Z\), and is denoted \(\rho_{XY\cdot Z}\).

Positive definiteness ensures that the conditional variances of \(X\) and \(Y\) given \(Z\) are positive, so the conditional correlation is defined. Write \(\rho_{XZ}\) and \(\rho_{YZ}\) for the other two marginal correlations. The central formula is

$$ \rho_{XY\cdot Z} = \frac{\rho_{XY}-\rho_{XZ}\rho_{YZ}} {\sqrt{(1-\rho_{XZ}^{2})(1-\rho_{YZ}^{2})}}. $$

The denominator is positive. Thus the sign of the conditional association is determined by \(\rho_{XY}-\rho_{XZ}\rho_{YZ}\), not by \(\rho_{XY}\) alone.

Deriving the Partial-Correlation Formula

The derivation uses residuals after linear prediction from \(Z\). Let \(\sigma_{AB}=\operatorname{Cov}(A,B)\) and \(\sigma_{AA}=\operatorname{Var}(A)\). Define

$$ R_X=X-E[X]-\frac{\sigma_{XZ}}{\sigma_{ZZ}}\{Z-E[Z]\}, \qquad R_Y=Y-E[Y]-\frac{\sigma_{YZ}}{\sigma_{ZZ}}\{Z-E[Z]\}. $$

These are the parts of \(X\) and \(Y\) left after subtracting their linear predictions from \(Z\). They are jointly Gaussian with \(Z\). Each has zero covariance with \(Z\), so the Gaussian independence property implies that the pair \((R_X,R_Y)\) is independent of \(Z\). Consequently, their covariance and variances are the conditional covariance and variances of \(X\) and \(Y\) given \(Z\).

Result: For a nonsingular jointly Gaussian triple, the conditional covariance and variances are $$ \operatorname{Cov}(X,Y\mid Z)=\sigma_{XY}-\frac{\sigma_{XZ}\sigma_{YZ}}{\sigma_{ZZ}}, \qquad \operatorname{Var}(X\mid Z)=\sigma_{XX}-\frac{\sigma_{XZ}^{2}}{\sigma_{ZZ}}, \qquad \operatorname{Var}(Y\mid Z)=\sigma_{YY}-\frac{\sigma_{YZ}^{2}}{\sigma_{ZZ}}. $$

For example, expanding the covariance of the residuals gives

$$ \begin{aligned} \operatorname{Cov}(R_X,R_Y) &=\sigma_{XY} -\frac{\sigma_{YZ}}{\sigma_{ZZ}}\sigma_{XZ} -\frac{\sigma_{XZ}}{\sigma_{ZZ}}\sigma_{YZ} +\frac{\sigma_{XZ}\sigma_{YZ}}{\sigma_{ZZ}^{2}}\sigma_{ZZ}\\ &=\sigma_{XY}-\frac{\sigma_{XZ}\sigma_{YZ}}{\sigma_{ZZ}}. \end{aligned} $$

The same expansion with \(Y=X\) gives the stated conditional variance for \(X\); exchanging \(X\) and \(Y\) gives the other. Independence of the residual pair from \(Z\) means these are also the conditional moments at any \(Z=z\). Dividing the conditional covariance by the square root of the product of conditional variances gives the conditional correlation. Substituting \(\sigma_{AB}=\rho_{AB}\sqrt{\sigma_{AA}\sigma_{BB}}\) into that ratio and cancelling the positive marginal standard deviations yields the displayed partial-correlation formula. \(\square\)

Worked Example: A Positive Marginal Correlation Becomes Negative

Let \(Z,U,V\) be jointly Gaussian, with \(Z\) independent of \((U,V)\), and suppose

$$ \operatorname{Var}(Z)=1,\quad \operatorname{Var}(U)=\operatorname{Var}(V)=1,\quad \operatorname{Cov}(U,V)=-0.5. $$

Set \(X=Z+U\) and \(Y=Z+V\). The covariance matrix of \((U,V)\) has diagonal entries \(1\) and determinant \(1-0.5^2=0.75>0\), so it is positive definite. Independence of \(Z\) then gives a valid nonsingular Gaussian triple. Its moments are

$$ \operatorname{Var}(X)=2,\quad \operatorname{Var}(Y)=2,\quad \operatorname{Cov}(X,Y)=1-0.5=0.5,\quad \operatorname{Cov}(X,Z)=\operatorname{Cov}(Y,Z)=1. $$

Therefore the marginal correlation is \(\rho_{XY}=0.5/\sqrt{2\cdot2}=0.25\), while \(\rho_{XZ}=\rho_{YZ}=1/\sqrt{2}\). The partial correlation is

$$ \rho_{XY\cdot Z} = \frac{0.25-(1/\sqrt{2})(1/\sqrt{2})} {\sqrt{(1-1/2)(1-1/2)}} = \frac{-0.25}{0.5}=-0.5. $$

Thus \(X\) and \(Y\) are positively correlated overall but negatively correlated after accounting for \(Z\). In this construction, the shared \(Z\) contributes positive marginal covariance, while the remaining components \(U\) and \(V\) have negative covariance.

When Does Conditioning Reverse the Sign?

Because the denominator in the partial-correlation formula is positive, the marginal and conditional associations have opposite signs precisely when \(\rho_{XY}\) and \(\rho_{XY}-\rho_{XZ}\rho_{YZ}\) have opposite signs. If the marginal correlation is positive, reversal occurs when \(\rho_{XZ}\rho_{YZ}>\rho_{XY}\). If the marginal correlation is negative, reversal occurs when \(\rho_{XZ}\rho_{YZ}<\rho_{XY}\). A zero marginal correlation is not a sign reversal, but conditioning can still reveal a nonzero conditional association.

A zero partial correlation has a particularly strong interpretation in a Gaussian model. This equivalence depends on joint Gaussianity; for general distributions, zero conditional covariance or correlation need not imply conditional independence.

Theorem: For a nonsingular jointly Gaussian triple \((X,Y,Z)\), \(X\) and \(Y\) are conditionally independent given \(Z\) if and only if \(\rho_{XY\cdot Z}=0\).

To prove the result, fix \(Z=z\). The conditional distribution of \((X,Y)\) is bivariate normal, with covariance \(\operatorname{Cov}(X,Y\mid Z)=\sigma_{XY}-\sigma_{XZ}\sigma_{YZ}/\sigma_{ZZ}\) and positive conditional variances. If \(\rho_{XY\cdot Z}=0\), the formula for partial correlation implies that this conditional covariance is zero. A bivariate normal density with zero covariance and positive variances factors into the product of its two univariate normal densities. Hence \(X\) and \(Y\) are conditionally independent given \(Z=z\); this holds for almost every \(z\), so they are conditionally independent given \(Z\).

Conversely, conditional independence implies that the conditional covariance is zero for almost every \(z\), since the conditional variables have finite second moments. The conditional covariance is constant in \(z\) for a Gaussian triple, so it is zero. The positive conditional variances then make the conditional correlation, and therefore the partial correlation, zero. \(\square\)

Worked Example: Zero Marginal Correlation, Nonzero Conditional Association

Consider a standardized Gaussian triple with correlation matrix

$$ \begin{pmatrix} 1&0&0.5\\ 0&1&0.5\\ 0.5&0.5&1 \end{pmatrix}. $$

The leading principal minors are \(1\), \(1\), and \(1-0.25-0.25=0.5\), all positive, so the matrix is positive definite. The marginal correlation of \(X\) and \(Y\) is zero. Their partial correlation given \(Z\), however, is

$$ \rho_{XY\cdot Z} = \frac{0-(0.5)(0.5)} {\sqrt{(1-0.5^2)(1-0.5^2)}} = \frac{-0.25}{0.75} =-\frac{1}{3}. $$

Since the pair \((X,Y)\) is bivariate Gaussian and has zero covariance, \(X\) and \(Y\) are marginally independent. But they are not conditionally independent given \(Z\), because their partial correlation is nonzero. Conditioning on \(Z\) exposes a negative association that is absent from the marginal bivariate distribution.

Worked Example: Conditional Independence with Positive Marginal Association

Let \(Z,U,V\) be independent standard normal variables, and define \(X=Z+U\) and \(Y=2Z+V\). Then

$$ \operatorname{Var}(X)=2,\quad \operatorname{Var}(Y)=5,\quad \operatorname{Cov}(X,Y)=2,\quad \operatorname{Cov}(X,Z)=1,\quad \operatorname{Cov}(Y,Z)=2. $$

The marginal correlation is \(2/\sqrt{10}\), which is positive. Given \(Z\), the remaining variables are \(U\) and \(V\), which are independent. Directly, the conditional covariance is

$$ \operatorname{Cov}(X,Y\mid Z) = 2-\frac{(1)(2)}{1}=0. $$

The conditional variances are \(2-1^2=1\) and \(5-2^2=1\), so the partial correlation is also zero. By the Gaussian equivalence, \(X\) and \(Y\) are conditionally independent given \(Z\), despite their positive marginal correlation. Their marginal association comes entirely from the shared contribution of \(Z\).

Interpretation and a Common Pitfall

Marginal and conditional association answer different questions. The marginal correlation summarizes the joint behavior of \(X\) and \(Y\) across the distribution of \(Z\). The partial correlation summarizes their residual association after their linear relationships with \(Z\) have been removed. Neither quantity, by itself, establishes a causal relationship. In applications, conditioning is meaningful only in relation to the scientific question and the chosen variables; a mathematical change in correlation is not automatically evidence of a causal mechanism.

  • Common mistake: “The marginal correlation is positive, so the adjusted association must also be positive.” This ignores the term \(\rho_{XZ}\rho_{YZ}\).
  • Correction: Compute the partial-correlation numerator \(\rho_{XY}-\rho_{XZ}\rho_{YZ}\). Its sign, not the marginal sign alone, determines the conditional sign.
  • Common mistake: “A zero correlation proves independence in any model.” Zero correlation implies independence for a bivariate Gaussian distribution, and zero partial correlation implies conditional independence for a nonsingular Gaussian triple. Those implications are not general facts for arbitrary distributions.

When interpreting a reported association, state explicitly whether it is marginal or conditional, and identify the variable being conditioned on. That distinction prevents a numerical adjustment from being mistaken for a contradiction.

Check Your Understanding

Use the Gaussian-triple formulas and assumptions developed above.

  1. In the partial-correlation formula, which part determines the sign of \(\rho_{XY\cdot Z}\), and why?
  2. Suppose \(\rho_{XY}=0.3\), \(\rho_{XZ}=0.7\), and \(\rho_{YZ}=0.6\). Is the partial-correlation numerator positive, negative, or zero?
  3. Why does zero partial correlation imply conditional independence for a nonsingular Gaussian triple?
  4. Can \(X\) and \(Y\) be marginally independent but conditionally associated given \(Z\) in a Gaussian triple? Explain briefly.
  5. What additional condition, beyond observing zero correlation, is needed before concluding independence from that correlation in this tutorial’s setting?
Clinical Biostats