The person in our previous two posts drinks every other day. As we have seen before, when he comes back, he must use the house key from the bunch of ten similar ones. As he can’t find which key is correct, he tries them individually when sober. When drunk, he pushes the same way but can’t distinguish which keys he has tried before.
What is the probability that he was inebriated on the day he unlocked the door on his seventh attempt?
It is a conditional probability problem, and the ask is:
The probability that he is drunk, given he got the right key on the seventh attempt or P(D|7). We can use Bayes’ rule, that is,
The terms are:
P(7|D) – Probability he opens on his 7th try, given he is drunk
P(D) – Prior probability that he is drunk on the day
P(7|S) – Probability he opens on his 7th try, given he is sobber
P(S) – Prior probability that he is sobber on the day
P(7|D) = (9/10)6 x (1/10) = 0.053
P(7|S) = (9/10)x(8/9)x(7/8)x(6/7)x(5/6)x(4/5)x(1/4) = 1/10 = 0.1
P(D) = 1/2
P(S) = 1/2
There is a 35% probability that he is drunk.