Tutorials › Statistical Theory I - Probability and Distribution Theory › Zero Covariance Is Not Independence

Variance and Covariance Structure · Tutorial 357 of 994

Zero Covariance Is Not Independence

Separate the implications of independence and zero covariance, and check the moment conditions that make covariance meaningful.

Intermediate 9 min read

What You'll Learn

  • State the moment conditions under which covariance is defined.
  • Prove that independent variables with finite second moments have zero covariance.
  • Verify a zero-covariance example in which the variables are dependent.
  • Recognize what nonzero covariance establishes about independence.
  • Avoid interpreting zero covariance as general evidence of independence.

What Zero Covariance Tells Us

Covariance summarizes a particular kind of joint variation: whether deviations of two random variables from their means tend to have the same or opposite signs. It is useful for describing linear association, but it does not capture every form of dependence. The distinction matters whenever a calculation produces zero covariance: that result rules out linear association as measured by covariance, but does not, in general, establish independence.

There is an important implication in the other direction. When the relevant moments exist, independence implies zero covariance. The moment conditions are not a technical afterthought: without them, the means or the product expectation used in the definition may not exist. We first make those conditions explicit, then prove the implication and examine examples showing what it does and does not say.

Covariance and Its Moment Conditions

Definition: If \(E[|X|]\) and \(E[|Y|]\) are finite, and \(E[|XY|]\) is finite, the covariance of \(X\) and \(Y\) is $$ \operatorname{Cov}(X,Y)=E[(X-E[X])(Y-E[Y])]=E[XY]-E[X]E[Y]. $$ The stated conditions ensure that the expectations in this definition are finite. A common sufficient condition is \(E[X^2]<\infty\) and \(E[Y^2]<\infty\); in that case both variables have finite variance, and the Cauchy–Schwarz inequality ensures \(E[|XY|]<\infty\).

The finite-second-moment condition is convenient and often used in discussions of covariance and correlation. It is sufficient, but not necessary for covariance itself: covariance can be defined under the weaker integrability conditions in the definition. Either way, the existence of covariance must be checked before using an identity that involves it.

Independence is a statement about the joint distribution, not just a single numerical summary. Random variables \(X\) and \(Y\) are independent if, for every pair of Borel sets \(A\) and \(B\), \(P(X\in A, Y\in B)=P(X\in A)P(Y\in B)\). Thus, independence specifies how probabilities of all measurable events involving the two variables factor. Covariance, by contrast, is one expectation involving their centered values.

Why Independence Implies Zero Covariance

Theorem: If \(X\) and \(Y\) are independent and \(E[X^2]<\infty\), \(E[Y^2]<\infty\), then \(\operatorname{Cov}(X,Y)=0\).

Proof. The finite second moments imply finite first absolute moments: by Cauchy–Schwarz, \(E[|X|]\leq \sqrt{E[X^2]}\) and \(E[|Y|]\leq \sqrt{E[Y^2]}\). Because \(X\) and \(Y\) are independent, their joint distribution is the product of their marginal distributions. Tonelli's theorem applied to the nonnegative function \(|xy|\) gives \(E[|XY|]=E[|X|]E[|Y|]<\infty\). Fubini's theorem can therefore be used to factor the expectation of the integrable function \(xy\):

$$ E[XY] =\int_{\mathbb R}\int_{\mathbb R}xy\,dF_X(x)\,dF_Y(y) =\left(\int_{\mathbb R}x\,dF_X(x)\right) \left(\int_{\mathbb R}y\,dF_Y(y)\right) =E[X]E[Y]. $$

Substituting this equality into the covariance formula gives \(\operatorname{Cov}(X,Y)=E[XY]-E[X]E[Y]=0\). \(\square\)

The same factorization holds under the weaker conditions that \(E[|X|]\), \(E[|Y|]\), and \(E[|XY|]\) are finite. In particular, independence together with finite second moments is a familiar sufficient condition, not the only possible set of conditions under which covariance exists and vanishes.

Worked Example: Independent Bernoulli Variables

Let \(X\) and \(Y\) be independent Bernoulli random variables with \(P(X=1)=0.3\) and \(P(Y=1)=0.4\). Calculate their covariance directly.

For a Bernoulli variable, the expectation is its probability of equaling 1, so \(E[X]=0.3\) and \(E[Y]=0.4\). Independence gives \(P(X=1,Y=1)=0.3(0.4)=0.12\). Since \(XY=1\) exactly when both variables equal 1, \(E[XY]=0.12\). Therefore,

$$ \operatorname{Cov}(X,Y) =E[XY]-E[X]E[Y] =0.12-(0.3)(0.4) =0. $$

This calculation is consistent with the theorem. It does not show that every pair of variables with zero covariance is independent; it shows that independence produces zero covariance in this particular case.

Why the Converse Fails

A converse to the theorem would say that zero covariance implies independence. That assertion is false in general. The reason is that covariance measures an average product of centered values. Contributions from different parts of the joint distribution can cancel, even while the variables remain linked.

Worked Example: Zero Covariance but Dependence

Let \(X\) have the uniform distribution on \((-1,1)\), and define \(Y=X^2\). Both variables have finite second moments. Calculate the covariance and then verify that \(X\) and \(Y\) are not independent.

The density of \(X\) is \(1/2\) on \((-1,1)\). By symmetry, \(E[X]=0\) and \(E[X^3]=0\). Also,

$$ E[Y]=E[X^2] =\frac12\int_{-1}^{1}x^2\,dx =\frac12\left[\frac{x^3}{3}\right]_{-1}^{1} =\frac13. $$

Since \(XY=X^3\),

$$ \operatorname{Cov}(X,Y) =E[XY]-E[X]E[Y] =E[X^3]-(0)\left(\frac13\right) =0. $$

To check dependence, consider the events \(A=\{|X|\leq 1/2\}\) and \(B=\{Y\leq 1/4\}\). Since \(Y=X^2\), these events are identical, so \(P(A)=P(B)=1/2\). Their intersection also has probability \(1/2\), whereas independence would require

$$ P(A\cap B)=P(A)P(B)=\frac12\cdot\frac12=\frac14. $$

Because \(1/2\ne 1/4\), the variables are dependent. The zero covariance results from symmetry: positive and negative values of \(X\) contribute opposite signs to \(E[X^3]\), even though \(Y\) is completely determined by \(X\).

This example illustrates the central limitation: zero covariance concerns the average product of centered values, not whether the variables contain any shared information or satisfy a functional relationship. A nonlinear relationship can remain strong while its covariance is zero.

What Nonzero Covariance Establishes

When covariance exists, nonzero covariance does establish that the variables are not independent. This follows by contraposition from the theorem: independent variables with the stated moment conditions must have zero covariance. Thus, covariance can detect some departures from independence, but a zero result cannot rule out all dependence.

Worked Example: Nonzero Covariance Rules Out Independence

Let \(X\) be Bernoulli with \(P(X=1)=1/4\), and let \(Y=2X+1\). Calculate the covariance and use it to decide whether \(X\) and \(Y\) are independent.

The mean and variance of \(X\) are \(E[X]=1/4\) and \(\operatorname{Var}(X)=(1/4)(3/4)=3/16\). Using \(Y=2X+1\), we have \(E[Y]=2(1/4)+1=3/2\). Also, \(XY=2X^2+X\); because \(X\) takes only the values 0 and 1, \(X^2=X\), so \(E[XY]=3E[X]=3/4\). Hence,

$$ \operatorname{Cov}(X,Y) =E[XY]-E[X]E[Y] =\frac34-\left(\frac14\right)\left(\frac32\right) =\frac34-\frac38 =\frac38. $$

The covariance is nonzero. Since these bounded variables have finite second moments, independence would imply zero covariance. Therefore \(X\) and \(Y\) are not independent. Here this conclusion also agrees with the construction: \(Y\) is determined exactly by \(X\).

When Covariance Is Not Defined

Moment conditions also prevent a different error: treating an undefined covariance as if it were zero. For example, let \(Z\) have a standard Cauchy distribution and set \(X=Y=Z\). The Cauchy density is \(f(z)=1/\{\pi(1+z^2)\}\). Its absolute first moment diverges because

$$ E[|Z|] =\frac{2}{\pi}\int_0^\infty \frac{z}{1+z^2}\,dz =\infty. $$

Consequently \(E[Z]\) does not exist as a finite expectation, so \(\operatorname{Cov}(X,Y)\), as defined above, does not exist. The pointwise identity \(XY=Z^2\) does not fix this problem: \(E[Z^2]\) is also infinite. Expressions involving infinite or undefined terms cannot be combined as though they were finite means and covariances.

This example is not a zero-covariance example; it is a reminder to check existence before drawing conclusions from covariance. In many routine applications, finite second moments provide a straightforward check. If only weaker moment assumptions are available, verify the integrability conditions for the covariance definition directly.

Common Mistakes and Practical Interpretation

  • Reversing the implication. Independence implies zero covariance under suitable moment conditions. Zero covariance does not generally imply independence; the uniform example above supplies a counterexample.
  • Equating zero covariance with no relationship. Covariance summarizes linear co-movement. It can be zero even when one variable is a nonlinear function of the other.
  • Using the covariance theorem without checking moments. The theorem requires covariance to exist. Finite second moments are a convenient sufficient condition; without them, check integrability rather than assuming the formula is valid.
  • Concluding independence from a nonzero covariance calculation's opposite. Nonzero covariance rules out independence when covariance exists. A zero calculation leaves independence undecided; other properties of the joint distribution must be considered.

In applications, covariance is valuable for quantifying linear association and for calculations involving sums and transformations. It should not be treated as a complete diagnostic of dependence. A responsible interpretation reports what the result supports: nonzero covariance rules out independence, while zero covariance only establishes the absence of covariance-based linear association. Additional assumptions about the joint distribution may allow stronger conclusions, but they must be stated rather than silently presumed.

Key takeaway: With the required moments, independence implies zero covariance. In general, the converse fails: zero covariance is a statement about one centered product expectation, not a claim that the joint distribution factors into independent marginals.

Check Your Understanding

Answer each question using the distinction between covariance and independence.

  1. State a common moment condition that guarantees \(\operatorname{Cov}(X,Y)\) exists, and name the inequality that controls \(E[|XY|]\).
  2. Why does independence imply \(E[XY]=E[X]E[Y]\) when the relevant expectations are finite?
  3. For \(X\sim\operatorname{Uniform}(-1,1)\) and \(Y=X^2\), which symmetry calculation makes the covariance zero?
  4. In the same example, give events that demonstrate dependence and compare their intersection probability with the product of their probabilities.
  5. If two variables have finite second moments and nonzero covariance, what can be concluded about independence? What if their covariance is zero?