Dark Mode

1,760 views

2 votes

Best answer

Here the first line is

P(B) = ∑_{j }P(B|A_{j}) P(A_{j}) ................................(1)

Now, we know that P(A_{i} | B) = P (A_{i }∩ B) / P(B)

So, P(B)= P (A_{i} ∩ B) / P(A_{i} | B) ........................(2)

Again, P (A_{i} ∩ B) = P (B ∩ A_{i}) = P (A_{i}) P (B | A_{i} ) ............... (3)

So, putting the value of P (A_{i} ∩ B) from (3) in (2) we get

P(B)= ( P (A_{i}) P (B | A_{i} ) ) / P(A_{i} | B) ...........................(4)

Now, putting the value of P(B) from (4) in (1) we get

( P (A_{i}) P (B | A_{i} ) ) / P(A_{i} | B) = ∑_{j }P(B|A_{j}) P(A_{j})

Hence P(A_{i} | B) = ( P (A_{i}) P (B | A_{i} ) ) /∑_{j }P(B|A_{j}) P(A_{j}) (The second line of the question)

1 vote

Sreshta, I can give you an intuitive proof which will be very helpful in solving most of the Bayes theorem questions.

Take an example say we have two Events A1 and A2 and en Event B.B is independent of A1 and A2 and A1 and A2 are mutually exclusive.

Your Line 1 Says, to count how many ways My Event B can occur, you have to Sum up all the ways Event B can occur after event A occurs.

So, in this Case, P(B)=Sum of 1 and 2 shown in the figure above.

Your line 2 asks, what is the probability that Event A_{i} occurs when Event B has occurred.

For this, we can use basic definition of probability which says favourable ways/total ways.

The probability that Ai occurs when Event B has already occurred = $\frac{Probability of happening of B when A_{i} occurs}{Probability in which all ways B can occur}$

so lets us focus on our example.

P(A1|B)=Probability of happening of A1 given B has already occurred is given by expressions.

= $\frac{1}{1+2}$

The numerator expresses happening of B after A1 has occurred.

The denominator expresses all in all how Event B can occur.