2019 / Andreas Koenzen
Imagine you are in the army, and you are in combat. Also imagine you have an amazing new piece of equipment, namely a new helmet that's impervious to all rifle fire. Also you know something about soldiers in the enemy army. You know that 99% of them are regular soldiers, and of those soldiers only 20% of time are they capable of firing a rifle from 400 yards and hitting a target in the head. But there's another group within the enemy army; the sharpshooters, the elite, and they are 1% of the force, but they are also really good at shooting from long distances. 90% of the time when they aim at a target at 400 yards away they can hit it in the head.
I want you to imagine you are out in the field and you look over the horizon and you spot a sole enemy soldier at 400 yards. Now you pick you head just above the edge of the hole you are in to see if that person saw you, and you get shoot right in the head. What are the chances that that person was a: regular soldier or a sniper...?
Note: I will use up to 4 significant digits to make the result as accurate as I can.
P(B1): 0.99 (Probability that's a regular soldier)
P(B2): 0.01 (Probability that's a sniper)
C: Special talent. In this case the skill of being able to hit a target at 400 yards.
P(C/B1): 0.20 (Probability of having special talent, "given" that's a regular soldier)
P(C/B2): 0.90 (Probability of having special talent, "given" that's a sniper)
Now we need to find P(B2/C), which is the probability that is a sniper, "given" that it didn't miss from 400 yards.
Now we have the following probability tree:
If we receive "1 Hit" to our helmet from 400 yards away, then:
If we receive "2 Consecutive Hits" to our helmet from 400 yards away, then:
Observation: For this case we must use the posterior probability from the previous experiment/event as the prior probability of this current experiment/event. This is called Bayesian Updating. That means that we must replace 0.01 with 0.04348.
If we receive "3 Consecutive Hits" to our helmet from 400 yards away, then:
Observation: We update our prior probability again. That means that we must replace 0.04348 with 0.1890.
If we received "3 Consecutive Hits" and now "1 Miss" (Suppose we heard the shot) then:
Observation: What we must do in this case is use the previous posterior probability as our prior in order to represent the "3 Hits", but the likelihood of missing "given" that's a snipper over the evidence or Total Probability of missing, in order to represent the current "1 Miss".