Post · 4 min read· pp. 92–94

1.4.4 Conditional Independence


As we mentioned earlier, almost any concept that is defined for probability can also be extended to conditional probability. Remember that two events AA and BB are independent if

P(A∩B)=P(A)P(B),or equivalently, P(A∣B)=P(A).P(A \cap B)=P(A)P(B), \hspace{10pt} \textrm{or equivalently, } P(A|B)=P(A).
We can extend this concept to conditionally independent events. In particular,

Definition

Two events AA and BB are conditionally independent given an event CC with P(C)>0P(C)>0 if

P(A∩B∣C)=P(A∣C)P(B∣C)(1.8)\hspace{100pt}P(A \cap B|C)=P(A|C)P(B|C) \hspace{100pt} (1.8)

Recall that from the definition of conditional probability,

P(A∣B)=P(A∩B)P(B),P(A|B)=\frac{P(A \cap B)}{P(B)},
if P(B)>0P(B)>0. By conditioning on CC, we obtain
P(A∣B,C)=P(A∩B∣C)P(B∣C)P(A|B,C)=\frac{P(A \cap B|C)}{P(B|C)}
if P(B∣C),P(C)≠0P(B|C), P(C) \neq 0. If AA and BB are conditionally independent given CC, we obtain

P(A∣B,C)P(A | B,C)=P(A∩B∣C)P(B∣C)=\frac{P(A \cap B|C)}{P(B|C)}
=P(A∣C)P(B∣C)P(B∣C)=\frac{P(A|C)P(B|C)}{P(B|C)}
=P(A∣C)=P(A|C).

Thus, if AA and BB are conditionally independent given CC, then

P(A∣B,C)=P(A∣C)(1.9)\hspace{100pt}P(A | B,C)=P(A|C) \hspace{100pt} (1.9)
Thus, Equations 1.8 and 1.9 are equivalent statements of the definition of conditional independence. Now let's look at an example.


Example

A box contains two coins: a regular coin and one fake two-headed coin (P(H)=1P(H)=1). I choose a coin at random and toss it twice. Define the following events.

  • A= First coin toss results in an HH.
  • B= Second coin toss results in an HH.
  • C= Coin 1 (regular) has been selected.

Find P(A∣C),P(B∣C),P(A∩B∣C),P(A),P(B),P(A|C), P(B|C), P(A \cap B|C), P(A), P(B), and P(A∩B)P(A \cap B). Note that AA and BB are NOT independent, but they are conditionally independent given CC.

  • Solution
    • We have P(A∣C)=P(B∣C)=12P(A|C)=P(B|C)=\frac{1}{2}. Also, given that Coin 1 is selected, we have P(A∩B∣C)=12.12=14P(A \cap B|C)=\frac{1}{2}.\frac{1}{2}=\frac{1}{4}. To find P(A),P(B),P(A), P(B), and P(A∩B)P(A \cap B), we use the law of total probability:

      P(A)P(A)$ =P(A
      =12⋅12+1⋅12=\frac{1}{2}\cdot \frac{1}{2} + 1\cdot \frac{1}{2}
      =34=\frac{3}{4}.

      Similarly, P(B)=34P(B)=\frac{3}{4}. For P(A∩B)P(A \cap B), we have

      P(A∩B)P(A \cap B)$ = P(A \cap B
      =P(A∣C)P(B∣C)P(C)+P(A∣Cc)P(B∣Cc)P(Cc)=P(A|C)P(B|C)P(C)+P(A|C^c)P(B|C^c)P(C^c)
      $\hspace{120pt} \textrm{ (by conditional independence of AA and BB)}$
      =12⋅12⋅12+1⋅1⋅12=\frac{1}{2}\cdot \frac{1}{2}\cdot \frac{1}{2} + 1\cdot 1\cdot \frac{1}{2}
      =58=\frac{5}{8}.

As we see, P(A∩B)=58≠P(A)P(B)=916P(A \cap B)=\frac{5}{8}\neq P(A)P(B)=\frac{9}{16}, which means that AA and BB are not independent. We can also justify this intuitively. For example, if we know AA has occurred (i.e., the first coin toss has resulted in heads), we would guess that it is more likely that we have chosen Coin 2 than Coin 1. This in turn increases the conditional probability that BB occurs. This suggests that AA and BB are not independent. On the other hand, given CC (Coin 1 is selected), AA and BB are independent.

One important lesson here is that, generally speaking, conditional independence neither implies (nor is it implied by) independence. Thus, we can have two events that are conditionally independent but they are not unconditionally independent (such as AA and BB above). Also, we can have two events that are independent but not conditionally independent, given an event CC. Here is a simple example regarding this case. Consider rolling a die and let

A={1,2},A=\{1,2\},
B={2,4,6},B=\{2,4,6\},
C={1,4}.C=\{1,4\}.
Then, we have
P(A)=13,P(B)=12;P(A)=\frac{1}{3}, P(B)=\frac{1}{2};
P(A∩B)=16=P(A)P(B).P(A \cap B)=\frac{1}{6}=P(A)P(B).
Thus, AA and BB are independent. But we have
P(A∣C)=12,P(B∣C)=12;P(A|C)=\frac{1}{2}, P(B|C)=\frac{1}{2};
P(A∩B∣C)=P({2}∣C)=0.P(A \cap B|C)=P(\{2\}|C)=0.
Thus
P(A∩B∣C)≠P(A∣C)P(B∣C),P(A \cap B|C) \neq P(A|C)P(B|C),
which means AA and BB are not conditionally independent given CC.