Bayes' Theorem & Screening Lab
Understand why highly accurate predictive models and fraud detectors generate mostly false alarms when the underlying business event is rare.
OVERVIEW & WHAT THIS TOOL SOLVES
When a churn-prediction model or fraud detector boasts 90% sensitivity and 90% specificity, intuition tells managers that a flagged account has a 90% chance of churning. Yet if only 2% of accounts actually churn, over 84% of the model's alerts will be false alarms! The Bayes' Theorem & Screening Lab exposes the Base-Rate Fallacy using natural frequencies (1,000 accounts) and exact posterior updates so you can evaluate real-world precision before launching expensive retention interventions.
🎯 Questions It Answers
- Given a flag from our model, what is the true posterior probability (Positive Predictive Value) that the account is actually a positive case?
- Why do false positives outnumber true positives when the underlying population base rate is low?
- How do natural frequency trees (out of 1,000 accounts) map 1-to-1 onto Bayes' conditional probability formula?
📂 What Data You Need
- Population Base Rate (Prior): True underlying prevalence of the event (e.g., 2% monthly churn or 0.5% payment fraud)
- Sensitivity (True Positive Rate): Probability that a true positive account triggers a model flag
- Specificity (True Negative Rate): Probability that a healthy non-event account is correctly left unflagged
💡 What You'll Discover
- Natural Frequency Flow Tree: Step-by-step split of 1,000 accounts into True Positives, False Negatives, False Positives, and True Negatives
- 1,000-Account Dot Grid & Confusion Matrix: Visual proof of how false alarms crowd the flagged pool
- Posterior Precision vs. Base Rate: Live calculation of Positive Predictive Value (PPV) and False Alarm Rate
🔍 Key Nuances & Common Traps to Watch For
- Don't Confuse Sensitivity with Precision (PPV): Sensitivity asks "of all actual churners, what share get flagged?" whereas Precision (the Bayesian posterior) asks "of all flagged accounts, what share are actual churners?"
- Why Specificity Matters More Than Sensitivity for Rare Events: When 980 out of 1,000 accounts are healthy, a 10% false-positive rate (90% specificity) generates 98 false alarms—swamping the 18 true positives caught from the 20 actual churners.
- Sequential Screening Multiplies Precision: Using a first-stage model flag to narrow the pool raises the effective prior for a second verification check.
📐 Under the Hood: Model Equations & Variable Definitions
1. Bayes' Theorem for Positive Predictive Value (Posterior Probability)
💬 Read it in plain English: The probability that a flagged account is truly positive equals True Positives divided by All Flagged Accounts (True Positives + False Positives).
⚡ Real-World Business Presets
Model & Population Inputs
Adjust these levers to see how Bayes' Rule behaves in real timeReality: The true natural prevalence of the event across all 1,000 accounts (e.g. churners, fraud, rare flaws).
The Detector: True Positive Rate — the probability that an account genuinely about to churn triggers an alert.
The Non-Events: True Negative Rate — the probability that a loyal account is correctly left undisturbed.
🌳 Follow the Numbers: How 1,000 Accounts Flow Through Bayes' Theorem
Natural Frequency DecompositionInstead of getting tangled in conditional probability algebra, watch how 1,000 accounts split step-by-step. Bayes' Theorem is simply counting: (Genuine Alarms) ÷ (All Alarms That Rang).
3️⃣ Stage 3: The Alarm Rings! (The Manager's Reality)
We gather every account that triggered a positive alert: True Positives (18) + False Alarms (98).
Posterior Probability / Precision (PPV)
💡 The Two Questions That Confuse Everyone
Confronting the Inverse Fallacy"If someone is actually churning, will our model catch them?"
This is Sensitivity (Recall). It only inspects the 20 genuine churners. Because 18 were detected, the data scientist reports a stellar 90% catch rate!
"When the alarm sounds, is this customer actually churning?"
This is Precision (PPV). The manager acts on alerts. When 116 alerts ring, 98 are false alarms handed $20 credits or false declines.
Natural Frequency Grid (Out of 1,000 Accounts / Events)
🌉 The Mathematical Bridge: Abstract Formula vs. Integer Dot Counting
Students often fear Bayes' algebraic formula. Look at how each symbol maps directly to counting the dots:
Contingency Matrix (Confusion Table)
Rows are what really happened; columns are what the model flagged| Actual Outcome ↓ · Model Decision → | Flagged Positive (\(B\)) | Flagged Negative (\(\neg B\)) | Marginal Total |
|---|---|---|---|
| Actual Event Present (\(A\)) |
True Positive (TP)
18
|
False Negative (FN)
2
|
20 |
| Actual Non-Event (\(\neg A\)) |
False Positive (FP)
98
|
True Negative (TN)
882
|
980 |
| Marginal Total | 116 | 884 | 1,000 |