Law of total probability

Let's try to generalise this example a bit. We will call left-handedness "condition A", and gender is condition B. For condition A, we are only interested in one state, but condition B has two states (for the sake of this exercize) B1 (male) and B2(female).

Probability of A and B1, as we showed above, is thus:

P(A and B1)=P(A|B1)∗P(B1)

And then the reverse:

P(A and not B1)=P(A|not B1)∗P(not B1)

We need to add these two together to get the complete P(A).

Now, let's imagine a different scenario where we have 3 mutually exclusive conditions B1,B2,B3.

P(A and B1)=P(A|B1)∗P(B1)...P(A and B3)=P(A|B3)∗P(B3)

In order to get the total P(A) we need to add them all together:

P(A)=P(A and B1)+P(A and B2)+P(A and B3)

If we generalize this as a sum with number of conditions i:

∑iP(A|Bi)P(Bi)

We call this the Law of Total Probability.