Problem Statement
Three friends in Seattle each told you it’s rainy, and each person has a 1/3 probability of lying. What is the probability that Seattle is rainy? Assume the probability of rain on any given day in Seattle is 1/4.Solution
We can use the Bayes theorem to find the required probability. For this case let's use the theorem in odds form$${P(H_{1}|E) \over P(H_{2}|E)} = {P(H_{1}) \over P(H_{2})} * {P(E|H_{1}) \over P(E|H_{2})} $$ Let's define our hypotheses, priors and evidence:
- \(H_{1}\) - "Seattle is rainy"
- \(H_{2}\) - "Seattle is not rainy"
- \(P(H_{1}) = 1/4 \) - prior probability of the first hypothesis
- \(P(H_{2}) = 3/4 \) - prior probability of the second hypothesis
- Evidence - all 3 friends told us it's rainy
- \(P(E | H1) = (2/3)^3\) - if it's rainy, all 3 friends had to tell the truth to generate the evidence we have
- \(P(E | H2) = (1/3)^3\) - if it's not rainy, all 3 friends had to lie
$${P(H_{1}|E) \over P(H_{2}|E)} = {1/4 \over 3/4} * {(2/3)^2 \over (1/3)^3} = {8 \over 3} $$ Finally, we can convert odds to the required probability as follows:
$$\pmb{P(H_{1}|E) = {8 \over (8 + 3)} = {8 \over 11} = 0.73}$$ Not convinced? Try the simulation below!
Simulation
Note that in this simulation we need to model the situation when all 3 friends saying that the day is rainy. Only experiments where this criterion is satisfied will be used to calculate the final probability - this way we simulate the conditional probability we need.
show / hide simulation code
PREVIOUS | NEXT |