Conditional probability is the probability that some event A will happen, knowing that event B has happened. It is written P[A|B], read "the probability of A, given B". Here is how to compute it:
- P[A|B] = P[A AND B] / P[B]
- If A and B are independent events (that is, the occurrence of either one does not affect the occurrence of the other in any way), then P[A AND B] = P[A]·P[B].