A conditional probability is a probability based on some background information - that make up a condition.
Suppose there are two bowls of cookies. Bowl 1 contains 30 vanilla cookies and 10 chocolate cookies. Bowl 2 contains 20 of each. Now suppose you choose one of the bowls at random and, without looking, select a cookie at random. The cookie is vanilla. What is the probability that it came from Bowl 1?
p(H|D) = P(H) * (D|H) / P(D)
- p(H): prior
- p(H|D): posterior
- p(D|H): likelihood, probability of the data under the hypothesis
- p(D): normalizing constant
The normalizing constant can be tricky. It is supposed to be the probability of seeing the data under any hypothesis at all, but in the most general case it is hard to nail down what that means.