[Math] When to use Total Probability Rule and Bayes’ Theorem.

bayes-theoremprobability

Consider the following information about travelers on vacation: $40$% check work email, $30$% use a cell phone, $25$% bring a laptop with them, $23$% both check work email and use a cell phone, and $51$% neither check work email nor use a cell phone nor bring a laptop. In addition $88/100$ who bring a laptop also check work email, and $70/100$ who use a cell phone also bring a laptop.

What is the probability that someone who brings a laptop on vacation also uses a cell phone?

I let $A$ represent check work email, $B$ represent use cell phone, and $C$ represent brings laptop. I have the following probabilities:

$P(A)=.4$, $P(B)=.3$, $P(C)=.25$, $P(A\cap B)=.23$, $P(A\cup B\cup C)=.49$, $P(A \mid C)=.88$, $P(C \mid B)=.7$

I found a solution online saying to use Bayes' Theorem to solve this part of the problem but I do not understand why to use Bayes' Theorem. Here is a picture to the solution I am referring to: Problem

Bayes' Theorem does not look like what the solution says to use. In my textbook, the theorem looks like this:Bayes Theorem

Did the person that wrote the solution simplify something? It does not look like either of these two forms.

Also, for problems like these, is there a general rule on when to use Bayes' Theorem and the rule for Total Probability? I cannot figure out when to use what.

Best Answer

The law of total probability is used in Bayes theorem:

$P(A|B)=\frac{P(A\cap B)}{P(B)} \implies P(A\cap B) = P(B)P(A|B).$ This is just the definition of conditional probability.

Now, the Law of Total Probabiliyy can be used to calculate $P(B)$ in the above definition. The law requires that you have a set of disjoint events $D_i$ that collectively "cover" the event $B$. Then, instead of calculating $P(B)$ directly, you add up the intersection of $B$ with each of the events $E_i$:

$P(B)=\sum P(B\cap E_i)$ Of course, we can rewrite this using the definition of conditional probability:

$P(B)=\sum P(B\cap E_i)=\sum P(E_i)P(B|E_i)$

Thus, the following are equivalent:

$P(B|A)= \frac{P(A\cap B)}{P(A)} = \frac{P(B)P(A|B)}{P(B)P(A|B)+P(\neg B)P(A|\neg B)}$ Since $B$ and $\neg B$ are disjoint events.

In general, Bayes' rule is used to "flip" a conditional probability, while the law of total probability is used when you don't know the probability of an event, but you know its occurrence under several disjoint scenarios and the probability of each scenario.

Related Question