In Pillow Problems and a Tangled Tale Lewis Carroll presents the following problem:
A bag contains a counter, known to be either white or black. A white counter is put in, the bag is shaken, and a counter is drawn out, which proves to be white. What is now the chance of drawing a white counter?
One can easily reason that in the end, the bag must be in one of three states:
- Black remains, new white taken
- New white remains, original white taken
- Original white remains, new white taken
In two of those states, a white counter remains to be drawn. Therefore, the chance is 2/3.
How can one arrive to this answer using Bayes' theorem?
Let A be the event that the original counter is white.
Let B be the event that you pulled out a white counter.
Bayes' Theorem is:
$$P(A|B) = \frac{P(B|A)P(A)}{P(B)}$$
Then $P(B|A)=1, P(A)=\dfrac12, P(B)= P(A)P(B|A) + P(A')P(B|A')= \dfrac34$.
So $P(A|B)=\dfrac12\dfrac43=\dfrac23$.