Advanced Probability
Finite counting rules break on infinite data and exact measurements. Advanced probability rebuilds them on sets and limits so learning theory stays legal.
Why Does This Exist?
Three coin flips are easy: 8 outcomes, count the good ones, divide. Nothing in that recipe survives contact with real ML. A training stream never ends, a sensor reports an exact value like 0.37 with probability zero under any continuous model, and every generalization claim is a limit as sample size grows.
The naive fix is to wave your hands. That fails the moment you condition on a zero-probability event or swap a limit with an expectation. Advanced probability is the rebuild: outcomes live in a set , allowed questions live in a -algebra , and probability is a set-size function with three axioms. Random variables become functions , and convergence gets four precise meanings instead of one vague one.
This page maps the territory. The machinery itself lives in probability foundations, probability distributions, and expectation, variance and covariance. Here you learn which tool answers which question.
The one idea you need first
A probability is a number between 0 and 1 attached to an event, a set of outcomes. For three fair flips, because 7 of 8 outcomes qualify. Everything advanced keeps that meaning and extends it to infinite outcome sets where counting breaks.
Think of It Like This
Surveying land instead of counting bricks
Counting bricks works for a small wall: count them, divide good by total. Try that on a landscape and you fail, because there are no bricks. A surveyor instead draws legal plot boundaries, then measures areas.
is the landscape. The -algebra is the registry of legal plots: closed under complements and unions, so any sensible combination of plots is also a plot. is the area survey. A random variable is a function painted over the land, like elevation. Convergence modes are four different promises about what happens as you survey further out.
The analogy stops where all good ones do: land area is finite and visible, while probability mass can concentrate on points, curves, or dust-like sets that no surveyor would recognize.
How It Actually Works
The triple carries three axioms: , , and countable additivity, meaning the probability of disjoint pieces adds up even for infinitely many of them. Additivity for infinitely many pieces is the whole game; without it, limits escape the theory.
The four convergences
For a sequence approaching :
- Almost sure: paths converge with probability 1. Strongest path claim.
- In : . Moments converge.
- In probability: for every . Outliers allowed if rare.
- In distribution: CDFs meet at continuity points. Only laws converge, used by the central limit theorem.
Almost sure and each imply convergence in probability, which implies convergence in distribution. No other arrow holds in general.
Worked example
Flip a fair coin 3 times. has outcomes. The event holds 7 of them, so . Now extend to an infinite stream and ask for . Counting cannot touch , but the triple assigns by symmetry and countable additivity. That is the upgrade: same meaning of probability, now defined on events counting could never list.
Code
import numpy as np
rng = np.random.default_rng(0)flips = rng.integers(0, 2, size=(20000, 3)) # 1 = headprob = (flips.sum(axis=1) >= 1).mean() # fraction with at least one headprint(round(float(prob), 3)) # -> 0.874Twenty thousand trials land at 0.874 against the exact 0.875. The gap is Monte Carlo noise with standard error about 0.002, not a theory problem.
Watch Out For
Conditioning on an exact continuous value
Asking for with continuous conditions on a probability-zero event, and elementary divides by zero. Practitioners hit this when they filter a dataframe to an exact float and wonder why the conditional looks like noise.
Use densities or a limiting interval: . If you need the exact point, you need conditional expectation given a -algebra, not the elementary formula.
Reading convergence in distribution as path convergence
The central limit theorem says standardized means converge in distribution to a normal. It does not say any single training run looks normal, or that moments converge. A sequence can converge in distribution while every path oscillates forever.
If your argument needs , you need uniform integrability or convergence, not the CLT. Check which arrow your proof actually uses.
The Quick Version
- Advanced probability keeps the meaning of probability and extends it to infinite outcomes via the triple .
- The -algebra lists which questions are legal; closure under complements and countable unions keeps limits inside the theory.
- Random variables are functions on , so expectation is an integral, not a weighted list.
- Four convergence modes answer four questions: paths, moments, rare deviations, or laws.
- Almost sure and imply convergence in probability, which implies convergence in distribution.
- Zero-probability conditioning needs densities or conditional expectation, never naive division.