Tutorials › Multivariate Statistics (Graduate) › The Sample Correlation From A Bivariate Wishart Matrix

Wishart Sampling Theory · Tutorial 132 of 975

The Sample Correlation From A Bivariate Wishart Matrix

Derive the zero-correlation sampling density from the Wishart density, then see how its shape and support change at small degrees of freedom.

Intermediate 11 min read

What You'll Learn

  • Express the sample correlation as a function of the entries of a two-dimensional Wishart matrix.
  • Derive and normalize its density under zero population correlation.
  • Relate centered Gaussian sample size to Wishart degrees of freedom.
  • Identify the sampling laws at one, two, and three degrees of freedom.
  • Derive the second moment and distinguish it from the variance of the correlation.
  • Recognize when the sample correlation is undefined or concentrated at the endpoints.

From Wishart Scatter to Sample Correlation

A sample correlation is a ratio of three entries of a scatter matrix. Even when two population variables are independent, that ratio is random: its numerator fluctuates around zero, while its denominator is itself estimated from the data. A two-dimensional Wishart model makes it possible to derive the full sampling distribution of this ratio, including its behavior when the sample size is very small.

Let \(W\) be a \(2\times2\) Wishart matrix with \(\nu\) degrees of freedom and diagonal scale matrix \(\operatorname{diag}(\sigma_1^2,\sigma_2^2)\), where \(\sigma_1,\sigma_2>0\). Under zero population correlation, its off-diagonal scale entry is zero. The sample correlation formed from the scatter entries is

$$ R=\frac{W_{12}}{\sqrt{W_{11}W_{22}}}. $$

For \(n\) independent bivariate normal observations with unknown mean, the centered scatter matrix has \(\nu=n-1\) degrees of freedom. If the mean is known and the scatter is formed about that known mean, then \(\nu=n\). The distribution below is stated in terms of \(\nu\), so the appropriate sample-size convention must be chosen before applying it.

Definition: For \(\nu>1\), let \(W\sim W_2(\nu,\Sigma)\) with \(\Sigma=\operatorname{diag}(\sigma_1^2,\sigma_2^2)\), where both diagonal entries are positive. The Wishart sample correlation is \(R=W_{12}/\sqrt{W_{11}W_{22}}\). Since multiplying either variable by a positive constant does not change its correlation, its distribution is the same as when \(\Sigma=I_2\).

The condition \(\nu>1\) is the nonsingularity condition for a two-dimensional Wishart density. The case \(\nu=1\) must be handled separately: the Wishart matrix then has rank one, and the ratio is supported only at \(-1\) and \(1\).

Deriving the Density

It suffices to take \(\Sigma=I_2\). Write \(W_{11}=x\), \(W_{22}=z\), and \(W_{12}=y\). The Wishart density, with respect to \(dx\,dy\,dz\) on positive-definite matrices, is

$$ f_{x,y,z}(x,y,z) = \frac{(xz-y^2)^{(\nu-3)/2}e^{-(x+z)/2}} {2^\nu\Gamma_2(\nu/2)}, \qquad x>0,\quad z>0,\quad y^2<xz, $$

where \(\Gamma_2(a)=\pi^{1/2}\Gamma(a)\Gamma(a-1/2)\) is the multivariate gamma function in dimension two. Transform to \(r=y/\sqrt{xz}\), so \(y=r\sqrt{xz}\) and \(-1<r<1\). The absolute Jacobian of \((x,z,r)\mapsto(x,z,y)\) is \(\sqrt{xz}\). Consequently, the transformed density is

$$ \frac{(xz)^{(\nu-2)/2}(1-r^2)^{(\nu-3)/2}e^{-(x+z)/2}} {2^\nu\Gamma_2(\nu/2)}. $$

The powers of \(x\) and \(z\) each have exponent \(\nu/2-1\). Integrating each over the positive half-line gives \(2^{\nu/2}\Gamma(\nu/2)\). Thus the joint density of \(x,z,r\), after integrating out \(x\) and \(z\), is

$$ f_R(r) = \frac{\Gamma(\nu/2)} {\sqrt{\pi}\,\Gamma((\nu-1)/2)} (1-r^2)^{(\nu-3)/2}, \qquad -1<r<1. $$

It is zero outside this interval. The constant follows because \(\Gamma_2(\nu/2)=\sqrt{\pi}\Gamma(\nu/2)\Gamma((\nu-1)/2)\). The density is integrable precisely when \((\nu-3)/2>-1\), or \(\nu>1\), agreeing with the nonsingularity condition.

Theorem: If \(W\sim W_2(\nu,\operatorname{diag}(\sigma_1^2,\sigma_2^2))\) with \(\nu>1\) and \(\sigma_1,\sigma_2>0\), then \(R=W_{12}/\sqrt{W_{11}W_{22}}\) has density $$ f_R(r)= \frac{\Gamma(\nu/2)} {\sqrt{\pi}\,\Gamma((\nu-1)/2)} (1-r^2)^{(\nu-3)/2},\qquad -1<r<1. $$

Small Degrees of Freedom: Three Worked Cases

The exponent \((\nu-3)/2\) determines whether the density is large or small near the endpoints. The smallest nonsingular degrees of freedom illustrate three different shapes.

Worked Example: Three Degrees of Freedom Give a Uniform Correlation

Set \(\nu=3\). The normalizing constant is \[ \frac{\Gamma(3/2)}{\sqrt{\pi}\Gamma(1)} = \frac{\sqrt{\pi}/2}{\sqrt{\pi}} = \frac12, \] and the power of \(1-r^2\) is zero. Therefore \(R\) is uniform on \((-1,1)\), with density \(f_R(r)=1/2\).

As a check, the density integrates to \((1/2)\times2=1\). Its mean is zero by symmetry. Its second moment is \[ E[R^2]=\int_{-1}^{1}r^2\frac12\,dr =\frac12\left[\frac{r^3}{3}\right]_{-1}^{1} =\frac12\left(\frac13-\left(-\frac13\right)\right) =\frac13. \] The integral without the density factor is \(\int_{-1}^{1}r^2\,dr=2/3\), or approximately \(0.6667\); multiplying by the uniform density \(1/2\) gives the expectation \(1/3\), not \(2/3\).

Worked Example: Two Degrees of Freedom and Endpoint Concentration

For \(\nu=2\), the density becomes \[ f_R(r)=\frac{1}{\pi\sqrt{1-r^2}},\qquad -1<r<1. \] It diverges as \(r\) approaches either endpoint, but the divergence is integrable. To verify normalization, set \(r=\sin t\); then \(dr=\cos t\,dt\) and \(\sqrt{1-r^2}=\cos t\) for \(-\pi/2<t<\pi/2\). Hence the integral of the density is \[ \frac1\pi\int_{-\pi/2}^{\pi/2}dt=1. \]

For example, the probability that \(|R|>0.8\) is \[ P(|R|>0.8) =\frac{2}{\pi}\int_{0.8}^{1}\frac{dr}{\sqrt{1-r^2}} =\frac{2}{\pi}\left(\frac{\pi}{2}-\arcsin(0.8)\right) =\frac{2}{\pi}\arccos(0.8) \approx 0.410. \] Thus a large absolute sample correlation is not especially surprising with only two Wishart degrees of freedom, even when the population correlation is zero.

Worked Example: One Degree of Freedom Is Singular

Now let \(\nu=1\). The density formula cannot be used: its exponent would be \(-1\), and the Wishart matrix is singular rather than having a density on the positive-definite matrices. Write \(W=uu^\mathsf{T}\), where \(u=(U,V)^\mathsf{T}\) and \(U,V\) are independent standard normal variables under the zero-correlation model. Then \(W_{11}=U^2\), \(W_{22}=V^2\), and \(W_{12}=UV\). With probability one, neither \(U\) nor \(V\) is zero, so \[ R=\frac{UV}{|U||V|}=\operatorname{sign}(UV). \]

The signs of independent centered normal variables are independent, with probability \(1/2\) for each sign. Therefore \(P(R=1)=P(R=-1)=1/2\). This is a two-point distribution, not a continuous density. For centered observations, \(\nu=1\) corresponds to \(n=2\); each centered variable has only one direction of variation, so their sample correlation must be exactly \(1\) or \(-1\).

Moment and Shape Checks

The density is symmetric about zero, so \(E[R]=0\). Its second moment can be derived for every \(\nu>1\), giving a useful check on calculations and simulations.

Result: For \(\nu>1\), \(R^2\) has a beta distribution with parameters \(1/2\) and \((\nu-1)/2\). In particular, \(E[R^2]=1/\nu\), and since \(E[R]=0\), \(\operatorname{Var}(R)=1/\nu\).

To prove the result, let \(T=R^2\). For \(0<t<1\), the two inverse values are \(r=\sqrt{t}\) and \(r=-\sqrt{t}\); each has absolute derivative \(1/(2\sqrt{t})\). By symmetry, their contributions to the density of \(T\) are equal. Thus

$$ f_T(t)=\frac{f_R(\sqrt{t})}{\sqrt{t}} = \frac{\Gamma(\nu/2)} {\sqrt{\pi}\Gamma((\nu-1)/2)} t^{-1/2}(1-t)^{(\nu-3)/2}, \qquad 0<t<1. $$

A beta density with parameters \(a,b>0\) is proportional to \(t^{a-1}(1-t)^{b-1}\) on \((0,1)\). Here \(a=1/2\) and \(b=(\nu-1)/2\), both positive. The constant above is \(1/B(a,b)\), so \(T\) has the stated beta distribution. Using \(B(a,b)=\Gamma(a)\Gamma(b)/\Gamma(a+b)\),

$$ E[T]=\frac{B(a+1,b)}{B(a,b)} =\frac{\Gamma(a+1)\Gamma(a+b)} {\Gamma(a)\Gamma(a+b+1)} =\frac{a}{a+b} =\frac{1}{\nu}. $$

The last equality uses \(\Gamma(a+1)=a\Gamma(a)\) and \(a+b=\nu/2\). Symmetry gives \(E[R]=0\), and therefore \(\operatorname{Var}(R)=E[R^2]-(E[R])^2=1/\nu\). This also confirms the uniform-case calculation: at \(\nu=3\), the second moment is \(1/3\). \(\square\)

For \(1<\nu<3\), the exponent is negative and the density increases without bound near \(r=\pm1\), while remaining integrable. At \(\nu=3\), it is constant. For \(\nu>3\), the density tends to zero at both endpoints. As \(\nu\) grows, the variance \(1/\nu\) decreases, so the distribution places progressively more mass near zero. These statements concern the density’s shape and variance; none says the correlation can exceed its natural bounds \([-1,1]\).

Common Pitfall: Confusing a Singular Law with a Density

A common mistake is to substitute \(\nu=1\) into the continuous density formula, obtain a nonintegrable expression, and try to normalize it. The failure is not a defect in the calculation: the formula assumes a nonsingular two-dimensional Wishart matrix, which requires \(\nu>1\). At \(\nu=1\), the matrix has rank one and the correlation has point masses at the endpoints. At \(\nu=0\), as can occur for a centered sample of size one, both centered sums of squares are zero and the sample correlation is undefined.

Another easy error is to confuse the unweighted integral \(\int_{-1}^{1}r^2\,dr=2/3\) with the expectation under the uniform density. An expectation includes the density: for \(R\) uniform on \((-1,1)\), \(E[R^2]=(1/2)(2/3)=1/3\). Keeping the density factor visible is a simple way to catch the mistake.

Key takeaway: Under zero population correlation, the sample correlation from a two-dimensional Wishart matrix has density proportional to \((1-r^2)^{(\nu-3)/2}\) when \(\nu>1\). The low-degree cases matter: \(\nu=2\) gives an endpoint-singular density, \(\nu=3\) gives a uniform law, and \(\nu=1\) gives a two-point distribution.

Check Your Understanding

Use the degrees of freedom and the support of the correlation carefully.

  1. For a centered bivariate normal sample of size \(n=8\), what Wishart degrees of freedom apply, and what is the variance of the sample correlation under zero population correlation?
  2. Why can the density for \(\nu=2\) diverge at \(r=\pm1\) and still integrate to one?
  3. For \(\nu=3\), calculate \(P(|R|<1/2)\) from the uniform density.
  4. Describe the distribution of \(R\) when \(\nu=1\), and explain why a continuous density formula does not apply.
  5. For a uniform random variable on \((-1,1)\), distinguish \(\int_{-1}^{1}r^2\,dr\) from \(E[R^2]\).
Clinical Biostats