Let A1, A2,…, Ak be mutually exclusive events whose union is the whole sample space of an experiment and let B be an event with Pr(B) ≠ 0. Then Pr(Ai|B) equals
For example, let A1 be the event of tossing a double-headed coin and A2 the event of tossing a normal coin. Suppose that one of the coins is chosen at random so that and . Let B be the event of obtaining ‘heads’. Then and . So
This says that, given that ‘heads’ was obtained, the probability that it was the double-headed coin that was tossed is 2/3.
Here, Pr(Ai) is a prior probability and Pr(Ai | B) is a posterior probability.