Unit 3, lesson 23

Conditional Independence and Sequential Evidence

What conditional independence given a latent state means, how a shared cause can make observations marginally dependent, and how to update one observation at a time without counting duplicated evidence twice.

  • Video 23
  • Combining Evidence

A machine is in a high state or a low state that nobody can see, and two sensors each report positive or negative. If both sensors report positive, how far should the probability of the high state move, and may the two reports simply be treated as independent? The answer depends on how the reports are related to the state and to each other. This lesson separates independence given the state from independence overall, shows how a shared hidden state can make reports dependent, and updates the state probability one report at a time, including the case of a report that only repeats another. The models on this page are constructed for illustration.

Key terms

Conditional independence

Definition Let CC be an event with P(C)>0P(C) > 0. Events AA and BB are conditionally independent given CC if

P(A∩B∣C)=P(A∣C) P(B∣C).\begin{aligned} &P(A \cap B \mid C) \\[0.4em] &\quad = P(A \mid C)\,P(B \mid C). \end{aligned}

When P(B∩C)>0P(B \cap C) > 0, this is equivalent to P(A∣B∩C)=P(A∣C)P(A \mid B \cap C) = P(A \mid C), so once CC is known, learning BB does not change the probability of AA. For a state with values HH and LL, each of positive probability, AA and BB are conditionally independent given the state if the product rule holds both given HH and given LL. Conditional independence given CC neither implies nor is implied by ordinary independence of AA and BB.

In plain words Once CC is known to have happened, AA and BB carry no information about each other. For two sensor reports, conditional independence given the state means that inside each state the reports behave like two independent coin flips, each with the rate that belongs to that state. The condition after the bar is part of the claim, and dropping it gives a different statement that may be false.

Example In the running sensor model the state is HH or L=HcL = H^{c}, with P(H)=P(L)=0.5P(H) = P(L) = 0.5. Let AA be the event that the first sensor is positive and BB the event that the second is positive. Each sensor is positive with probability 0.80.8 given HH and 0.20.2 given LL, and the model assumes that the two reports are conditionally independent given the state. Then

P(A∩B∣H)=0.82=0.64,P(A∩B∣L)=0.22=0.04.\begin{gathered} P(A \cap B \mid H) = 0.8^2 = 0.64, \\[0.4em] P(A \cap B \mid L) = 0.2^2 = 0.04. \end{gathered}

In the same way, a positive first report with a negative second one has probability 0.8⋅0.2=0.160.8 \cdot 0.2 = 0.16 given HH and 0.2⋅0.8=0.160.2 \cdot 0.8 = 0.16 given LL. Each product uses only rates from the same state.

Latent state

Definition A latent state is an unobserved quantity, such as the condition of a machine, whose value affects the probabilities of the observations. In this lesson it takes finitely many values, and the events for those values partition Ω\Omega and each have positive probability. When the conditional probabilities of two or more observations change with the value of the same latent state, the state is called a shared cause of those observations. In a probability model this structure is an assumption about how the data arise. An association between observations does not by itself prove that a particular shared cause exists.

In plain words The latent state is what the evidence is about, but it is not observed directly. Each report is a noisy reading of it, and two readings of the same hidden state are linked through it even when neither reading affects the other.

Example In the sensor model the machine state is latent, and only the two reports are observed. The state is a shared cause of the reports, since each report is positive with probability 0.80.8 in state HH and 0.20.2 in state LL. If the state were known to be HH, a positive first report would leave the second report’s chance of being positive at P(B∣A∩H)=0.8P(B \mid A \cap H) = 0.8. When the state is unknown, a positive first report makes HH more probable, and that raises the chance that the second report is positive, as the calculations below show.

Marginal dependence

Definition Two events are marginally dependent if they are dependent in the overall model, in which the latent state is not conditioned on, that is, if P(A∩B)≠P(A) P(B)P(A \cap B) \ne P(A)\,P(B). The marginal probabilities come from the law of total probability over the states, for example P(A)=P(A∣H) P(H)+P(A∣L) P(L)P(A) = P(A \mid H)\,P(H) + P(A \mid L)\,P(L). Suppose AA and BB are conditionally independent given a state with values HH and L=HcL = H^{c}, where 0<P(H)<10 < P(H) < 1. Writing δA=P(A∣H)−P(A∣L)\delta_A = P(A \mid H) - P(A \mid L) and δB=P(B∣H)−P(B∣L)\delta_B = P(B \mid H) - P(B \mid L), a short calculation gives

P(A∩B)−P(A) P(B)=P(H) P(L) δA δB.\begin{aligned} &P(A \cap B) - P(A)\,P(B) \\[0.4em] &\quad = P(H)\,P(L)\,\delta_A\,\delta_B. \end{aligned}

So the two events are marginally independent exactly when at least one of them has the same probability in both states. With two states, whenever both respond to the state, conditional independence comes with marginal dependence.

In plain words While the state is unknown, a positive report from a sensor whose rate differs between the states shifts probability toward the state in which that sensor is positive more often. If the other sensor’s rate also differs between the states, that shift changes its forecast. Once the state is known, conditional independence leaves nothing for the first report to reveal about the second.

Example In the sensor model each report has marginal probability P(A)=P(B)=0.5⋅0.8+0.5⋅0.2=0.5P(A) = P(B) = 0.5 \cdot 0.8 + 0.5 \cdot 0.2 = 0.5, but both are positive with probability P(A∩B)=0.5⋅0.64+0.5⋅0.04=0.34P(A \cap B) = 0.5 \cdot 0.64 + 0.5 \cdot 0.04 = 0.34, which is larger than 0.5⋅0.5=0.250.5 \cdot 0.5 = 0.25. The full joint table is below.

BBBcB^{c}
AA0.340.340.160.16
AcA^{c}0.160.160.340.34

The difference 0.34−0.25=0.090.34 - 0.25 = 0.09 matches 0.5⋅0.5⋅0.6⋅0.60.5 \cdot 0.5 \cdot 0.6 \cdot 0.6 from the formula. Matching reports are more common than they would be for independent reports that are each positive half the time.

Sequential updating

Definition Sequential updating processes evidence one observation at a time. After observing AA, the posterior P(H∣A)P(H \mid A) serves as the prior for the next observation BB, and the likelihoods of BB must condition on everything already observed. If P(A∩B)>0P(A \cap B) > 0 and both H∩AH \cap A and L∩AL \cap A have positive probability, then

P(H∣A∩B)=P(B∣H∩A)P(H∣A)P(B∣A),\begin{aligned} &P(H \mid A \cap B) \\[0.4em] &= \frac{P(B \mid H \cap A) P(H \mid A)}{P(B \mid A)}, \end{aligned}

where P(B∣A)=P(B∣H∩A) P(H∣A)+P(B∣L∩A) P(L∣A)P(B \mid A) = P(B \mid H \cap A)\,P(H \mid A) + P(B \mid L \cap A)\,P(L \mid A). Under conditional independence given the state, P(B∣H∩A)=P(B∣H)P(B \mid H \cap A) = P(B \mid H) and P(B∣L∩A)=P(B∣L)P(B \mid L \cap A) = P(B \mid L), so the single-report likelihoods can be reused. The result always equals the one-step update P(H∩A∩B)/P(A∩B)P(H \cap A \cap B)/P(A \cap B), because both calculations use the same model.

In plain words Update on the first report, then treat the result as the new starting point for the second. The second report’s rates must be the ones that apply after the first report, and under conditional independence these are simply its rates in each state.

Example In the sensor model a positive first report gives

P(H∣A)=0.5⋅0.80.5=0.8.P(H \mid A) = \frac{0.5 \cdot 0.8}{0.5} = 0.8.

The forecast for the second report becomes P(B∣A)=0.8⋅0.8+0.2⋅0.2=0.68P(B \mid A) = 0.8 \cdot 0.8 + 0.2 \cdot 0.2 = 0.68, up from 0.50.5. If the second report is also positive,

P(H∣A∩B)=0.640.68=1617,P(H \mid A \cap B) = \frac{0.64}{0.68} = \frac{16}{17},

about 0.9410.941. The one-step calculation agrees, since P(H∩A∩B)=0.5⋅0.64=0.32P(H \cap A \cap B) = 0.5 \cdot 0.64 = 0.32 and 0.32/0.34=16/170.32/0.34 = 16/17. A positive report followed by a negative one has likelihood 0.160.16 under both states, so it leaves the probability of HH at the prior 0.50.5. That return to the prior happens here because the rates 0.80.8 and 0.20.2 mirror each other, and it is not a general rule.

Duplicated evidence

Definition Evidence is duplicated when a later observation repeats information that has already been counted, for example a second report that copies the first, or two reports that pass on the same underlying reading. Such observations are generally not conditionally independent given the state, so their likelihoods must not be multiplied as if they were. If the second report always equals the first, then A∩B=AA \cap B = A and

P(H∣A∩B)=P(H∣A),P(H \mid A \cap B) = P(H \mid A),

so the copy changes nothing.

In plain words Hearing the same reading twice is still one reading. Multiplying the separate likelihoods of two displays, documents or messages is justified when the model makes them conditionally independent given the state, and repeated displays of one noisy reading do not qualify.

Example Suppose the second display in the sensor model only copies the first sensor. Given HH, two positive displays then have probability 0.80.8, not 0.640.64, and given LL they have probability 0.20.2, not 0.040.04. The posterior after two positive displays is

0.5⋅0.80.5⋅0.8+0.5⋅0.2=0.8,\frac{0.5 \cdot 0.8}{0.5 \cdot 0.8 + 0.5 \cdot 0.2} = 0.8,

the same as after one genuine report. Squaring the likelihoods would give 16/17≈0.94116/17 \approx 0.941 and count the same evidence twice.

Check yourself

  1. A new model has high-state prior 0.250.25 and low-state prior 0.750.75. Given the state, two sensors are independent, and each is positive with probability 0.60.6 in the high state and 0.20.2 in the low state. Find the probability that both are positive, the probability of the high state after two positives, and the probability that a single sensor is positive. Are the sensors independent when the state is unknown?
Show the answer

The high state contributes 0.25⋅0.62=0.090.25 \cdot 0.6^2 = 0.09 and the low state 0.75⋅0.22=0.030.75 \cdot 0.2^2 = 0.03, so P(A∩B)=0.12P(A \cap B) = 0.12 and

P(H∣A∩B)=0.090.12=34.P(H \mid A \cap B) = \frac{0.09}{0.12} = \frac{3}{4}.

Each sensor is positive with probability 0.25⋅0.6+0.75⋅0.2=0.30.25 \cdot 0.6 + 0.75 \cdot 0.2 = 0.3. The product of the marginals is 0.32=0.090.3^2 = 0.09, which is less than the actual 0.120.12, so the sensors are dependent when the state is unknown, although they are independent given the state. The gap formula for two states confirms the difference, since P(H) P(L) δA δB=0.25⋅0.75⋅0.4⋅0.4=0.03P(H)\,P(L)\,\delta_A\,\delta_B = 0.25 \cdot 0.75 \cdot 0.4 \cdot 0.4 = 0.03. Assuming marginal independence would understate the chance of two positives.

  1. In the same model, the first sensor is positive and the second is negative. Find the posterior probability of the high state. Does the negative report undo the positive one?
Show the answer

Given the high state the pattern has probability 0.6⋅0.4=0.240.6 \cdot 0.4 = 0.24, and given the low state 0.2⋅0.8=0.160.2 \cdot 0.8 = 0.16. The contributions are 0.25⋅0.24=0.060.25 \cdot 0.24 = 0.06 and 0.75⋅0.16=0.120.75 \cdot 0.16 = 0.12, so

P(H∣A∩Bc)=0.060.18=13.P(H \mid A \cap B^{c}) = \frac{0.06}{0.18} = \frac{1}{3}.

The negative report does not undo the positive one, since the result 1/31/3 is above the prior 0.250.25. A positive report is 33 times as likely in the high state as in the low state, while a negative report is only half as likely there, since 0.4/0.8=0.50.4/0.8 = 0.5, so together they still favor the high state. Sequentially, the first report gives P(H∣A)=0.15/0.3=0.5P(H \mid A) = 0.15/0.3 = 0.5, and the negative report then gives 0.5⋅0.4/(0.5⋅0.4+0.5⋅0.8)=1/30.5 \cdot 0.4/(0.5 \cdot 0.4 + 0.5 \cdot 0.8) = 1/3 again.

  1. Toss two fair coins independently. Let AA be the event that the first shows heads, BB the event that the second shows heads and CC the event that exactly one coin shows heads. Are AA and BB independent? Are they conditionally independent given CC?
Show the answer

They are independent, since P(A∩B)=1/4=P(A) P(B)P(A \cap B) = 1/4 = P(A)\,P(B). The event CC consists of the two equally likely outcomes heads then tails and tails then heads, so P(C)=1/2>0P(C) = 1/2 > 0 and P(A∣C)=P(B∣C)=1/2P(A \mid C) = P(B \mid C) = 1/2. Both heads is impossible given exactly one head, so P(A∩B∣C)=0P(A \cap B \mid C) = 0, which differs from 1/2⋅1/2=1/41/2 \cdot 1/2 = 1/4. Hence AA and BB are not conditionally independent given CC. Once CC is known, learning that the first coin shows heads forces the second to show tails. Independence does not imply conditional independence, just as conditional independence does not imply independence.

How this lesson connects