Probability Spaces
Probability and Distributions
A probability space is a mathematical stage for reasoning about uncertainty. It consists of three ingredients: a sample space Omega (the set of all possible outcomes), a collection mathcal{F} of events (subsets of Omega we want to assign probabilities to), and a probability measure P that assigns a
A probability space is : outcomes, events, and a measure satisfying Kolmogorov's axioms.
Without a probability space, generative ML is hand-waving. Probability is the formal language for 'how likely is this output?'
A probability space is a mathematical stage for reasoning about uncertainty. It consists of three ingredients: a sample space (the set of all possible outcomes), a collection of events (subsets of we want to assign probabilities to), and a probability measure that assigns a number in to each event. Together, axiomatize the notion of chance.
The probability measure satisfies three Kolmogorov axioms: (1) for every event , (2) — something must happen, and (3) countable additivity: for disjoint events , . From these three, you can derive everything: complements (), unions (inclusion–exclusion), and monotonicity.
From the three axioms to inclusion–exclusion
Watch a familiar formula fall out of the three axioms. Every step is justified by a single axiom or a set identity — nothing more.
- 1Set identity: any union splits into three pairwise disjoint pieces.
- 2Apply K3 (countable additivity) to the disjoint pieces.
- 3itself splits as and — disjoint, so K3 again.
- 4Rearrange. The same trick gives .
- 5Substitute and simplify — inclusion-exclusion drops out.
A random variable is a function that assigns a number to each outcome. It lets us translate messy sample spaces into real numbers we can compute with. Crucially, we usually don't care about itself — we care about the distribution of , for sets . The distribution is the practical object.
Independence of events is defined by — the joint probability factorizes. Conceptually, knowing tells us nothing about . Random variables are independent if their joint distribution factors as the product of marginals: . Independence is a very strong assumption that many ML models rely on (naive Bayes is the extreme example) — and whose violation has real consequences.
In ML, probability spaces formalize the data-generating process. We imagine each training example as drawn independently from some underlying joint distribution . Our goal is to estimate conditional probabilities from a finite sample. Every learning algorithm — from linear regression to GPT — is implicitly or explicitly estimating some probability-space object.
Exercises
Put your understanding to the test. Score + streak + speed all count.
Confirm you've got it
3 quick questions. Get 2 right to mark this lesson complete.