Appendix 2.1: Derivation of Bayes’ Theorem

We know that the following formulas are correct:

P(A|B)=P(AB)P(B) (1)
P(B|A)=P(AB)P(A) (2)
[which can be rewritten as P(AB)=P(B|A)P(A)] and
P(B|A)=P(AB)P(A)
[which can be rewritten as P(AB)=P(B|A)P(A)]. (3)

Furthermore, by definition, we know that

P(B)=P(AB)+P(AB)=P(B|A)P(A)+P(B|A)P(A)from(2)from(3) (4)

Substituting Equations 2 and 4 into Equation 1, we have

P(A|B)=P(AB)P(B)from(2)=P(B|A)P(A)P(B|A)P(A)+P(B|A)P(A)from(4) (5)

This is the general form of Bayes’ Theorem, shown as Equation 2-5 in this chapter.

Get Quantitative Analysis for Management, 13/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.