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?
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\%$.