Why Bernoulli Variables Are a Special Case
Zero covariance is a statement about a particular average: the expected product of centered variables is zero. Independence is stronger; it requires the joint distribution to factor into the two marginal distributions. In general, the first condition does not guarantee the second. Bernoulli variables are an important exception: because each variable has only two possible values, their entire joint distribution is determined by their two success probabilities and one joint probability.
This tutorial identifies that remaining joint probability and shows that covariance measures exactly how far it is from the value required by independence. The argument uses the full joint probability table, so it also makes clear why the conclusion is special to two-valued variables.
The Joint Table Has One Free Probability
Once \(p\), \(q\), and \(t\) are specified, the other three cell probabilities follow from the marginal probabilities and the fact that all four cells sum to one. The joint table must therefore have this form:
For example, \(P(X=1,Y=0)=p-t\), because \(P(X=1)=p\) consists of the disjoint outcomes \((X,Y)=(1,1)\) and \((1,0)\). The other entries follow in the same way. Since each cell must be nonnegative, \(t\) must satisfy
The upper bounds \(t\leq p\) and \(t\leq q\) follow because the event \(\{X=1,Y=1\}\) is contained in each success event. The lower bounds follow from \(t\geq 0\) and \(1-p-q+t\geq 0\). These constraints ensure that the displayed table is a valid probability distribution.
To verify the result, the expectation of a Bernoulli variable is its success probability: \(E[X]=1\cdot p+0\cdot(1-p)=p\), and likewise \(E[Y]=q\). The product \(XY\) equals one only in the \((1,1)\) cell and is zero in the other three cells. Therefore \(E[XY]=t\). By the definition of covariance,
This calculation shows that positive covariance means joint success occurs more often than it would under independence, while negative covariance means it occurs less often. The sign describes the direction of this difference; a zero value means the joint-success probability equals \(pq\).
The Equivalence: Zero Covariance and Independence
Independence means that every joint cell probability equals the product of its corresponding marginal probabilities. For this two-by-two table, it is enough to examine the \((1,1)\) cell, provided we use the marginal probabilities to determine the other cells as well.
Proof. Let \(t=P(X=1,Y=1)\). The covariance calculation above gives \(\operatorname{Cov}(X,Y)=t-pq\). Hence zero covariance is equivalent to \(t=pq\).
If \(X\) and \(Y\) are independent, then by the definition of independence,
so their covariance is zero. Conversely, suppose their covariance is zero. Then \(t=pq\). Substituting this value into all four entries of the joint table gives
Each entry is the product of the corresponding marginal probabilities. For example, \(P(X=1,Y=0)=p(1-q)=P(X=1)P(Y=0)\); the same factorization holds for the other three cells. Any event determined by \(X\) is a subset of \(\{X=0,X=1\}\), and any event determined by \(Y\) is a subset of \(\{Y=0,Y=1\}\). Summing the cell factorizations over the relevant cells therefore gives the defining factorization for all such events. Thus \(X\) and \(Y\) are independent. \(\square\)
The proof establishes both directions. It does not infer independence merely from a zero average: it uses the fact that there are exactly four joint cells and that their values are fixed once \(p\), \(q\), and \(t\) are known.
Worked Example: An Independent Pair
Suppose \(X\) and \(Y\) are Bernoulli variables with \(p=0.4\), \(q=0.7\), and \(P(X=1,Y=1)=t=0.28\). Determine whether they are independent by constructing the table and checking the covariance.
The remaining cells are
The entries are nonnegative and sum to \(0.28+0.12+0.42+0.18=1\). The covariance is
The theorem implies independence. Directly, the table entries are \(0.40(0.70)=0.28\), \(0.40(0.30)=0.12\), \(0.60(0.70)=0.42\), and \(0.60(0.30)=0.18\), confirming the factorization in every cell.
Worked Example: A Dependent Pair With Negative Covariance
Let \(p=0.4\), \(q=0.7\), and \(t=0.20\). Find the joint table, calculate the covariance, and decide whether the variables are independent.
The four cells are
All four probabilities are nonnegative and sum to \(0.20+0.20+0.50+0.10=1\), so this is a valid table. The covariance is
Since the covariance is not zero, the variables are not independent. In particular, independence would require \(P(X=1,Y=1)=pq=0.28\), but the actual joint-success probability is \(0.20\). Joint success occurs less often than it would under independence, in agreement with the negative covariance.
Worked Example: A Degenerate Bernoulli Variable
Suppose \(P(X=1)=1\) and \(P(Y=1)=0.3\). Show that \(X\) and \(Y\) are independent even though \(X\) is constant.
Here \(p=1\). Since \(X=1\) with probability one, \(t=P(X=1,Y=1)=P(Y=1)=0.3\). The joint table is
The covariance is
Each entry factors into its marginal probabilities: for instance, \(P(X=1,Y=0)=0.7=(1)(0.7)\), and cells with \(X=0\) have probability zero. Thus \(X\) and \(Y\) are independent. A constant random variable is independent of every random variable because the constant variable cannot alter any joint probability. This example also shows why the theorem remains valid at the boundary \(p=1\).
Why the Result Does Not Extend to General Variables
The equivalence depends on the two-point support. For a Bernoulli pair, matching \(P(X=1,Y=1)\) to \(pq\), together with the fixed marginals, forces all four joint probabilities to factor. With more possible values, a single covariance equation constrains only one weighted average of the joint probabilities; it generally does not force every joint cell to factor. Thus zero covariance need not imply independence for variables with larger or continuous supports.
A related pitfall is to reverse the general implication without checking the variable types. Independence implies zero covariance whenever the relevant expectations exist, but zero covariance alone is not generally enough to establish independence. The special Bernoulli result is a precise exception, not a replacement for the distinction between covariance and independence.
Check Your Understanding
Use the joint-table parameter \(t=P(X=1,Y=1)\) to answer each question.
- If \(p=0.25\), \(q=0.8\), and \(t=0.20\), calculate all four joint probabilities and determine whether \(X\) and \(Y\) are independent.
- For Bernoulli \(X\) and \(Y\), explain why \(E[XY]=P(X=1,Y=1)\).
- If \(\operatorname{Cov}(X,Y)=0.06\), what is the difference between \(P(X=1,Y=1)\) and \(P(X=1)P(Y=1)\)?
- Why does the proof that zero covariance implies independence use more than the equation \(E[XY]=E[X]E[Y]\)?
- Does the equivalence require both success probabilities to be strictly between zero and one? Explain using the joint table.