Why Shared-Variable Correlations Need a Different Test
Suppose the same participants provide measurements on three variables: a clinical score \(X\), a biomarker \(Y\), and a functional measure \(Z\). The correlations of interest might be \(X\) with \(Y\), and \(X\) with \(Z\). Although both correlations involve \(X\), they are not independent estimates: each uses the same participants and the same measurements of \(X\). A test that treats them as if they came from separate samples ignores that dependence and can misstate uncertainty.
The target is the difference between the two population correlations, not whether either correlation is individually zero. Write \(\rho_{XY}\) and \(\rho_{XZ}\) for the population correlations and \(r_{XY}\) and \(r_{XZ}\) for their sample counterparts. The usual two-sided comparison tests whether the population correlations are equal. The sample correlation between the two nonshared variables, \(Y\) and \(Z\), is also needed because it helps quantify the dependence between the estimates.
This is different from comparing correlations estimated in independent samples. Here, one row of data contains a complete triple \((X_i,Y_i,Z_i)\), and the triples are assumed to be independent across participants. The conventional Williams test uses all three correlations and a \(t\) reference distribution with \(n-3\) degrees of freedom. Its common small-sample calibration is not an exact distributional identity for every population; the usual theoretical setting is independent sampling from a trivariate normal distribution.
The Williams Test
For the calculation, abbreviate \(r_{XY}=r_{12}\), \(r_{XZ}=r_{13}\), and \(r_{YZ}=r_{23}\). First form the determinant of the sample correlation matrix:
The matrix whose determinant is \(K\) has ones on its diagonal and the three sample correlations off the diagonal. For a positive-definite sample correlation matrix, \(K>0\). The Williams statistic for the two correlations sharing \(X\) is
For a two-sided test at level \(\alpha\), compare \(|t_W|\) with the \(1-\alpha/2\) quantile of the \(t_{n-3}\) distribution, or use the corresponding two-sided \(p\)-value. The sign of \(t_W\) is the sign of \(r_{12}-r_{13}\), so it indicates which sample correlation is larger. The test requires \(n>3\), nonconstant measurements, and a valid set of three sample correlations. The positive-definite case avoids singular boundary situations in which the usual calculation or its interpretation can break down.
Worked Example: Comparing Two Positive Correlations
In \(n=60\) participants, suppose \(r_{XY}=0.60\), \(r_{XZ}=0.30\), and \(r_{YZ}=0.40\). Test whether the two correlations sharing \(X\) differ, using a two-sided 5% test.
Check the correlation matrix. Its determinant is \(K=1-0.60^2-0.30^2-0.40^2+2(0.60)(0.30)(0.40)\). Thus \(K=1-0.36-0.09-0.16+0.144=0.534\), which is positive. The other two-by-two principal minors are \(1-0.60^2=0.64\), \(1-0.30^2=0.91\), and \(1-0.40^2=0.84\), all positive, so this is a positive-definite correlation matrix.
Calculate the numerator. It is \((0.60-0.30)\sqrt{(60-1)(1+0.40)} =0.30\sqrt{59(1.40)} =0.30\sqrt{82.6}\approx2.7265\).
Calculate the denominator. Its squared value is \[ \frac{2(0.534)(59)}{57} +\frac{(0.60+0.30)^2}{4}(1-0.40)^3 =\frac{63.012}{57}+0.2025(0.216) \approx1.10547+0.04374=1.14921. \] The denominator is therefore approximately \(\sqrt{1.14921}=1.0720\).
The statistic is \(t_W\approx2.7265/1.0720=2.543\), with \(60-3=57\) degrees of freedom. The two-sided \(p\)-value is about \(0.014\), below \(0.05\). Using the conventional Williams calibration, reject equality of the population correlations. In this sample, the correlation of \(X\) with \(Y\) is the larger one.
Why the Other Correlation Matters
A useful way to see the dependence is to examine the large-sample variance of the difference of sample correlations. This also gives a second, asymptotic comparison procedure. Let \(X,Y,Z\) be standardized jointly normal variables with correlations \(a=\rho_{XY}\), \(b=\rho_{XZ}\), and \(c=\rho_{YZ}\). The influence functions for the two sample correlations, with the usual sample Pearson correlations, are
They have mean zero. For example, \(E[XY]=a\) and \(E[X^2+Y^2]=2\), giving \(E[\psi_{XY}]=0\). The first-order sampling fluctuation of \(r_{XY}-r_{XZ}\) is the average of \(\psi_{XY}-\psi_{XZ}\) over the observations. Its variance therefore depends on the covariance between the two influence functions.
Here is a derivation. The Gaussian fourth-moment identity (Isserlis' formula) gives \(E[X^2YZ]=c+2ab\), \(E[X^3Y]=3a\), and \(E[XYZ^2]=a+2bc\), with the analogous identities obtained by exchanging \(Y\) and \(Z\). Expanding the product of the two influence functions and substituting these moments yields
The same fourth-moment expansion gives \(\operatorname{Var}(\psi_{XY})=(1-a^2)^2\) and \(\operatorname{Var}(\psi_{XZ})=(1-b^2)^2\). Subtracting twice the covariance from the sum of these variances gives
The multivariate central limit theorem applied to the vector of sample correlations, followed by the linear transformation that subtracts its two components, gives the stated asymptotic variance. Estimating \(a,b,c\) by \(r_{XY},r_{XZ},r_{YZ}\) gives a consistent plug-in estimate when the population correlation matrix is nonsingular. Under \(H_0:a=b\), the difference is zero, so dividing the observed difference by its estimated asymptotic standard error gives a statistic that is asymptotically standard normal. This Wald procedure is an asymptotic alternative; it is not the Williams statistic or its \(t\) calibration. \(\square\)
Worked Example: Seeing Covariance in the Asymptotic Variance
Use the correlations \(r_{XY}=0.60\), \(r_{XZ}=0.30\), \(r_{YZ}=0.40\) from the previous calculation, now as plug-in values for the asymptotic variance. The estimated variance coefficient is
\((1-0.60^2)^2+(1-0.30^2)^2-2(0.40)(1-0.60^2-0.30^2)+(0.60)(0.30)(1-0.60^2-0.30^2-0.40^2)\).
Term by term, this is \(0.64^2+0.91^2-0.80(0.55)+0.18(0.39) =0.4096+0.8281-0.4400+0.0702=0.8679\). For \(n=60\), the estimated standard error is \(\sqrt{0.8679/60}\approx0.1203\). The asymptotic Wald statistic is \((0.60-0.30)/0.1203\approx2.49\). The covariance contribution is built into the expression through \(r_{YZ}\); omitting it would not give the variance of the difference.
Interpreting the Test and Checking the Inputs
The two procedures have the same substantive target but different calibrations. The Williams test is a familiar small-sample test with a \(t_{n-3}\) reference distribution under its conventional assumptions. The asymptotic Wald test follows directly from the large-sample variance calculation and uses a standard normal reference distribution. A report should identify the method used, give the three observed correlations and sample size, and state the estimated difference and test result. A significant result indicates evidence that the population correlations differ; it does not establish that one variable causes the other.
Worked Example: A Smaller, Nonsignificant Difference
Suppose \(n=40\), \(r_{XY}=0.50\), \(r_{XZ}=0.20\), and \(r_{YZ}=0.10\). The determinant is \(K=1-0.50^2-0.20^2-0.10^2+2(0.50)(0.20)(0.10) =1-0.25-0.04-0.01+0.02=0.72\). The two-by-two principal minors are \(0.75\), \(0.96\), and \(0.99\); all are positive, so the correlation matrix is positive definite.
The numerator of \(t_W\) is \((0.50-0.20)\sqrt{39(1.10)} =0.30\sqrt{42.9}\approx1.9649\). The denominator squared is \[ \frac{2(0.72)(39)}{37} +\frac{(0.50+0.20)^2}{4}(1-0.10)^3 =\frac{56.16}{37}+0.1225(0.729) \approx1.51784+0.08930=1.60714. \] Thus the denominator is about \(1.2677\), and \(t_W\approx1.550\) with \(37\) degrees of freedom. Its two-sided \(p\)-value is about \(0.13\), so the test does not reject equality at the 5% level. The observed difference of \(0.30\) alone is not enough to determine significance; the sample size and dependence structure matter too.
Common Mistakes
- Using an independent-samples test. The estimates share observations and one variable, so their sampling errors are related. Use a dependent-correlation method.
- Leaving out \(r_{YZ}\). The nonshared variables’ correlation is part of the dependence information. The Williams statistic and the asymptotic variance both account for it.
- Testing each correlation against zero instead. The question \(H_0:\rho_{XY}=\rho_{XZ}\) is not the pair of questions \(H_0:\rho_{XY}=0\) and \(H_0:\rho_{XZ}=0\). Two individually significant correlations may or may not differ significantly from one another.
- Making an arithmetic error in \(K\). Keep the product term \(2r_{12}r_{13}r_{23}\) and all three squared correlations. Check that the resulting matrix is admissible before interpreting the test.
- Calling the Williams calibration universally exact. It is a standard dependent-correlation test with a conventional \(t\) reference; be explicit about its assumptions and distinguish it from the asymptotic Wald procedure.
Check Your Understanding
Answer each question by identifying the dependence or calculation involved.
- For three measurements taken on the same participants, which sample correlation in addition to \(r_{XY}\) and \(r_{XZ}\) enters the Williams test?
- State the null hypothesis for comparing the population correlations of \(X\) with \(Y\) and \(X\) with \(Z\).
- For \(n=52\), what are the reference degrees of freedom in the conventional Williams test?
- Why does a test for two independent correlations fail to represent the sampling structure when the same participants supply both correlations?
- In the asymptotic variance derivation, what role does \(\operatorname{Cov}(\psi_{XY},\psi_{XZ})\) play in the variance of the difference?