Suppose you have 2 identical-looking coins: one that is fair and one that comes up heads 75% of the time.
You randomly chose one of them, flip it 3 times and it comes up as H-H-T.
What is the chance that the coin you picked is the fair one?
Source: Project Euler
Simple Bayesian calculation
The fair coin comes up HHT with probability (1/2)*(1/2)*(1/2) = 1/8 = 8/64
The other coin comes up HHT with probability (3/4)*(3/4)*1/4 = 9/64
In my head, then, the probability of the fair coin has just become 8/17. Final answer.
proper calculation is
(1/2)*(8/64) / ((1/2)*(8/64) + (1/2)*(9/64)),
but I just shortcutted it as 8/(8+9)