Probability - Bayes' Theorem

371 Views Asked by At

99% of the restaurants practice good hygiene. Each time you eat in a clean restaurant, there is a $1\%$ chance that you will get sick, independent of your previous visits. Each time you eat in a restaurant that does not practice good hygiene, on the other hand, there is a $50\%$ chance that you will get sick, independent of your previous visits.

Question: You eat at a random restaurant and get sick. You go to the same restaurant for a second time, and you get sick again. What is the probability of the restaurant practicing good hygiene?

When it is conditional independent, I am assuming the probability is the same no matter it is the 1st, 2nd, or 3rd visit.

By Bayes' Theorem, $P(A\mid B)=\frac{0.99\cdot0.01}{(0.99\cdot0.01)+(0.01\cdot0.50)}\approx0.6644$.

Do I need to consider if I was sick after the first visit?

2

There are 2 best solutions below

2
On BEST ANSWER

Assume there are $100$ restaurants, one of which doesn't practice good hygiene, and you go to each restaurant $10,000$ pairs of times. You will get sick twice in $2599$ of those pairs. Of those, $99$ times you'll have picked a restaurant with good hygiene. So the probability that you picked a restaurant that practices good hygiene is $\frac{99}{2599}$, or a little under $4\%$.

0
On

To get the same result in the accepted answer, we can also obtain the same result by updating Bayes' Theorem:

We know that after one visit, the probability of visiting a good-hygiene restaurant and becoming ill is $0.6644$); the probability of visiting a bad-hygiene restaurant and becoming ill would be $1-0.6644=0.3356$. If we use this as the updated restaurant choice, then we get

$P(A\mid B)=\frac{0.6644\cdot0.01}{(0.6644\cdot0.01)+(0.3356\cdot0.50)}\approx0.0381\approx\frac{99}{2599}$. Observe that the second approximation sign is there to show that this will yield the same outcome as the accepted answer (which is quite intuitive).

This method emphasizes the heart of the Bayesian approach: once we uncover new information, we update our model.