Bayes theorem

P(A|B)=P(B|A)P(A)/P(B) where A and B are two events, P(B|A) is the probability of getting B such that Event A has already occurred.