Learn
Lesson · Knowledge and Evidence · Credence

Updating on Evidence

Updating takes a prior over some hypotheses, multiplies each by how probable the observation is on it, and rescales so the results sum to 1. The Bayes factor compares how probable the data are on a hypothesis and on its rivals, and a second observation updates the result of the first.

P(H | E) = P(E | H)·P(H) / P(E) Bayes factor: P(E | H) / P(E | ¬H) posterior odds = prior odds · factor fit is not proof: weigh the rival too
Weighing evidence

Core ideas

What this lesson establishes

The previous lesson computed one conditional credence from a table. Updating is the same computation arranged so that it can be repeated as evidence keeps arriving.

1

The likelihood belongs to the hypothesis

How probable the observation is if the hypothesis is true. A hypothesis that makes the observation probable gains on one that makes it improbable, and neither number alone is the posterior.

2

The Bayes factor is the weight of the evidence

The likelihood of the data on a hypothesis divided by its likelihood on the alternatives. A factor of 3 means the data are three times as probable on the hypothesis, and it multiplies the odds.

3

Updating in sequence agrees with updating once

The posterior after the first observation is the prior for the second. The factors of independent observations multiply, and the order in which they arrive does not change the result.

The material

Two urns and a red ball

A prior, a likelihood and an observation, worked out on paper before the lab does it.

Two urns hold four balls each. One of them is chosen by a fair coin, you cannot see which, and a ball is drawn from it.

urn 1: red red red blue urn 2: red blue blue blue

The prior credence in each urn is 1/2. A red ball is drawn. It is red with probability 3/4 if the urn is urn 1 and 1/4 if it is urn 2. Multiply each prior by its likelihood, then divide by the total so that the posteriors sum to 1.

urn prior P(red | urn) product posterior --------------------------------------------------- urn 1 1/2 3/4 3/8 3/4 urn 2 1/2 1/4 1/8 1/4 total 1/2 1
Definition · Posterior

The posterior credence in a hypothesis H after evidence E is P(H | E) = P(E | H)·P(H) / P(E). The denominator P(E) is the total of the products over every hypothesis, so the step is: multiply, add, divide.

The red draw moved urn 1 from 1/2 to 3/4. A summary of how much it moved, independent of where it started, is the Bayes factor: the probability of the data on urn 1, 3/4, over the probability of the data on the alternatives, 1/4, which is 3.

Definition · Bayes factor and odds

The Bayes factor of the data for H is P(E | H) / P(E | ¬H), with the likelihood on the alternatives averaged by their priors when there are several. The odds on H are the credence in H against the credence in ¬H, so a credence of 3/4 is odds of 3 to 1, and odds of a to b are a credence of a/(a + b). The posterior odds on H equal the prior odds times the factor, and a factor of 1 leaves the credence where it was.

Here the prior odds are 1 to 1, the factor is 3, and the posterior odds are 3 to 1, which is the posterior 3/4. With two hypotheses the factor does not depend on the prior, so the same red ball multiplies the odds by 3 whatever they were.

A second observation

Put the ball back and draw again. The second ball is also red. The prior for this step is the previous posterior, 3/4 for urn 1, and the update gives (3/4)·(3/4) = 9/16 against (1/4)·(1/4) = 1/16, so the posterior is 9/10. The factors multiply, 3 · 3 = 9, and so do the odds, 1 to 1, then 3 to 1, then 9 to 1. Had the second ball been blue, the factor for urn 1 would have been 1/3 and the credence would have returned to 1/2; the same two balls in the other order give the same answer.

Fit is not proof

A coin is either two-headed or fair, and the prior for two-headed is 1/100. Three heads in a row are certain on the two-headed coin and have probability 1/8 on the fair one. That is a Bayes factor of 8, and the lab gives a posterior of 8/107 for two-headed: under 8%.

The evidence confirms the hypothesis, in that its credence rose from 1/100, and fits it perfectly, since its likelihood is 1. It does not prove it. A posterior of 1 would need the data to be impossible on every rival, and a rival that makes three heads merely improbable keeps its share of the credence. The reverse is stricter: one tails makes the likelihood of the two-headed coin 0 and its posterior 0, whatever the prior.

What the lab cannot supply is the hypotheses. It updates over the ones listed, with the likelihoods typed in, and if the truth is not among them it still prints exact fractions.

Interactive

Exact Bayesian updating

prior times likelihood, normalised; the Bayes factor is the weight of the data

Hypotheses, data, posteriorevery figure is an exact fraction

Method

Updating on one observation

Five moves, the same whether there are two hypotheses or five.

1

List the hypotheses and their priors

The priors must sum to 1, and the list must include the truth if the answer is to be trusted.

2

Read off the likelihood of what was seen

For each hypothesis, how probable the observation is if it is true. A likelihood is not a credence in the hypothesis.

3

Multiply, add and divide

Multiply each prior by its likelihood, add the products, and divide each product by the total. The results are the posteriors.

4

Report the Bayes factor

Divide the likelihood on the hypothesis by the likelihood on the rest. It says how much the observation moved the odds, without the prior in it.

5

Use the posterior as the next prior

For another observation, repeat the steps from the posterior. Do not return to the original prior and do not count an observation twice.

Posteriors and factors

Score 0 / 0

Urn 1 after two red draws

Prior 1/2 each; urn 1 has 3 red in 4, urn 2 has 1 red in 4.

draw 1 red: urn 1 1/2 · 3/4 = 3/8 urn 2 1/8 posterior: urn 1 3/8 / (1/2) = 3/4 factor 3 draw 2 red: urn 1 3/4 · 3/4 = 9/16 urn 2 1/16 posterior: urn 1 9/16 / (10/16) = 9/10 factor so far: 3 · 3 = 9

The same answer comes from one step using both balls: the likelihood of two reds is 9/16 on urn 1 and 1/16 on urn 2, a factor of 9 on prior odds of 1 to 1. Updating twice and updating once are the same arithmetic.

Common mistakes

1
Thinking that evidence that fits a hypothesis proves itThree heads fit the two-headed coin as well as anything could, with likelihood 1, and the lab still gives it only 8/107. How well the hypothesis explains the data is one factor; how probable it was before, and how well the rival explains the data, are the others. Proof would need a rival that makes the data impossible.
2
Reading the Bayes factor as the posteriorA factor of 9 does not mean a credence of 9/10. It multiplies the odds, and the odds started somewhere. From a prior of 1/5 it gives 9/13; from 1/100 it gives 1/12; only from even odds is it 9/10.
3
Using the same observation twiceAfter the first red ball the credence in urn 1 is 3/4. The second update starts from that, not from the original 1/2 and not by adding the first ball again. A single red ball counted twice would give 9/10 on the evidence of one draw.

Check your understanding

✓
Finish when you can update twice and name the factor each time.

You should be able to take priors and likelihoods, produce posteriors by multiplying, adding and dividing, state the Bayes factor of the data for a hypothesis, and update again on a second observation, showing that the factors multiply.

Note: The lab updates over a short list of hypotheses and a short list of outcomes, with likelihoods you type. It is the standard calculation of Bayesian updating, and everything that is philosophically contestable lies in the inputs.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.