Skip to content

Solutions: Bayes’ Theorem and Taxi problem-nutshell

March 21, 2019

Solution to Bayes’ Theorem and the Taxi Problem – in a nutshell

Question a.

a is the prior probability, i.e. the probability that a hypothesis is true before the new evidence arises. This is 0.2 (20%) because 20% of the taxis in New Amsterdam are green.

b is the probability the new evidence would arise if the hypothesis is true. This is 0.8 (80%). There is an 80% chance that the witness would say the taxi was green if it was indeed green.

c is the probability the new evidence would arise if the hypothesis is false. This is 0.2 (20%). There is a 20% chance that the witness would be wrong, and identify the taxi as green if it was in fact yellow.

Inserting these numbers into the formula, ab/ [ab + c(1-a)], gives:

Posterior probability = 0.2 x 0.8/ [0.2 x 0.8 + 0.2 (1 – 0.2)] = 0.16/[0.16 + 0.16] = 0.5 = 50 per cent.

 

Question b.

a is the prior probability, i.e. the probability that a hypothesis is true before the new evidence arises. This is 0.5 (50%) based on the previous calculation.

b is the probability the new evidence would arise if the hypothesis is true. This is 0.7 (70%). There is a 70% chance that the witness would say the taxi was green if it was indeed green.

c is the probability the new evidence would arise if the hypothesis is false. This is 0.3 (30%). There is a 30% chance that the witness would be wrong, and identify the taxi as green if it was in fact yellow.

Inserting these numbers into the formula, ab/ [ab + c(1-a)], gives:

Posterior probability = 0.5 x 0.7/ [0.5 x 0.7 + 0.3 (1 – 0.5)] = 0.35/[0.35 + 0.15] = 0.7 = 70 per cent.

 

Question c.

  1. a is the prior probability, i.e. the probability that a hypothesis is true before the new evidence arises. This is 0.7 (70%) based on the previous calculation.

b is the probability the new evidence would arise if the hypothesis is true. This is 0.5 (50%). There is a 50% chance that the witness would say the taxi was green if it was indeed green.

c is the probability the new evidence would arise if the hypothesis is false. This is 0.5 (50%). There is a 50% chance that the witness would be wrong, and identify the taxi as green if it was in fact yellow.

Inserting these numbers into the formula, ab/ [ab + c(1-a)], gives:

Posterior probability = 0.7 x 0.5/ [0.7 x 0.5 + 0.5 (1 – 0.7)] = 0.35/[0.35 + 0.15] = 0.7 = 70 per cent. Same as before. The new witness is right exactly 50% of the time, and wrong 50% of the time, so adds no new information. The posterior (updated) probability stays the same as the prior probability.

From → Solutions

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: