Conditional probability using Bayes’ rule

bayes-theoremconditional probabilityprobability

This question is based on a previous question that I asked here. Same context as before:

Tom is a night owl and is very hungry at night. On day 𝑖, he eats at home with probability 1−𝑝 (0<𝑝<1); or, with probability 𝑝, he goes out and goes the 𝑖-th restaurant in his city. At any restaurant that he goes to, either:

(i) the restaurant is open with probability 𝑞 (where 0<𝑞<1). In that case, Tom orders some food for take-away;

(ii) the restaurant is closed so Tom returns home and has sleep for dinner because he is sad.

We assume that the collection of all events of the form {Tom stays home on day 𝑖} and {The 𝑖-th restaurant is open on day 𝑖}, for 𝑖=1,2,…, are (mutually) independent.

I stated that the conditional probability of Tom staying home on day 1, given that he did not order food on that day is

$$\frac{1-p}{p(1-q)}$$

However, I think that previous probability is wrong, and that instead it should actually be

$$\frac{1-p}{p\left(1-q\right)+(1-p)}=\frac{1-p}{1-pq}$$

Because either Tom goes out and the restaurant was closed with probability of 𝑝(1−𝑞) meaning that he didn't order food and Tom stays at home with probability of 1−𝑝 which also means that he didn't order food.

Could someone please tell me which one of these two conditional probabilities is correct?

I want to believe it's the second one. Thanks for any feedback.

Best Answer

Whenever confused re Bayes' Rule, it is a good idea to draw a contingency diagram

$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;$ Went Out $\;\;\;\;$ Stayed home

Ordered food $\;\;\;\;\;\;\;\;$pq $\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; 0$

Didn't order food $\;\;\;$p(1-q) $\;\;\;\;\;\;\;\;$ (1-p)

You should be able to clearly see that your second formula is correct

Related Question