1.3.3 · D3Probability & Statistics

Worked examples — Bayes' theorem and applications

2,100 words10 min readBack to topic

This page is a case zoo. The parent note gave you the formula and three examples. Here we deliberately hunt down every kind of Bayes problem you can meet — including the weird degenerate ones — and work each to the end.

Before symbols fly, one reminder of what each letter means, so you never have to scroll back:

Everything here rests on 1.3.01-Conditional-probability-and-independence and 1.3.02-Law-of-total-probability.


The scenario matrix

Every Bayes problem lands in one of these cells. The examples that follow are labelled by cell, and together they touch all of them.

Cell What makes it distinct Covered by
A. Rare-cause / low prior prior tiny, test good → posterior still low Ex 1
B. Balanced prior prior near , evidence does the work Ex 2
C. Sequential update apply Bayes twice, posterior becomes new prior Ex 3
D. Degenerate: perfect evidence → posterior locks to Ex 4
E. Degenerate: useless evidence → belief unchanged Ex 4
F. Boundary priors or → belief frozen Ex 5
G. Multiple hypotheses () normalize over a whole list Ex 6
H. Naive-Bayes / product of features many pieces of evidence multiply Ex 7
I. Real-world word twist you must extract the numbers first Ex 8
J. Exam twist: reverse a false positive given the posterior, solve for a hidden rate Ex 9

The three curves you should keep in your head — how the posterior grows as evidence accumulates for different priors — are drawn here:

Figure — Bayes' theorem and applications

Notice the red curve (rare cause): even after strong evidence it climbs slowly. That is Cell A in one picture.


Worked examples

Cell A — Rare cause, good test


Cell B — Balanced prior, evidence decides


Cell C — Sequential updating


Cells D & E — Degenerate evidence

The way the likelihood ratio stretches the prior is drawn here:

Figure — Bayes' theorem and applications

Watch: ratio (mint dot) sits on the diagonal — no change. Large ratios bend the curve up; ratios below bend it down.


Cell F — Boundary priors freeze belief


Cell G — Many hypotheses


Cell H — Naive Bayes product


Cell I — Real-world word twist


Cell J — Exam twist: solve for a hidden rate


Quick self-test

Recall Which cell? (reveal to check)

A test never fires on healthy people — what is your posterior after a positive? ::: (Cell D, perfect discriminator). Prior is and likelihood ratio is — new belief? ::: Still (Cell E, useless evidence). You start certain, — can evidence move you? ::: No, belief is frozen (Cell F). Two independent positives on a rare disease pushed ? ::: (Cell C).


Connections