Bayes theorem can be considered as the most important application of conditional probability. Conditional probability is defined considering two events that can occur together. Bayes' theorem extends this to a scenario where an event can occur with any one of a number of mutually exclusive events.
Suppose there are two baskets both containing apples and oranges. Let the first basket contains 10 apples and 12 oranges and in the second basket there are 15 apples and 12 oranges. Conditional probability problems deal with finding the probability of picking a type of fruit (apple or orange) when it is known which basket it has come from. Baye's Theorem deals with the inverse probability of the fruit coming from a basket when the type of the fruit is known.

In Baye's model, the probabilities are calculated expressing the given event as a union several intersections the event makes with the mutually exclusive events.

Suppose an event B can occur in combination with one of the n mutually exclusive events, A1, A2, ......An, and P(B) > 0, then Bayes theorem provides a rule for calculating the conditional probability of the occurrence of one of the above n events Ar, given that B has already occurred.
P(Ar | B) = $\frac{P(A_{r}\cap B)}{P(A_{1}\cap B)+P(A_{2}\cap B)+.....P(A_{n}\cap B)}$