2.7.9 · D1Statistics & Probability — Intermediate

Foundations — Bayes' theorem — derivation and applications

1,707 words8 min readBack to topic

Before you can read a single line of the parent note, you must be fluent in the symbols it throws at you. This page builds each one from nothing, in the order they depend on each other. Never do we use a symbol we have not first drawn.


0. The sample space — the whole picture

Picture: a rectangle. Every dot inside it is one thing that could happen (one patient, one bulb, one coin toss). Nothing exists outside the rectangle.

Why the topic needs it: Bayes' theorem is about probabilities, and a probability is always "what fraction of the whole?". Without a fixed whole, "fraction" has no meaning.

Figure — Bayes' theorem — derivation and applications

1. An event — a slice of the whole

Picture: a coloured blob inside the rectangle. "The patient is sick" () is one blob; "the test reads positive" () is another.

Why the topic needs it: the whole point of Bayes is to relate one event (a cause, like disease) to another event (the evidence, like a positive test). Events are the nouns of the whole theory.


2. Probability — how big is the slice?

Picture: if the blob covers a quarter of the paper, . If it covers everything, . If it covers nothing, .

Why the topic needs it: priors, likelihoods and posteriors are all probabilities — all "areas of blobs". This single reading powers the whole page.


3. The complement — everything that is NOT

Picture: shade the rectangle outside the blob. Together, and tile the whole sheet with no gaps and no overlap.

Why the topic needs it: in the medical example, a positive test comes either from a sick person () or a healthy one (). The parent note uses constantly — that "" is this idea.


4. Intersection — the overlap

Picture: two overlapping blobs; the lens-shaped middle is .

Figure — Bayes' theorem — derivation and applications

Why the topic needs it: the entire derivation of Bayes hinges on the fact that is one single number that can be reached two different ways. That shared overlap is the pivot of Step 1 in the parent note.


5. Conditional probability — zoom into a slice

This is the star of the show. The vertical bar is read "given".

WHAT this formula does: the numerator is the overlap; the denominator is the new whole (the blob becomes your entire universe).

WHY divide by : because you've zoomed in. is now the total area, so to keep probabilities summing to inside this new world, you must re-scale by dividing by 's area.

WHAT IT LOOKS LIKE: shrink the rectangle down to just the blob . The overlap was a small lens; now measured against the smaller blob it becomes a bigger fraction. That re-scaling is the division.

Figure — Bayes' theorem — derivation and applications

Why the topic needs it: Bayes' theorem is made of conditional probabilities — the likelihood and the posterior are both of this form. Everything else on the parent page is bookkeeping around this one definition.


6. The partition — cutting the whole into causes

Picture: slice the rectangle into coloured stripes with no gaps and no overlaps — like a chocolate bar. is the simplest partition (two pieces).

Why the topic needs it: the denominator of full Bayes, , only works if the causes tile the world completely. This is the Law of Total Probability, and it needs a partition to stand on.


7. The summation sign — "add up over all pieces"

Picture: a hand pointing at each stripe of the chocolate bar in turn, dropping each one's value into a running total.

Why the topic needs it: with more than two causes, writing is exhausting. compresses it. The parent's full-Bayes denominator is just this sign at work.


8. Building — the Law of Total Probability

Now watch the pieces click together. Evidence (a blob) is chopped by the partition into pieces, one per cause:

WHY: since the tile the whole sheet with no overlap, the blob is diced into non-overlapping slivers — add the slivers to recover all of .

Then rewrite each joint using Step 5's formula ():

This is the denominator the parent note "expands". You now understand every symbol in it.


9. Prior, likelihood, posterior — three jobs, one bar

The parent gives these names. Now that you have and , they are just three readings of the same bar:

Picture: prior looks at the whole sheet; likelihood zooms into the cause blob; posterior zooms into the evidence blob. Bayes' theorem is the rule that swaps which blob you zoom into. Compare Prior and Posterior Distributions for how this idea generalises.


Prerequisite map

Sample space S the whole

Event a slice

Probability P area of a slice

Complement not A

Intersection overlap of two slices

Conditional probability zoom into a slice

Partition tile the whole into causes

Summation add over all pieces

Law of Total Probability builds P B

Bayes theorem flips the given


Equipment checklist

Test yourself. Cover the right side; you are ready for the parent note only if every reveal matches your own words.

What does mean as a picture?
The area of blob inside a rectangle whose total area is .
What is , and what is ?
"Not " — everything outside blob ; the two areas sum to .
What region is ?
The overlap where blobs and meet — outcomes in both at once.
Write the definition of and say why you divide by .
; you divide because becomes the new whole after zooming in.
Why is generally not equal to ?
Same overlap on top, but different denominators ( vs ).
What two properties make events a partition?
Mutually exclusive (no overlap) and exhaustive (cover the whole ).
What does stand for?
The sum .
Expand for a partition .
.
Which of prior / likelihood / posterior zooms into the evidence blob?
The posterior .