Calculate the conditional probability of A given B.