Tutorials › Statistical Theory I - Probability and Distribution Theory › The Sample Correlation Under Zero Normal Correlation

Exact Sampling Distributions · Tutorial 780 of 994

The Sample Correlation Under Zero Normal Correlation

See why the sample correlation has a beta-shaped exact distribution under zero bivariate-normal correlation, and calculate probabilities from it.

Advanced 10 min read

What You'll Learn

  • Express Pearson’s sample correlation as the cosine between centered data vectors.
  • Derive the exact density under independent bivariate-normal coordinates.
  • Identify the exceptional cases when the sample size is one or two.
  • Use the beta representation to calculate exact probabilities.
  • Derive the mean and variance of the sample correlation under the null.

Why the Exact Null Distribution Has a Geometric Form

Pearson’s sample correlation is a ratio built from the same observations in its numerator and denominator, so its finite-sample behavior is not obtained by treating those pieces as independent. Under a bivariate normal model with zero correlation, however, the centered data vectors have a useful geometric interpretation: the sample correlation is the cosine of the angle between two independent, rotationally symmetric Gaussian vectors. This yields an exact distribution for every sample size \(n\geq 3\).

The result depends on the joint normal model, not just on a population correlation of zero. We will make that assumption explicit and derive the density from the geometry of the centered sample.

Definition: Let \((X_i,Y_i)\), \(i=1,\ldots,n\), be independent and identically distributed observations from a bivariate normal distribution with means \(\mu_X,\mu_Y\), positive standard deviations \(\sigma_X,\sigma_Y\), and correlation \(0\). For \(n\geq 2\), the Pearson sample correlation is $$ r=\frac{\sum_{i=1}^n(X_i-\bar X)(Y_i-\bar Y)} {\sqrt{\sum_{i=1}^n(X_i-\bar X)^2}\sqrt{\sum_{i=1}^n(Y_i-\bar Y)^2}}, $$ where \(\bar X=n^{-1}\sum_{i=1}^n X_i\) and \(\bar Y=n^{-1}\sum_{i=1}^n Y_i\). For \(n=1\), this statistic is undefined. Under the stated model and \(n\geq 3\), its density is $$ f_r(u)=\frac{\Gamma((n-1)/2)}{\sqrt{\pi}\,\Gamma((n-2)/2)} (1-u^2)^{(n-4)/2},\qquad -1<u<1, $$ and is zero outside this interval.

Centering Turns Correlation Into a Cosine

Write \(X=(X_1,\ldots,X_n)^\mathsf{T}\) and \(Y=(Y_1,\ldots,Y_n)^\mathsf{T}\). Let \(P=I_n-\boldsymbol{1}\boldsymbol{1}^\mathsf{T}/n\), the orthogonal projection onto the subspace $$ H=\{v\in\mathbb{R}^n:\boldsymbol{1}^\mathsf{T}v=0\}. $$ The vectors \(PX\) and \(PY\) are the centered observations. In this notation, $$ r=\frac{(PX)^\mathsf{T}(PY)}{\|PX\|\|PY\|}. $$ Thus \(r\) is the cosine of the angle between the two centered vectors, whenever both have nonzero length.

Under the model in the definition, the standardized observation vectors \((X-\mu_X\boldsymbol{1})/\sigma_X\) and \((Y-\mu_Y\boldsymbol{1})/\sigma_Y\) are independent standard normal vectors in \(\mathbb{R}^n\). Independence follows because the observations are jointly normal and the two coordinates have zero covariance. Projection removes each mean, and multiplication by the positive scales \(\sigma_X,\sigma_Y\) does not change the angle. Choose an orthonormal basis of \(H\), whose dimension is \(m=n-1\). In those coordinates, the two projected standardized vectors are independent \(N_m(0,I_m)\) vectors.

A standard normal vector in \(\mathbb{R}^m\) has a direction uniformly distributed over the unit sphere: its density depends only on its distance from the origin, so no direction is preferred. The two directions here are independent. By rotational symmetry, the distribution of their inner product is the same as the distribution of the first coordinate of a uniform direction in \(\mathbb{R}^m\). This reduces the sampling problem to a one-coordinate calculation.

Worked Example: A Sample of Four Pairs

Suppose four independent pairs follow a bivariate normal distribution with means \(2\) and \(-1\), standard deviations \(3\) and \(2\), and correlation zero. Here \(n=4\), so the density formula gives $$ f_r(u)=\frac{\Gamma(3/2)}{\sqrt{\pi}\Gamma(1)}(1-u^2)^0 =\frac{1}{2},\qquad -1<u<1, $$ because \(\Gamma(3/2)=\sqrt{\pi}/2\) and \(\Gamma(1)=1\). Thus \(r\) is uniform on \((-1,1)\) in this case.

For example, the exact probability that the observed correlation exceeds \(1/2\) is $$ P(r>1/2)=\int_{1/2}^{1}\frac{1}{2}\,du =\frac{1}{2}\left(1-\frac{1}{2}\right)=\frac{1}{4}. $$ The means and scales do not enter this calculation: centering removes the means, and positive rescaling leaves the correlation unchanged.

Deriving the Density

We now derive the coordinate distribution used above. Let \(Z=(Z_1,\ldots,Z_m)^\mathsf{T}\sim N_m(0,I_m)\). Its direction \(Z/\|Z\|\) is uniform on the sphere, and its first coordinate is $$ R=\frac{Z_1}{\sqrt{Z_1^2+\cdots+Z_m^2}}. $$ The denominator is nonzero with probability one.

Theorem: For an integer \(m\geq 2\), the first coordinate \(R\) of a uniform direction in \(\mathbb{R}^m\) has density $$ f_R(u)=\frac{\Gamma(m/2)}{\sqrt{\pi}\,\Gamma((m-1)/2)} (1-u^2)^{(m-3)/2},\qquad -1<u<1. $$

Proof. Let \(A=Z_1^2\) and \(B=\sum_{j=2}^m Z_j^2\). These are independent chi-square variables with \(1\) and \(m-1\) degrees of freedom. The chi-square density with \(k\) degrees of freedom is \(x^{k/2-1}e^{-x/2}/(2^{k/2}\Gamma(k/2))\) for \(x>0\). Set \(T=A/(A+B)\) and \(S=A+B\), so \(A=ST\), \(B=S(1-T)\), and the absolute Jacobian is \(S\). Writing \(a=1/2\) and \(b=(m-1)/2\), the joint density after this change of variables is $$ \frac{s^{a+b-1}e^{-s/2}}{2^{a+b}\Gamma(a)\Gamma(b)} t^{a-1}(1-t)^{b-1},\qquad s>0,\quad 0<t<1. $$ Integrating over \(s\) gives $$ f_T(t)=\frac{t^{a-1}(1-t)^{b-1}}{B(a,b)},\qquad 0<t<1, $$ where \(B(a,b)=\Gamma(a)\Gamma(b)/\Gamma(a+b)\). The sign of \(Z_1\) is equally likely to be positive or negative and is independent of \(T\), so \(R\) has the same sign as \(Z_1\) and \(R^2=T\). For \(0<u<1\), the density contribution from \(R=u\) is \(\frac12 f_T(u^2)2u=u f_T(u^2)\); the same expression with \(|u|\) holds for negative \(u\). Substituting \(a=1/2\) cancels the factor \(|u|\) against \((u^2)^{-1/2}\), leaving $$ f_R(u)=\frac{1}{B(1/2,(m-1)/2)}(1-u^2)^{(m-3)/2}. $$ Using \(\Gamma(1/2)=\sqrt{\pi}\) gives the stated density. \(\square\)

For the sample correlation, \(m=n-1\), so substituting \(m=n-1\) proves the density in the definition. The exponent is \((n-4)/2\), and the normalizing constant is \(\Gamma((n-1)/2)/(\sqrt{\pi}\Gamma((n-2)/2))\). The density integrates to one because it was obtained from the probability density of \(T\), with the two signs of \(R\) accounting for the full interval \((-1,1)\).

Worked Example: Three Pairs and the Arcsine Density

With \(n=3\), the centered subspace has dimension \(m=2\). The sample-correlation density becomes $$ f_r(u)=\frac{\Gamma(1)}{\sqrt{\pi}\Gamma(1/2)}(1-u^2)^{-1/2} =\frac{1}{\pi\sqrt{1-u^2}},\qquad -1<u<1. $$ This is the arcsine density. It is higher near \(-1\) and \(1\) than near zero, while remaining integrable.

To find the probability that the absolute sample correlation is less than \(1/2\), integrate over the symmetric interval: $$ P(|r|<1/2)=\int_{-1/2}^{1/2}\frac{du}{\pi\sqrt{1-u^2}} =\frac{2}{\pi}\arcsin(1/2) =\frac{2}{\pi}\cdot\frac{\pi}{6} =\frac{1}{3}. $$ The result illustrates how variable the correlation can be in a very small sample, even when the population correlation is exactly zero.

Beta Representation and Moments

The same derivation gives a compact distributional description. Since \(r^2=T\) has a beta distribution with parameters \(1/2\) and \((n-2)/2\), and the sign of \(r\) is independent and equally likely to be either sign, a linear transformation gives $$ \frac{r+1}{2}\sim\operatorname{Beta}\left(\frac{n-2}{2},\frac{n-2}{2}\right),\qquad n\geq 3. $$ Here a \(\operatorname{Beta}(a,b)\) variable has density \(x^{a-1}(1-x)^{b-1}/B(a,b)\) on \(0<x<1\). This representation is convenient for exact interval probabilities and makes the symmetry about zero explicit.

Result: Under the zero-correlation bivariate normal model, \(E[r]=0\) and \(\operatorname{Var}(r)=1/(n-1)\) for \(n\geq 3\).

Derivation. The density of \(r\) is symmetric about zero, so \(E[r]=0\). From the beta derivation, \(r^2=T\) with \(T\sim\operatorname{Beta}(a,b)\), where \(a=1/2\) and \(b=(n-2)/2\). For a beta variable, $$ 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}. $$ The second equality uses \(\Gamma(a+1)=a\Gamma(a)\) and \(\Gamma(a+b+1)=(a+b)\Gamma(a+b)\). Therefore $$ E[r^2]=E[T]=\frac{1/2}{(n-1)/2}=\frac{1}{n-1}. $$ Since the mean is zero, \(\operatorname{Var}(r)=E[r^2]-(E[r])^2=1/(n-1)\). \(\square\)

Worked Example: A Tail Probability for Six Pairs

For six independent pairs from any bivariate normal distribution with zero correlation and positive marginal variances, \(n=6\). The exact density is $$ f_r(u)=\frac{\Gamma(5/2)}{\sqrt{\pi}\Gamma(2)}(1-u^2) =\frac{3}{4}(1-u^2),\qquad -1<u<1. $$ Here \(\Gamma(5/2)=3\sqrt{\pi}/4\) and \(\Gamma(2)=1\). The probability of a sample correlation greater than \(1/2\) is $$ P(r>1/2)=\frac{3}{4}\int_{1/2}^{1}(1-u^2)\,du =\frac{3}{4}\left[u-\frac{u^3}{3}\right]_{1/2}^{1} =\frac{3}{4}\left(\frac{2}{3}-\frac{11}{24}\right) =\frac{3}{4}\cdot\frac{5}{24} =\frac{5}{32}. $$ As a check on the moment result, \(E[r^2]=1/(6-1)=1/5\). The probability calculation and moment describe different features of the same exact distribution.

Boundary Cases and Common Pitfalls

The theorem requires \(n\geq 3\). If \(n=2\), the centered subspace has dimension one, so the two nonzero centered vectors must point in the same or opposite directions. Under the zero-correlation model each direction is equally likely to have either sign, independently of the other; consequently \(r=1\) and \(r=-1\) each have probability \(1/2\). There is no continuous density on \((-1,1)\). If \(n=1\), both centered sums of squares are zero and the sample correlation is undefined.

  • Using the formula for \(n=2\). Substitution would produce an exponent of \(-1\), but that expression is not a density for the actual two-pair statistic. The statistic is concentrated at the two endpoints.
  • Assuming zero correlation alone is enough. The derivation uses independent Gaussian coordinate vectors, which follows from zero correlation together with joint normality. For a nonnormal distribution, zero population correlation does not generally make the coordinates independent or give this exact law.
  • Ignoring sample size. The density changes with \(n\); it is not a single universal null distribution. In particular, the \(n=3\) density is strongly concentrated near the endpoints, unlike the uniform density for \(n=4\).
  • Treating the unknown means or positive scales as if they changed the law. Centering eliminates the means and positive rescaling leaves \(r\) unchanged. The exact law is therefore the same for all allowed means and positive marginal standard deviations under the stated model.
Key takeaway: For \(n\geq 3\), the sample correlation from independent bivariate-normal coordinates is the cosine between independent uniform directions in a space of dimension \(n-1\). That geometry yields the exact density, its beta representation, and the variance \(1/(n-1)\).

Check Your Understanding

Use the geometric argument and exact density to answer these questions.

  1. Why does centering the two data vectors place them in a space of dimension \(n-1\)?
  2. For \(n=5\), write the density of \(r\), including its normalizing constant and support.
  3. What is the distribution of \(r^2\) when \(n=7\)?
  4. Why does the density formula not describe the sample correlation when \(n=2\)?
  5. Under the stated model, what are \(E[r]\) and \(\operatorname{Var}(r)\) for \(n=10\)?