Bayes' Theorem

Let A and B_j be sets. Conditional probability requires that

 P(A intersection B_j)=P(A)P(B_j|A),
(1)

where  intersection denotes intersection ("and"), and also that

 P(A intersection B_j)=P(B_j intersection A)=P(B_j)P(A|B_j).
(2)

Therefore,

 P(B_j|A)=(P(B_j)P(A|B_j))/(P(A)).
(3)

Now, let

 S= union _(i=1)^NA_i,
(4)

so A_i is an event in S and A_i intersection A_j=emptyset for i!=j, then

 A=A intersection S=A intersection ( union _(i=1)^NA_i)= union _(i=1)^N(A intersection A_i)
(5)
 P(A)=P( union _(i=1)^N(A intersection A_i))=sum_(i=1)^NP(A intersection A_i).
(6)

But this can be written

 P(A)=sum_(i=1)^NP(A_i)P(A|A_i),
(7)

so

 P(A_i|A)=(P(A_i)P(A|A_i))/(sum_(j=1)^NP(A_j)P(A|A_j))
(8)

(Papoulis 1984, pp. 38-39).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.