In probability theory, conditional probability is the probability that some event A occurs, knowing that event B occurs. It is written P(A|B), read "the probability of A, given B".

If A and B are events, and P(B) > 0, then

P(A|B) = P(AB) / 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 ∩ B) = P(A) · P(B), so P(A|B) = P(A).

If B is an event and P(B) > 0, then the function Q defined by Q(A) = P(A|B) for all events A is a probability measure.

Conditional probability is more easily calculated with an decision tree.