(Original figure)

So how can we calculate the probability of A given B? Since we know that B is true already, we are only interested in what A does in that specific scenario (see the highlighted part of the figure). More mathematically, we’re looking at the ratio between the probability of both being true over all the possibilities when B is true.

P(A|B) = P(A∧B)/P(B)

Notice how for independent events, the P(B)’s would cancel out. This is why our chances of getting “tails” given the last result was “heads” is unchanged.

P(A∧B)=P(A)P(B)

P(A|B) = P(A∧B)/P(B)

P(A|B) = P(A)P(B)/P(B) = P(A)