Skip to main content
Albero Academy

Probability Rules & Bayes' Theorem

Reason about uncertainty — the addition and multiplication rules, independence, conditional probability, and Bayes' theorem.

Chapter 9Statistics15 min readBeginner friendly
  • #Statistics
  • #Probability
  • #Bayes

Probability is the mathematics of uncertainty and the engine under every statistical test. This chapter builds from the basic rules to Bayes' theorem — the tool for updating beliefs with evidence, and the source of one of the most counter-intuitive results in all of statistics.

Probability basics

A probability is a number from 0 (impossible) to 1 (certain). For equally-likely outcomes, it's favourable ÷ total. The probabilities of all possible outcomes sum to 1, so P(not A) = 1 − P(A).

Addition & multiplication rules

combining probabilities
# OR (addition) — P(A or B)
P(A or B) = P(A) + P(B) - P(A and B) # subtract the overlap
# AND (multiplication) — for INDEPENDENT events
P(A and B) = P(A) * P(B)
# Independent = one doesn't affect the other (two coin flips).

Conditional probability

P(A | B) — "the probability of A given that B happened" — is how probability updates with information:

conditional
P(A | B) = P(A and B) / P(B)
# If A and B are independent, P(A | B) = P(A) — B tells you nothing about A.

Bayes' theorem

Bayes' theorem flips a conditional probability around — turning "P(test positive given sick)" into "P(sick given test positive)". It's the basis of spam filters, medical diagnosis and modern AI:

Bayes' theorem
P(A | B) = P(B | A) * P(A) / P(B)
# The famous result: a 99%-accurate test for a rare disease (1 in 1000)
# still gives mostly FALSE positives, because the disease is so rare.
# P(sick | positive) ≈ 9%, not 99% — the base rate dominates.

Practice

Compute the probability of at least one head in three coin flips (via the complement). Work the classic disease example: a 99%-accurate test, a 0.1% prevalence — what's the probability someone who tests positive is actually sick? Be surprised.

Key takeaways

  1. 01A probability is 0–1; P(not A) = 1 − P(A).
  2. 02Addition: P(A or B) = P(A) + P(B) − P(A and B). Multiplication (independent): P(A and B) = P(A)·P(B).
  3. 03Conditional probability P(A|B) = P(A and B)/P(B) — how probability updates with information.
  4. 04Bayes' theorem flips a conditional: P(A|B) = P(B|A)·P(A)/P(B).
  5. 05Base rates dominate: an accurate test for a rare event still yields mostly false positives.