4. Bayesian Updating
Turning The Conditional Around
We have:
$$ P(A\land B)=P(A)P(B\mid A). $$
But $A\land B$ is the same joint event as $B\land A$.
So we can also write:
$$ P(A\land B)=P(B)P(A\mid B). $$
Both expressions describe the same part of the possibility space.
The two different right sides are equal to the same left side, so they are equal to each other:
$$ P(A)P(B\mid A)=P(B)P(A\mid B). $$
If:
$$ P(B)>0, $$
we can divide by $P(B)$:
$$ P(A\mid B)=\frac{P(B\mid A)P(A)}{P(B)}. $$
That is Bayes' theorem.
We have only described the same joint event in two directions and rearranged the equality. The result follows from the conditional relation we have already reconstructed and from algebra.
Why, then, is the formula useful?
The answer becomes clearer when the conditional we know is not the conditional we want.
A diagnostic test gives us a simple case.
Bayes' Theorem
Suppose:
$$ H=\text{a person has disease D} $$
and:
$$ E=\text{a diagnostic test is positive}. $$
Imagine that in a certain population:
$$ P(H)=0.01. $$
One person in one hundred has the disease.
Suppose the test returns a positive result for 90 percent of people who have it:
$$ P(E\mid H)=0.90. $$
And suppose it also returns a positive result for 5 percent of people who do not:
$$ P(E\mid\neg H)=0.05. $$
A person tests positive.
How likely is it that the person has the disease?
The 90 percent figure is tempting.
But it answers: Given the disease is present, how likely is a positive test?
We want: Given a positive test, how likely is the disease?
Those are:
$$ P(E\mid H) $$
and:
$$ P(H\mid E). $$
They are not the same conditional.
We can answer the second question without Bayes' theorem.
Imagine 10,000 people.
About 100 have the disease.
Of those, about 90 test positive.
The other 9,900 do not have the disease.
Five percent of them also test positive:
$$ 495. $$
So there are about:
$$ 90+495=585 $$
positive tests.
Of those, about 90 come from people with the disease:
$$ P(H\mid E) \approx \frac{90}{585} \approx0.154. $$
The positive result has changed the probability substantially. It has moved from one percent before we looked at the evidence to about fifteen percent after we looked at the evidence. But it has not moved to ninety percent.
Bayes' theorem lets us calculate that result in a general way.
A positive test can occur in two mutually exclusive ways: the person has the disease and tests positive, or the person does not have the disease and tests positive.
So:
$$ P(E)=P(E\land H)+P(E\land \neg H). $$
Using the multiplication rule from the previous chapter:
$$ P(E\land H)=P(H)P(E\mid H) $$
and:
$$ P(E\land \neg H)=P(\neg H)P(E\mid\neg H). $$
Combining the two branches gives:
$$P(E)=P(E∣H)P(H)+P(E∣¬H)P(¬H).$$
So:
$$ P(E) =0.90\cdot0.01 + 0.05\cdot0.99 =0.0585. $$
We now have all the pieces we need:
$$ P(H)=0.01, $$
the prior probability of the hypothesis,
$$ P(E\mid H)=0.90, $$
the probability of the evidence if the hypothesis is true,
$$ P(E) = 0.0585 $$
the total probability of the evidence, and we want:
$$ P(H\mid E), $$
the probability of the hypothesis given the evidence.
We take Bayes' theorem
$$ P(H\mid E) =\frac{P(E\mid H)P(H)}{P(E)}. $$
and plug the values in:
$$ P(H\mid E) =\frac{0.90\cdot0.01}{0.0585} \approx0.154. $$
Again, both routes give the same result.
We can construct an imagined finite population and count. Or we can use the algebraic relation.
The formula reaches the same result while doing much less work.
Up to this point, we are still close to the world of dice and cards. The probabilities supplied to the calculation may have empirical histories, but the inversion itself can still be reconstructed through explicit finite arrangements.
The situation changes when the possibilities themselves are hypotheses.
A Hypothesis Is Not A Card
A computer repeatedly restarts under heavy load.
Several explanations occur to us.
The power supply may be failing. The machine may be overheating. Memory could be defective.
Call these:
$$ H_1=\text{power supply failure}, $$
$$ H_2=\text{overheating}, $$
and:
$$ H_3=\text{memory failure}. $$
We observe:
$$ E=\text{the machine restarts under heavy load}. $$
We can ask:
$$ P(H_i\mid E). $$
The form is familiar.
But a hypothesis is not a card.
We cannot spread every possible explanation of the machine failure across a table and check that all of them are present.
Probability theory did not generate:
$$ H_1,H_2,H_3. $$
Someone had to think of them.
A technician may recognize familiar failure patterns. The age of the power supply may make one possibility salient, or overheating may have occurred before. Memory problems may also be common in similar machines.
Why exactly these three?
The operating system may contain a bug, the motherboard may be failing, the external power supply may be unstable, or two faults may occur together.
The probability model can distribute weight only among possibilities represented in it.
If an important hypothesis is missing, no flawless update can assign probability to it until the model changes.
This is the old problem of possibility generation in another form. With dice, the completeness of the possibility space was easy to inspect. Here, the conviction that the relevant possibilities have been included has to come from somewhere else.
Schematically, Bayes' theorem lets us do this:

An observation can change how strongly competing hypotheses are weighted. The rest of the chapter asks what has to be in place for that update to be carried out.
Priors
For this small model, suppose we treat these three hypotheses as mutually exclusive and exhaustive: exactly one of them is taken to explain the failure.
We assign:
$$ P(H_1)=0.50, $$
$$ P(H_2)=0.30, $$
$$ P(H_3)=0.20. $$
These are priors: the probabilities assigned to the hypotheses before (prior to) the observation (E) is used to update them.
Where did they come from?
Comparable failures may historically have been power-supply problems about half the time. A technician might instead translate her own judgment of plausibility into numbers, or the values may come from another statistical model.
The notation does not preserve that history.
It gives us:
$$ P(H_1)=0.50. $$
The prior must get its convincing force from experience, data, another model, judgment, or several of these together.
Likelihoods
We also need to know how expected the observation would be under each hypothesis.
Suppose:
$$ P(E\mid H_1)=0.80, $$
$$ P(E\mid H_2)=0.60, $$
$$ P(E\mid H_3)=0.20. $$
The likelihood, too, has to get its convincing force from the support behind the number. Once it enters the model, the update constrains what follows from it.
Evidence
Even:
$$ E $$
had to be constructed.
Something happened in the machine.
We represented it as "The machine restarts under heavy load."
We might instead have recorded "The machine restarts within thirty seconds above 80 percent CPU load", or "The machine loses power without a kernel panic."
Those descriptions preserve different distinctions. The world does not arrive carrying an $E$ label.
Something becomes salient, is observed, classified, measured or described, and then enters the formal process in a particular representation.
Probability theory can operate on that representation.
It does not decide from nowhere which description should matter.
The Update
Now suppose the model is in place.
We have:
$$ P(H_1)=0.50, \quad P(H_2)=0.30, \quad P(H_3)=0.20 $$
and:
$$ P(E\mid H_1)=0.80, \quad P(E\mid H_2)=0.60, \quad P(E\mid H_3)=0.20. $$
The probability of the observation under the model is:
$$ P(E) =0.80\cdot0.50 + 0.60\cdot0.30 + 0.20\cdot0.20. $$
So:
$$ P(E)=0.62. $$
The posterior probabilities are:
$$ P(H_1\mid E) =\frac{0.80\cdot0.50}{0.62} \approx0.645, $$
$$ P(H_2\mid E) =\frac{0.60\cdot0.30}{0.62} \approx0.290, $$
and:
$$ P(H_3\mid E) =\frac{0.20\cdot0.20}{0.62} \approx0.065. $$
Conditioning the model on the restart under load has redistributed the weights.
The power-supply hypothesis has become more probable in the model. The memory hypothesis has become substantially less probable. Overheating remains live.
In the logical examples, much of the visible constraint worked by exclusion..
A combination survived or did not. A counterexample existed or it did not.
Probability can constrain while leaving several possibilities open.
It can say, in effect: These possibilities remain, but not with the same weight.
Once the hypothesis space and its structure, the priors, likelihoods, representation of the evidence, and probability rules remain in place, the posterior values are not separately open.
We cannot then choose that:
$$ P(H_3\mid E) $$
should come out as $0.7$ because memory failure happens to be our preferred explanation.
Something else would have to change: a prior, a likelihood, the hypothesis space, the evidence, or the calculation.
The agent can participate in constructing the formal conditions. But the result inside those conditions is constrained.
And the agent did not choose what the machine did merely by choosing to examine it. The observation entered the process as something that had occurred.
The Posterior Is Not The Conviction
Suppose the calculation gives:
$$ P(H_1\mid E)\approx0.645. $$
A technician may now find power-supply failure more convincing. Or not.
She may distrust the prior, think the overheating likelihood is badly estimated, notice another possible failure mode, or question how the observation was represented.
The posterior is a result inside the model. Conviction is what forms for the person.
The formal result can participate strongly in conviction formation without being identical with conviction.
Other parts of the person's orientation still matter: whether the priors, likelihoods, evidence, and model remain convincing.
That is what CFT would lead us to expect. The calculation can constrain part of the process without determining what the person will become convinced of.
The calculation can make a discrepancy explicit: It can expose a difference between the person's earlier orientation and the consequences of probabilities she accepted. But it cannot simply install the posterior as conviction.
One further condition remains worth keeping in view.
If several pieces of evidence enter the model, their dependence relations matter. Probability theory can preserve whatever dependence structure we supply. It cannot repair a dependence we represented incorrectly. The card example gave us a simple case in which changing the condition changed the probability.
A formal system can constrain very strongly while faithfully carrying an error that entered through its representation.
With dice and cards, much of what supported the probability assignment remained easy to inspect. With hypotheses, more of that support has to be supplied by judgments, observations, models, and classifications whose own convincing force must be examined separately.