1.3.3 · D1Probability & Statistics

Foundations — Bayes' theorem and applications

1,771 words8 min readBack to topic

Before you touch the parent note, you must be fluent in the symbols it throws at you without warning. This page builds each one from nothing, in the order they depend on each other, and pins every one to a picture.


0. The picture everything lives in

Every probability statement in this whole chapter is a statement about one rectangle. The rectangle is the set of everything that could possibly happen — one roll of the dice, one random person, one email. We call this rectangle the sample space.

Why we need it: every number in Bayes is a fraction of this rectangle. Probability = area. Once you believe "probability is just how much of the rectangle a shape covers", the rest is geometry.


1. Event — the symbol , , , , ,

The parent note writes letters like , , (disease), (test positive) and never says what kind of thing a letter is. Here it is:

  • is a blob. is the area of that blob.
  • If the whole rectangle has area , and blob covers a quarter of it, then .

2. — the "measure the area" symbol

Why the topic needs it: priors like and posteriors like are all just areas. "The disease is rare" literally means "the disease blob is a thin sliver."


3. — "not ", the complement

The parent uses and constantly (in the denominator especially) but never draws it.

Because the whole rectangle has area and plus its outside fill it completely:

Why the topic needs it: in the medical example , so . That huge healthy region is why false positives swamp true positives — you cannot see that without drawing .


4. — the overlap (" and ")

Two blobs can overlap. The parent's derivation lives entirely in that overlap.

Why the topic needs it: the derivation of Bayes starts from and computes it two different ways. That double-counting of the overlap is the whole trick.


5. — conditional probability, the star of the show

This is the single most important — and most misread — symbol on the parent page.

What the picture does: conditioning on means throwing away the rest of the rectangle and treating blob as your new rectangle. Then is just: how much of this new rectangle is the overlap? That is why we divide by — we are re-measuring areas as fractions of instead of fractions of the original whole.

Why this tool and not plain ? Because the question changes. "How likely are disease AND positive test together?" (a question) is different from "given a positive test, how likely is disease?" (a question). Conditioning is the tool that answers the second, which is the one a doctor actually cares about.


6. Multiplication into the joint — why

Take the conditional definition and multiply both sides by the denominator: and symmetrically

What we just did: we found two recipes for the exact same lens. Why: setting the two recipes equal is literally Bayes' theorem — the parent's whole derivation is "compute the overlap two ways, then solve."


7. Mutually exclusive & exhaustive — why the denominator splits in two

The parent's most-used form expands into two pieces. That expansion needs two words.

When events are both, blob gets split cleanly into "the part of inside " plus "the part of inside ", with nothing double-counted and nothing missing:

This is the law of total probability, and it is exactly why the parent can compute (the evidence) even when it is never handed to you directly.


8. , , subscripts , and the vector

The extended Bayes formula and the Naive Bayes example use compact notation the parent never unpacks.

Why the topic needs them: with two hypotheses you write the sum by hand ( and ). With hypotheses or features you would run out of ink — and are just "keep going" instructions.


The prerequisite map

Sample space = the rectangle

Event A = a blob, P is its area

Complement not-A fills the rest

Intersection A and B = the overlap

Conditional P of A given B

Mutually exclusive and exhaustive split

Joint = likelihood times prior

Bayes theorem: flip the conditional

Sum and product notation


Equipment checklist

Cover the right side and test yourself. If any line surprises you, re-read its section above before opening the parent note.

What shape does the letter stand for in ?
A blob (region of outcomes) inside the rectangle; is that blob's area.
What is the total area of the whole sample space?
Exactly (it contains everything that can happen).
Write in terms of .
.
What does look like?
The overlap (lens) where blobs and both cover the same outcomes.
State the definition of as a fraction.
.
Why do we divide by when conditioning?
Because becomes the new rectangle, so we re-measure the overlap as a fraction of .
Are and the same?
No — same numerator , different denominators, so generally different values.
Give the two recipes for .
and .
What do "mutually exclusive" and "exhaustive" mean?
No overlap between blobs, and together they fill the whole rectangle.
What does tell you to do?
Add the listed terms .
What does tell you to do?
Multiply the listed terms .