Covariance Measures Linear Association
Independence is a strong condition: knowing the value of one random variable does not change the distribution of the other. Covariance measures something more specific. It records whether deviations from the means tend to have the same sign or opposite signs, in an averaged linear sense.
Independence, together with finite second moments, implies zero covariance. The converse is not true in general. A simple way to see the gap is to take a symmetric random variable and compare it with its square: symmetry can force the covariance to vanish, even though the square is determined exactly by the original variable.
The finite-second-moment assumption ensures that the quantities in the definition exist: by the Cauchy–Schwarz inequality, \(\mathbb{E}|XY|\leq \sqrt{\mathbb{E}[X^2]\mathbb{E}[Y^2]}<\infty\).
If \(X\) and \(Y\) are independent and have finite second moments, expectation factorization gives \(\mathbb{E}[XY]=\mathbb{E}X\,\mathbb{E}Y\), so their covariance is zero. The point of this tutorial is that this implication cannot generally be reversed.
A Symmetric Variable and Its Square
Let \(X\) have a distribution symmetric about zero, with finite third absolute moment. Symmetry means that \(X\) and \(-X\) have the same distribution. In particular, the expectations of integrable odd functions of \(X\) vanish, so \(\mathbb{E}X=0\) and \(\mathbb{E}[X^3]=0\). Set \(Y=X^2\). Then
This computation only says that the linear covariance vanishes. It does not say that \(X\) and \(Y\) are independent. In fact, \(Y\) is a function of \(X\), and a nonconstant square can reveal information about \(X\).
Worked Example: A Uniform Variable and Its Square
Let \(X\) be uniformly distributed on \((-1,1)\), and define \(Y=X^2\). The density of \(X\) is \(1/2\) on that interval. Direct integration gives
Thus \(\operatorname{Cov}(X,Y)=\mathbb{E}[X^3]-\mathbb{E}X\,\mathbb{E}[X^2]=0-(0)(1/3)=0\). To test independence, consider the events \(A=\{|X|\leq 1/2\}\) and \(B=\{Y\leq 1/4\}\). Since \(Y=X^2\), these are the same event. Its probability is \(1/2\), because the interval \([-1/2,1/2]\) has length \(1\) inside an interval of length \(2\). Therefore
The event factorization required by independence fails, so \(X\) and \(Y\) are dependent despite having zero covariance.
Another Continuous Example
The same mechanism is not specific to a uniform distribution. A standard normal variable is symmetric, and its odd moments vanish when they exist. Its square is again determined by it, so it is dependent on that square. The following calculation makes both conclusions explicit.
Worked Example: A Standard Normal Variable and Its Square
Let \(Z\) have the standard normal distribution and put \(W=Z^2\). The standard normal moments give \(\mathbb{E}Z=0\), \(\mathbb{E}[Z^2]=1\), and \(\mathbb{E}[Z^3]=0\). Consequently,
Let \(A=\{|Z|\leq 1\}\) and \(B=\{W\leq 1\}\). Again, \(A=B\), since \(W=Z^2\). Write \(p=\mathbb{P}(|Z|\leq 1)\). The standard normal density is positive everywhere, so \(0<p<1\): the interval \([-1,1]\) has positive probability, and its complement also has positive probability. It follows that \(\mathbb{P}(A\cap B)=p\), whereas \(\mathbb{P}(A)\mathbb{P}(B)=p^2\). Since \(0<p<1\), \(p\ne p^2\). Thus these variables are dependent as well as uncorrelated.
In both examples, symmetry cancels the positive and negative contributions to the covariance. But the square records magnitude, and magnitude is not independent of the original variable. The failure of covariance to detect that dependence is not a defect in the calculation: covariance is only a particular summary of the joint behavior.
When Zero Covariance Does Imply Independence
Additional structure can make covariance decisive. A central case is a jointly Gaussian pair. Joint Gaussianity is stronger than requiring each variable separately to have a normal distribution: it requires every linear combination of the pair to be normal, including the possibility of a degenerate normal distribution.
The key fact is that the joint characteristic function of a jointly Gaussian pair is determined by its means and covariance matrix. If the covariance is zero, this characteristic function separates into the product of the two marginal characteristic functions.
Proof. Independence implies zero covariance by expectation factorization, as noted above. For the other direction, suppose that \(\operatorname{Cov}(X,Y)=0\). Write \(\mu_X=\mathbb{E}X\) and \(\mu_Y=\mathbb{E}Y\). For any real \(s,t\), joint Gaussianity says that \(sX+tY\) is normal. Its mean is \(s\mu_X+t\mu_Y\), and its variance is
The characteristic function of a normal variable with mean \(m\) and variance \(v\geq 0\) at argument \(1\) is \(\exp(im-v/2)\); this formula also holds when \(v=0\). Therefore the joint characteristic function of \((X,Y)\), evaluated at \((s,t)\), is
The first factor is the characteristic function of \(X\) at \(s\), and the second is the characteristic function of \(Y\) at \(t\). Thus the joint characteristic function is the characteristic function of the product of the marginal laws. By uniqueness of characteristic functions, the joint law equals that product law. The product-law characterization of independence then gives that \(X\) and \(Y\) are independent. \(\square\)
The proof also covers zero-variance cases: a variable with variance zero is almost surely constant, and the characteristic-function calculation remains valid without dividing by either variance.
Worked Example: Orthogonal Combinations of Independent Normals
Let \(U,V\) be independent standard normal variables, and define \(X=U+2V\) and \(Y=2U-V\). Every linear combination of \(X\) and \(Y\) is a linear combination of the independent normal variables \(U,V\), so \((X,Y)\) is jointly Gaussian. Their means are both zero, and independence of \(U,V\) gives \(\mathbb{E}[UV]=\mathbb{E}U\,\mathbb{E}V=0\). Hence
Both variances equal \(5\): \(\operatorname{Var}(X)=\mathbb{E}[(U+2V)^2]=1+4=5\), and \(\operatorname{Var}(Y)=\mathbb{E}[(2U-V)^2]=4+1=5\). The theorem applies, so \(X\) and \(Y\) are independent. This is a setting in which the zero covariance calculation, together with the joint Gaussian assumption, does establish independence.
What Covariance Can and Cannot Tell You
Zero covariance rules out one particular kind of association: nonzero average linear co-movement around the means. It does not rule out nonlinear relationships, such as a square, an absolute value, or another transformation that preserves information. Conversely, the jointly Gaussian theorem works because joint Gaussianity restricts the possible shapes of the joint distribution so strongly that its covariance matrix determines whether the joint characteristic function factors.
A useful distinction is between knowing that each marginal distribution is normal and knowing that the pair is jointly Gaussian. The theorem assumes the latter. Marginal distribution information by itself does not supply the joint characteristic-function formula used in the proof.
Check Your Understanding
Use the definitions and arguments above to answer these questions.
- Why does symmetry about zero imply that the covariance of \(X\) and \(X^2\) is zero when the required moments are finite?
- In the uniform example, which two events have equal probability, and how does that show dependence?
- Why is the fact that \(Y=X^2\) alone not enough to conclude that \(X\) and \(Y\) are dependent in every possible case?
- What additional assumption lets zero covariance imply independence in the theorem?
- Where does joint Gaussianity enter the proof that zero covariance implies independence?