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 be an event with . Events and are conditionally independent given if
When , this is equivalent to , so once is known, learning does not change the probability of . For a state with values and , each of positive probability, and are conditionally independent given the state if the product rule holds both given and given . Conditional independence given neither implies nor is implied by ordinary independence of and .
In plain words Once is known to have happened, and 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 or , with . Let be the event that the first sensor is positive and the event that the second is positive. Each sensor is positive with probability given and given , and the model assumes that the two reports are conditionally independent given the state. Then
In the same way, a positive first report with a negative second one has probability given and given . 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 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 in state and in state . If the state were known to be , a positive first report would leave the second report’s chance of being positive at . When the state is unknown, a positive first report makes 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 . The marginal probabilities come from the law of total probability over the states, for example . Suppose and are conditionally independent given a state with values and , where . Writing and , a short calculation gives
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 , but both are positive with probability , which is larger than . The full joint table is below.
The difference matches 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 , the posterior serves as the prior for the next observation , and the likelihoods of must condition on everything already observed. If and both and have positive probability, then
where . Under conditional independence given the state, and , so the single-report likelihoods can be reused. The result always equals the one-step update , 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
The forecast for the second report becomes , up from . If the second report is also positive,
about . The one-step calculation agrees, since and . A positive report followed by a negative one has likelihood under both states, so it leaves the probability of at the prior . That return to the prior happens here because the rates and 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 and
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 , two positive displays then have probability , not , and given they have probability , not . The posterior after two positive displays is
the same as after one genuine report. Squaring the likelihoods would give and count the same evidence twice.
Check yourself
- A new model has high-state prior and low-state prior . Given the state, two sensors are independent, and each is positive with probability in the high state and 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 and the low state , so and
Each sensor is positive with probability . The product of the marginals is , which is less than the actual , 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 . Assuming marginal independence would understate the chance of two positives.
- 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 , and given the low state . The contributions are and , so
The negative report does not undo the positive one, since the result is above the prior . A positive report is times as likely in the high state as in the low state, while a negative report is only half as likely there, since , so together they still favor the high state. Sequentially, the first report gives , and the negative report then gives again.
- Toss two fair coins independently. Let be the event that the first shows heads, the event that the second shows heads and the event that exactly one coin shows heads. Are and independent? Are they conditionally independent given ?
Show the answer
They are independent, since . The event consists of the two equally likely outcomes heads then tails and tails then heads, so and . Both heads is impossible given exactly one head, so , which differs from . Hence and are not conditionally independent given . Once 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.