Given 2 events $E, F$, I know that $P(E | F) = \frac{P(E \cap F)}{P(F)}$. However sometimes the Bayes' theorem is used instead: $P(E | F) = \frac{P(F | E) P(E)}{P(F|E)P(E)+P(F|E^{c})P(E^{c})}$. However, when do I know to use the former, simpler definition and when do I use the Bayes' theorem? When I get a problem, how can I recognize which definition to use?

  • 8
    $\begingroup$ The two numerators are equivalent (by one definition of conditional probability) and the denominators are equivalent, too (by the law of total probability). Thus the "definitions" (which aren't really definitions; they are just two formulas for the same thing) are just different ways to perform the calculations. $\endgroup$
    – whuber
    Apr 18, 2014 at 18:27
  • $\begingroup$ I see. So is there a quick way to decide, after reading a problem, whether I should use the simpler definition or the Bayes' theorem? $\endgroup$
    – Adrian
    Apr 18, 2014 at 18:28
  • 4
    $\begingroup$ Yes: when a formula uses terms whose values you don't immediately have, look for a different formula or attempt to re-express those terms using information you do have. It might help to know this is no different than performing any mathematical calculation; it's not special to Bayes' Theorem or to statistics. $\endgroup$
    – whuber
    Apr 18, 2014 at 18:29
  • $\begingroup$ Try solving the Monty Hall problem. It should give you the right intuition about how tricky and how to use law of complete probability and conditional probability. Another equivalent would be the two prisoners riddles. $\endgroup$
    – Royi
    Apr 18, 2014 at 21:13

2 Answers 2


As people have mentioned in the comments it depends on the problem. If you know $P(F)$ you can use your first equation. If you don't know $P(F)$ but you know $P(F|E)$ that is the probability of $F$ conditional on $E$ then you can use the second equation. Both of these equations are equivalent.


The law of total probability is used in Bayes theorem:

P(A|B)=P(A∩B)P(B)⟹P(A∩B)=P(B)P(A|B).P(A|B)=P(A∩B)P(B)⟹P(A∩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)P(B) in the above definition. The law requires that you have a set of disjoint events DiDi that collectively "cover" the event BB. Then, instead of calculating P(B)P(B) directly, you add up the intersection of BB with each of the events EiEi:

P(B)=∑P(B∩Ei)P(B)=∑P(B∩Ei) Of course, we can rewrite this using the definition of conditional probability:

P(B)=∑P(B∩Ei)=∑P(Ei)P(B|Ei)P(B)=∑P(B∩Ei)=∑P(Ei)P(B|Ei) Thus, the following are equivalent:

P(B|A)=P(A∩B)P(A)=P(B)P(A|B)P(B)P(A|B)+P(¬B)P(A|¬B)P(B|A)=P(A∩B)P(A)=P(B)P(A|B)P(B)P(A|B)+P(¬B)P(A|¬B) Since BB and ¬B¬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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.