Posterior Probability — Definition, Formula & Example
Posterior probability is the probability you assign to a hypothesis after you take new evidence into account. It is your original belief (the prior) updated by what you just observed.
Let be a hypothesis and an observed event with . The posterior probability of is the conditional probability . By Bayes' theorem this equals . Computing it therefore requires three inputs: the prior , the likelihood , and the evidence probability . You can supply directly or build it with the law of total probability: .
Key Formula
Where:
- = Posterior: probability of the hypothesis given the evidence
- = Prior: probability of the hypothesis before seeing the evidence
- = Likelihood: probability of the evidence if the hypothesis is true
- = Probability of the evidence if the hypothesis is false
- = Prior probability that the hypothesis is false, equal to
Worked Example
Problem: An email filter knows that 10% of incoming email is spam. A flagged word appears in 90% of spam messages and in 10% of legitimate messages. A message contains the flagged word, and then a second check, with the same 90% and 10% rates and independent of the first given whether the message is spam, also flags it. Find the probability that the message is spam after each flag.
Step 1: Let = the message is spam and = the first flag. Write the prior and the likelihoods, then find the total probability of a flag.
Step 2: Divide the spam part by the total to get the first posterior.
Step 3: The posterior becomes the new prior. Update again with the second flag , using in place of .
Answer: After the first flag the probability of spam is . Using that posterior as the prior for the second flag gives . Each posterior becomes the prior for the next piece of evidence, so the probability climbs from 10% to 50% to 90%.
Why It Matters
Posterior probabilities drive medical screening decisions, spam filters, and the parameter estimates in a college Bayesian statistics course. Each new observation can turn today's posterior into tomorrow's prior, which is how Bayesian filters and models update their estimates.
Common Mistakes
Mistake: Reading the 90% as the answer: 90% of spam contains the flagged word, so a flagged message must be 90% likely to be spam.
Correction: That treats the likelihood as the posterior . The posterior also depends on the prior (only 10% of email is spam) and on the 10% of legitimate email that contains the word. After one flag it is , or 50%.
