In statistics, a theorem relating the probability of particular events taking place to the probability that events conditional upon them have occurred. For example, the probability of picking an ace at random out of a pack of cards is 4/52. If two cards are picked out, the probability of the second card being an ace is conditional on the first card: if the first card was an ace the probability will be 3/51; if not it will be 4/51. Bayes' theorem gives the probability that given that the second card is an ace, the first card is also.