Accumulating Spam Evidence
Introduction
Welcome to Bayesian Reasoning in the Real World, the final course in your Bayesian reasoning learning path! Over the previous courses, you built a solid foundation: treating probability as a degree of belief, applying Bayes' theorem, understanding how priors shape posteriors, and updating beliefs step by step with new evidence. Now it is time to put all of that machinery to work in settings you encounter every day.
In this first lesson, we explore how spam filters use Bayesian updating to decide whether an incoming message is junk. The central idea is both simple and powerful: even when no single clue is very convincing on its own, combining several weak clues can produce a confident verdict. Let's see exactly how that works.
From Single Clues to Combined Evidence
Think about the word "free" appearing in an email. Plenty of legitimate messages use that word, so spotting it alone should not make us certain the message is spam. But what if the same message also contains "winner" and "click"? Each word by itself is only mildly suspicious, yet together they start to paint a much clearer picture.
This is the principle behind a Naive Bayes spam filter. It treats each flagged word as an independent piece of evidence and updates its belief about whether a message is spam one word at a time. As you learned in earlier courses, sequential updating means feeding each posterior back in as the next prior. In this lesson, we will walk through that process with concrete numbers so you can see the evidence pile up.
Setting Up the Spam Filter
Before we start updating, we need two ingredients: a prior and the likelihoods for each cue.
Suppose that 10% of all incoming messages are spam. This gives us our starting belief:
Our filter has also learned how often certain words appear in spam versus legitimate messages. Here are the probabilities for three flagged words:
| Word | Likelihood Ratio | ||
|---|---|---|---|
| "free" | 0.30 | 0.10 | 3 |
| "winner" | 0.15 | 0.05 | 3 |
| "click" | 0.30 | 0.10 | 3 |
The likelihood ratio for each word is . A ratio of 3 means the word is three times more likely to show up in spam than in a legitimate message. That is somewhat suspicious, but far from conclusive on its own.

