Identifying Bayesian Roles
Introduction
Welcome back to Bayes' Theorem from the Ground Up! This is Lesson 3 of 5, which means you have crossed the halfway mark of the course. Well done!
In Lesson 1, we learned to solve inverse-probability problems by turning percentages into whole-number counts across a population. In Lesson 2, we translated that counting approach into the formal Bayes' theorem formula. Now it is time to sharpen a skill that ties everything together: looking at a real-world scenario written in plain language and confidently identifying which number plays which role. By the end of this lesson, you will be able to pick out the prior, the likelihood, and the posterior in any worded Bayesian problem — even when the wording tries to trip you up.
Why Role Identification Matters
Knowing the Bayes' theorem formula is one thing; knowing where each number goes is another. Imagine having a perfect recipe but confusing salt with sugar. The steps are correct, yet the result is inedible. The same thing happens when we accidentally swap the prior and the likelihood in a Bayesian calculation.
Before we ever plug numbers into the formula, we need to read a scenario and ask: Which number is which? Getting the roles right is the difference between a meaningful answer and a meaningless one. That is exactly the skill we are building today.
The Prior: Your Starting Belief
The prior is the probability we assign to a hypothesis before we look at any new evidence. As you may recall from earlier in this learning path, this is often called the base rate. It answers a simple question: How common is this hypothesis in the first place?
For example, suppose 2% of packages shipped by an online retailer arrive damaged. If we later inspect a particular package, the prior probability that it is damaged is:
A helpful way to spot the prior in a word problem is to ask: "If I knew absolutely nothing else, what would I believe?" The answer to that question is your prior. It usually appears as a prevalence rate, a historical frequency, or a known proportion of a population.
The Likelihood: How Well Evidence Fits the Hypothesis
The likelihood describes how probable the observed evidence is assuming a particular hypothesis is true. In notation, it is . Notice the direction carefully: we are not asking how probable the hypothesis is. We are asking how probable the evidence is, given the hypothesis.
In many textbook scenarios, likelihoods show up as test characteristics:
- True-positive rate (sensitivity): — how often the test correctly flags a true case.
- False-positive rate: — how often the test mistakenly flags a case that is actually fine.
Both of these are likelihoods because each one conditions on a hypothesis (condition present or condition absent) and states how likely a piece of evidence (the test result) is under that hypothesis. A single Bayesian problem will often contain more than one likelihood, and that is perfectly normal.
The Posterior: The Answer We Seek
The posterior is the probability of the hypothesis after we have taken the new evidence into account. It is written as , and it is almost always what the problem is asking us to find.
Returning to our shipping example: after a customer reports that the box felt unusually light (the evidence), the posterior would be . The prior told us 2% of packages are damaged in general; the posterior tells us how much that belief should shift now that we have this new clue.
A practical tip: look for phrases like "What is the probability that… given that…" or "How likely is it that… after observing…". The quantity the problem asks you to calculate is almost always the posterior.
Quick-Reference Comparison
Before we look at a full example, here is a side-by-side summary of the three roles:
| Role | What It Represents | Notation | Typical Clue Words |
|---|---|---|---|
| Prior | Baseline belief before evidence | prevalence, overall, in general, historically | |
| Likelihood | Probability of the evidence given a hypothesis | sensitivity, detection rate, false-alarm rate, among those who… | |
| Posterior | Updated belief after evidence | what is the probability that… given…, the question itself |
Keep this mental checklist handy as we work through the next example.
Labeling a Full Scenario
Let us walk through a complete scenario and label every number.
A factory produces circuit boards. Historically, 5% of boards have a soldering defect. An automated camera inspection catches 90% of defective boards. However, it also falsely flags 8% of good boards. A board has just been flagged. What is the probability that it truly has a defect?
We can map each stated fact to its role:
| Stated Fact | Symbol | Role |
|---|---|---|
| 5% of boards have a defect | Prior | |
| Camera catches 90% of defective boards | Likelihood (true-positive rate) | |
| Camera falsely flags 8% of good boards | Likelihood (false-positive rate) | |
| Probability board truly has a defect given it was flagged | Posterior (what we solve for) |
Notice how the two likelihoods both condition on a hypothesis (defect or no defect) and describe the same evidence (being flagged). The prior stands alone as the overall defect rate. The posterior is the question mark we are asked to fill in.
Watch Out for Misleading Order
Word problems do not always present information in the tidy order of prior → likelihood → posterior. A scenario might open with the test's accuracy, bury the base rate in the last sentence, and phrase the question somewhere in the middle. The order of the sentences does not determine the roles.
Instead, anchor on meaning rather than position by asking these three guiding questions:
- Prior: "What is the baseline rate of the hypothesis, with no evidence considered?" Look for words like prevalence, overall, in general, or historically.
- Likelihood: "What is the probability of the evidence assuming the hypothesis is true (or false)?" Look for words like sensitivity, detection rate, false-alarm rate, or phrases structured as "among those who have…".
- Posterior: "What probability is the problem asking me to calculate?" Look for the question sentence itself.
By focusing on what each number means rather than where it appears, you can untangle even the trickiest wording.
Conclusion and Next Steps
In this lesson we learned to read a Bayesian scenario and sort its numbers into three distinct roles. The prior captures our starting belief before any evidence arrives. The likelihood tells us how expected the evidence is under each version of the hypothesis. The posterior is the updated belief we are asked to compute.
Up next, you will put this skill to the test with hands-on exercises that ask you to identify priors, likelihoods, and posteriors across a variety of scenarios — including some that are deliberately worded to mislead. Let's see how sharp your Bayesian eye has become!
