Tutorials › Multivariate Statistics (Graduate) › Exact Null Distribution of a Sample Partial Correlation

Partial and Multiple Correlation · Tutorial 422 of 975

Exact Null Distribution of a Sample Partial Correlation

Learn why the sample partial correlation’s null t distribution has \(n-q-2\) degrees of freedom, and see the projection argument that establishes it.

Intermediate 9 min read

What You'll Learn

  • Define the sample partial correlation as a correlation between regression residuals.
  • State the Gaussian sampling and rank conditions for its exact null distribution.
  • Derive the t transformation from independent Gaussian vectors in the residual subspace.
  • Explain why the degrees of freedom are \(n-q-2\).
  • Check the result in special cases and numerical examples.
  • Identify why the exact result does not automatically extend beyond Gaussian sampling.

Why the Null Distribution Depends on the Controls

A sample partial correlation measures the association between two variables after removing their linear relationships with a set of controls. Its null distribution therefore depends not only on the number of observations, but also on how much of the data has been used to estimate those relationships. Under multivariate normal sampling, that dependence has an exact form: a particular transformation of the sample partial correlation has a Student t distribution.

The degrees of freedom follow from the geometry of residualization. An intercept and \(q\) controls leave an \(n-q-1\) dimensional residual space. The correlation of two independent Gaussian vectors in that space transforms to a t variable with one fewer degree of freedom, namely \(n-q-2\).

Definition and Sampling Conditions

Definition: Let \(X\) and \(Y\) be two variables and let \(Z=(Z_1,\ldots,Z_q)^\mathsf{T}\) be a vector of \(q\) controls. For \(n\) observations, regress the observed \(X\) values and \(Y\) values separately on an intercept and the \(q\) controls. The sample partial correlation \(r_{XY\cdot Z}\) is the ordinary sample correlation between the two resulting residual vectors. Equivalently, it is the cosine of the angle between those residual vectors.

Assume the \(n\) rows are independent and identically distributed observations from a jointly multivariate normal vector \((X,Y,Z^\mathsf{T})^\mathsf{T}\), with positive-definite covariance matrix. The population partial correlation is the correlation between the residuals \(U\) and \(V\) after linearly projecting \(X\) and \(Y\), respectively, on an intercept and \(Z\). The null considered here is \(\operatorname{Corr}(U,V)=0\). Assume \(n>q+2\), so the degrees of freedom below are positive. Under the stated nonsingularity assumptions, the sample design has full column rank with probability one.

The intercept is included in both regressions. Thus the design matrix has \(q+1\) columns, and its residual projection has rank \(d=n-q-1\). The sample residual correlation is defined with probability one when \(d\geq 2\), which is ensured by \(n>q+2\).

Theorem: Under the sampling and rank conditions above, if the population partial correlation of \(X\) and \(Y\) given \(Z\) is zero, then
$$ T = r_{XY\cdot Z} \sqrt{\frac{n-q-2}{1-r_{XY\cdot Z}^{\,2}}} \sim t_{n-q-2}. $$

Here \(t_\nu\) denotes the Student t distribution with \(\nu\) degrees of freedom. The statement concerns the distribution under the zero-partial-correlation null; it is not a claim that this transformed statistic has the same distribution when the population partial correlation is nonzero.

Deriving the Exact Distribution

Write the sample design matrix as \(W\), with a column of ones and one column for each control, and define the residual projection

$$ M_W=I-W(W^\mathsf{T}W)^{-1}W^\mathsf{T}. $$

This matrix is symmetric and idempotent, annihilates every column of \(W\), and has rank \(d=n-q-1\). If \(x\) and \(y\) are the observed data vectors, the sample partial correlation is

$$ r_{XY\cdot Z} = \frac{x^\mathsf{T}M_Wy} {\sqrt{(x^\mathsf{T}M_Wx)(y^\mathsf{T}M_Wy)}}. $$

The population conditional means of \(X\) and \(Y\) given \(Z\) are linear functions of \(Z\), because the variables are jointly normal. Let \(U_i\) and \(V_i\) be the deviations from those respective conditional means. Under the null, \(U_i\) and \(V_i\) have zero covariance. Joint normality then implies that \(U_i\) and \(V_i\) are independent; each is also independent of \(Z_i\). Across observations these pairs are independent.

Let \(u=(U_1,\ldots,U_n)^\mathsf{T}\) and \(v=(V_1,\ldots,V_n)^\mathsf{T}\). Since the conditional mean vectors lie in the column space of \(W\), projection removes them: \(M_Wx=M_Wu\) and \(M_Wy=M_Wv\). Conditional on the observed design, \(u\) and \(v\) are independent normal vectors with covariance matrices \(\sigma_U^2 I\) and \(\sigma_V^2 I\), where both variances are positive.

Choose an orthonormal basis for the \(d\)-dimensional range of \(M_W\). Expressing the projected vectors in this basis gives coordinates \(a\) and \(b\) that, after division by their respective standard deviations, are independent \(d\)-dimensional standard normal vectors. This holds for every full-rank design: conditional on the design, their coordinate distribution is the same. The scale factors cancel in the correlation, so

$$ r_{XY\cdot Z} = \frac{a^\mathsf{T}b}{\|a\|\|b\|}. $$

To find the distribution of this cosine, condition on \(a\). With probability one, \(a\ne 0\). Rotational symmetry of the standard normal distribution allows coordinates to be rotated so that \(a/\|a\|\) is the first coordinate direction. Consequently, conditional on \(a\), the distribution of the cosine is that of \(b_1/\sqrt{\sum_{j=1}^{d}b_j^2}\), where \(b_1,\ldots,b_d\) are independent standard normal variables. Therefore

$$ r_{XY\cdot Z} \ \overset{d}{=}\ \frac{b_1}{\sqrt{b_1^2+\sum_{j=2}^{d}b_j^2}}. $$

Set \(S=\sum_{j=2}^{d}b_j^2\). Then \(S\sim\chi^2_{d-1}\), and \(S\) is independent of \(b_1\). Algebra gives

$$ \frac{r_{XY\cdot Z}\sqrt{d-1}}{\sqrt{1-r_{XY\cdot Z}^{\,2}}} = \frac{b_1}{\sqrt{S/(d-1)}}. $$

The right side is the defining ratio for a Student t variable with \(d-1\) degrees of freedom: its numerator is standard normal, its denominator is the square root of an independent chi-square variable divided by its degrees of freedom. Substituting \(d=n-q-1\) gives \(d-1=n-q-2\), proving the theorem. The conditional distribution does not depend on the design, so the same distribution holds unconditionally. \(\square\)

Worked Examples

Worked Example: No Controls Recovers the Ordinary Correlation Result

Suppose \(n=16\) independent observations come from a bivariate normal distribution with zero population correlation. With no controls, \(q=0\). The residual space has dimension \(d=16-1=15\), because only the intercept is fitted. Thus the transformed sample correlation has \(d-1=14\) degrees of freedom.

If the observed sample correlation is \(r=0.30\), its transformed value is

$$ 0.30\sqrt{\frac{14}{1-0.30^2}} = 0.30\sqrt{\frac{14}{0.91}} = 0.30\sqrt{15.3846\ldots} \approx 1.177. $$

The exact null reference distribution for this transformed value is \(t_{14}\). Setting \(q=0\) in the general formula gives \(n-q-2=n-2=14\), as expected for an ordinary sample correlation.

Worked Example: One Control Under a Gaussian Model

Let \(Z,U,V\) be mutually independent standard normal variables, and define \(X=2Z+U\) and \(Y=-Z+V\). The variables \((X,Y,Z)\) are jointly normal. After projecting \(X\) and \(Y\) on \(Z\), their residuals are \(U\) and \(V\), which have zero correlation. Thus the population partial correlation given \(Z\) is zero.

For \(n=20\) independent observations from this model, \(q=1\), and the residual space has dimension \(20-(1+1)=18\). The transformed sample partial correlation therefore has \(18-1=17\) degrees of freedom. For example, if the computed partial correlation is \(r_{XY\cdot Z}=-0.25\), then

$$ -0.25\sqrt{\frac{17}{1-(-0.25)^2}} = -0.25\sqrt{\frac{17}{0.9375}} = -0.25\sqrt{18.1333\ldots} \approx -1.065. $$

Under this model’s null, the transformed value has a \(t_{17}\) distribution. The sign remains negative because the denominator in the transformation is positive.

Worked Example: Two Controls and the Remaining Degrees of Freedom

Suppose \(n=25\) observations are used to calculate a partial correlation controlling for two variables, so \(q=2\). The fitted intercept and controls use three dimensions, leaving

$$ d=25-(2+1)=22 $$

dimensions for residual vectors. The correlation transformation uses one degree of freedom within that residual space, leaving \(d-1=21\) degrees of freedom for its t distribution. If \(r_{XY\cdot Z}=0.30\), then

$$ 0.30\sqrt{\frac{21}{1-0.30^2}} = 0.30\sqrt{\frac{21}{0.91}} = 0.30\sqrt{23.0769\ldots} \approx 1.441. $$

Thus, under a zero population partial correlation and the multivariate normal assumptions, this transformed value follows \(t_{21}\). The example shows why counting only the residual-space dimension would give the wrong degrees of freedom: the required t distribution has one fewer.

Why the Result Matters—and a Common Mistake

This result turns the geometry of a residual correlation into a precise probability model. The number of controls affects the available residual dimension, and the t transformation accounts for the additional variation involved in forming a correlation from two residual vectors. It also supplies an exact benchmark under the stated Gaussian null, rather than an approximation that requires a large sample.

Common mistake: A tempting argument is that fitting an intercept and \(q\) controls leaves \(n-q-1\) residual degrees of freedom, so the transformed correlation must have \(n-q-1\) t degrees of freedom. The first count is correct, but it is the dimension \(d\) of the residual space, not the degrees of freedom of the t distribution. The t ratio uses one coordinate for its normal numerator and the remaining \(d-1\) squared coordinates for its chi-square denominator. Therefore the correct count is \(n-q-2\).

The exactness also depends on the assumptions. The Gaussian model makes the population residuals independent under zero covariance and gives them isotropic normal distributions in the residual space. Outside that setting, zero partial correlation alone does not ensure the same exact t distribution. The formula should not be treated as a distribution-free identity.

Key takeaway: With \(q\) controls and an intercept, residualization leaves \(n-q-1\) dimensions. Under independent multivariate normal sampling and a zero population partial correlation, the transformed sample partial correlation has \(n-q-2\) Student t degrees of freedom.

Check Your Understanding

Use the assumptions and residual-space argument above to answer these questions.

  1. For \(n=32\) observations and \(q=4\) controls, what is the residual-space dimension, and what are the t degrees of freedom under the null?
  2. Why does zero population partial correlation imply independence of the two population residuals under the stated model?
  3. For \(n=18\) and \(q=2\), write the transformation applied to \(r_{XY\cdot Z}\) and state its null distribution.
  4. What role does the intercept play in the residual-space dimension?
  5. Why does the exact t result not follow from zero partial correlation alone for arbitrary nonnormal data?
Clinical Biostats