Why Independence Gives a Useful Covariance Shortcut
Covariance measures how two random variables vary together. Its calculation often requires the expected product \(E[XY]\), which may be tedious to find from a joint distribution. Independence provides a direct route: under suitable integrability conditions, the expected product factors into the product of the separate expectations. That factorization makes the covariance zero.
The conditions matter. Independence is a statement about the joint behavior of the variables; it is not something that can be assumed merely because their means are known. The expected values must also exist in the relevant sense so that the products and differences in the covariance calculation are legitimate.
A common sufficient condition for covariance to exist is that \(E[X^2]\) and \(E[Y^2]\) are finite. A more general condition sufficient for the product-moment identity is \(E[|X|]<\infty\), \(E[|Y|]<\infty\), and \(E[|XY|]<\infty\). If \(X\) and \(Y\) are independent and have finite absolute first moments, then the product is integrable as well: independence gives \(E[|XY|]=E[|X|]E[|Y|]<\infty\).
The Independence Result
The factorization has a clear interpretation in the discrete case. Independence means that the joint probability of a pair of values is the product of the marginal probabilities. Thus, when we sum \(xy\) over all possible pairs, the joint probabilities separate into one sum involving \(X\) and another involving \(Y\). The same principle applies to continuous variables: the joint density factors into the product of the marginal densities, so the double integral separates into two integrals.
For discrete variables, \(P(X=x,Y=y)=P(X=x)P(Y=y)\). For independent continuous variables with densities, \(f_{X,Y}(x,y)=f_X(x)f_Y(y)\).
The sum or integral for \(E[XY]\) separates into the calculation for \(E[X]\) multiplied by the calculation for \(E[Y]\). Integrability ensures these expectations are well-defined.
Since \(E[XY]=E[X]E[Y]\), the product-moment identity gives \(\operatorname{Cov}(X,Y)=E[X]E[Y]-E[X]E[Y]=0\).
Why the Expected Product Factors
For discrete independent variables, write their possible values as \(x\) and \(y\). Using the joint probability rule for independence,
The rearrangement is valid when the expected product is absolutely integrable; the finite absolute first moments and independence in the theorem guarantee this. For independent continuous variables, the corresponding argument uses the joint density:
Finally, expand the definition of covariance and use this factorization:
This is a one-way implication: independence implies zero covariance when the expectations are well-defined. Zero covariance alone does not establish independence. Covariance summarizes a particular expected product, whereas independence requires the joint distribution to factor into the two marginal distributions.
Worked Example: An Independent Indicator and a Discrete Score
A hypothetical quality review records two independent quantities. Let \(X\) equal 1 if a randomly selected component passes a first test and 0 otherwise, with \(P(X=1)=0.4\). Let \(Y\), independent of \(X\), be a score with \(P(Y=0)=0.2\), \(P(Y=2)=0.5\), and \(P(Y=5)=0.3\). Find \(E[X]\), \(E[Y]\), \(E[XY]\), and \(\operatorname{Cov}(X,Y)\).
Method. Find the marginal means, use independence to factor the expected product, and then apply the product-moment identity.
First, \(X\) is Bernoulli with success probability 0.4, so
For \(Y\), multiply each score by its probability:
Because \(X\) and \(Y\) are independent, the expected product factors:
Therefore,
Check. When \(X=0\), \(XY=0\); when \(X=1\), \(XY=Y\). Thus \(E[XY]=P(X=1)E[Y]=0.4(2.5)=1\), consistent with the factorization. The calculation avoids the mistake of treating the possible score values as equally likely.
Independent Continuous Variables and Their Transformations
If \(U\) and \(V\) are independent, functions of them taken separately remain independent. In particular, if \(X=g(U)\) and \(Y=h(V)\), then \(X\) and \(Y\) are independent, provided the expectations used in the calculation exist. The reason is that an event about \(g(U)\) is determined by \(U\), and an event about \(h(V)\) is determined by \(V\); independence of \(U\) and \(V\) therefore gives independence of those events.
Worked Example: Independent Uniform Variables After Transformation
Let \(U\) and \(V\) be independent, with \(U\) uniform on \((0,3)\) and \(V\) uniform on \((0,2)\). Define \(X=2U+1\) and \(Y=V^2\). Find \(E[X]\), \(E[Y]\), \(E[XY]\), and \(\operatorname{Cov}(X,Y)\).
Method. Evaluate the means from the uniform densities. Since each transformed variable depends on a different independent variable, \(X\) and \(Y\) are independent, so factor \(E[XY]\).
The density of \(U\) is \(1/3\) on \((0,3)\). Hence
The density of \(V\) is \(1/2\) on \((0,2)\). Thus
Because \(X\) and \(Y\) are independent,
The covariance is
Check. The computed expected product equals the product of the computed means. A possible error is to treat \(E[V^2]\) as \((E[V])^2\); here \(E[V]=1\), while the integral shows \(E[V^2]=4/3\). The covariance result uses the correct second-power expectation.
Affine Costs Built From Independent Counts
The factorization also works when each variable includes a constant. Independence is preserved by applying a function to each variable separately, and the resulting expectations must include those constants. Expanding the product is a useful check that no term has been omitted.
Worked Example: Two Independent Operating Costs
In a hypothetical service setting, let \(N\) be the number of alerts in a shift, with \(N\sim\operatorname{Binomial}(3,0.2)\), and let \(M\) be the number of equipment checks, with \(M\sim\operatorname{Poisson}(1.5)\). Assume \(N\) and \(M\) are independent. A cost \(X\) is \(100N+20\) dollars, and a separate cost \(Y\) is \(50M+10\) dollars. Find \(E[X]\), \(E[Y]\), \(E[XY]\), and \(\operatorname{Cov}(X,Y)\).
Method. Use the binomial and Poisson means, note that the separate cost functions preserve independence, and factor the expected product. Then verify the product calculation by expansion.
For a binomial variable with parameters \(n\) and \(p\), the mean is \(np\), so \(E[N]=3(0.2)=0.6\). A Poisson variable with parameter \(1.5\) has mean \(1.5\), so \(E[M]=1.5\). Therefore,
The variables \(X\) and \(Y\) are independent because they are functions of the separate independent variables \(N\) and \(M\). Thus
To check, expand the product and use \(E[NM]=E[N]E[M]=(0.6)(1.5)=0.9\):
It follows that
Check. Both the direct factorization and the expanded calculation give \(E[XY]=6800\). The expansion also confirms that the constant terms contribute \(200\) and that both mixed terms are included.
Common Exam Trap: Factoring Without Independence
The factorization \(E[XY]=E[X]E[Y]\) requires independence (or another justified condition that gives the same factorization). Knowing the two marginal means alone does not establish it. For instance, if a problem gives \(E[X]=2\) and \(E[Y]=3\) but says nothing about the joint behavior, it is incorrect to write \(E[XY]=6\) automatically.
The correction is to use the information actually supplied. If \(E[XY]\) or the joint distribution is not known and independence has not been established, then the covariance cannot be concluded from those two means alone:
A second logical trap is reversing the theorem. A zero covariance is not, by itself, proof of independence. On an exam, identify which direction the given information supports: independence plus appropriate finite expectations implies zero covariance; zero covariance alone does not imply independence.
Check Your Understanding
For each problem, identify the independence information, calculate the requested expectations, and use the product-moment identity where appropriate.
- Let \(X\) be Bernoulli with success probability \(0.3\), and let independent \(Y\) equal 1 with probability \(0.6\) and 4 with probability \(0.4\). Find \(E[X]\), \(E[Y]\), \(E[XY]\), and \(\operatorname{Cov}(X,Y)\). (Answer: \(E[X]=0.3,\ E[Y]=2.2,\ E[XY]=0.66,\ \operatorname{Cov}(X,Y)=0\).)
- Let \(U\) and \(V\) be independent, with \(U\) uniform on \((0,1)\) and \(V\) uniform on \((0,3)\). Set \(X=U+2\) and \(Y=V+1\). Find \(E[X]\), \(E[Y]\), \(E[XY]\), and the covariance. (Answer: \(E[X]=2.5,\ E[Y]=2.5,\ E[XY]=6.25,\ \operatorname{Cov}(X,Y)=0\).)
- Let \(N\sim\operatorname{Binomial}(4,0.25)\) and \(M\sim\operatorname{Poisson}(2)\), independently. Find \(E[NM]\) and \(\operatorname{Cov}(N,M)\). (Answer: \(E[NM]=2,\ \operatorname{Cov}(N,M)=0\).)
- Let \(X\) be exponential with rate 2 and \(Y\) be an independent Bernoulli variable with success probability 0.7. Find \(E[XY]\) and \(\operatorname{Cov}(X,Y)\). (Answer: \(E[XY]=0.35,\ \operatorname{Cov}(X,Y)=0\).)
- Let independent \(A\) and \(B\) have \(P(A=-1)=P(A=2)=0.5\), \(P(B=0)=0.25\), and \(P(B=3)=0.75\). Define \(X=2A+1\) and \(Y=4-B\). Find \(E[X]\), \(E[Y]\), \(E[XY]\), and \(\operatorname{Cov}(X,Y)\). (Answer: \(E[X]=2,\ E[Y]=1.75,\ E[XY]=3.5,\ \operatorname{Cov}(X,Y)=0\).)