SStatistics, Built

Stage IV · PhD Core

Part 43 of 65

Measure-Theoretic Probability

PhDstarts at this level64 min of film15 chaptersprerequisites: Part 2, Part 3, Part 6

What exactly is a random variable, and what do the limit theorems really say?

In Paris in 1900 Hilbert's sixth problem asks for axioms of probability; in 1933 Kolmogorov's Grundbegriffe supplies them on top of Lebesgue's measure. The part builds the axioms in order: Vitali's set shows why not every subset can have a length, a random variable becomes a measurable map and its law a push-forward, and the integral arrives with its convergence theorems and the counterexamples that mark their edges. Borel-Cantelli, the 0-1 laws and Etemadi's proof give the strong law. The part then turns from almost-sure limits to laws: the portmanteau theorem, characteristic functions and Levy's continuity theorem, Lindeberg's condition with Feller's converse, and Stein's method, which says how fast. The weak-convergence lab measures the rate exactly: every Kolmogorov distance falls like one over root n, and a fair coin uses 84% of the Berry-Esseen bound. It ends beyond the normal law, with stable limits and the DAX, Cramer's rate and Bernoulli's urn, and the extreme-value theorem fitted to Port Pirie's sea levels.

What you need. Real analysis to the level of Analysis, Built Parts 1-5 (limits, the Lebesgue measure and Caratheodory's extension), and Stage I's probability (Parts 2, 3 and 6).

Hook
Hilbert's sixth problem, 1900
Mathematics
π–λ and extension, integration theorems, independence and 0–1 laws, Kolmogorov's SLLN, weak convergence, characteristic functions, Lindeberg–Feller, Stein's method, infinitely divisible laws, large deviations
Built
a weak-convergence lab

What you will be able to do

Bachelor's

  • Explain what Hilbert asked for and what Kolmogorov's three objects (outcomes, events, a measure of mass one) are.
  • Say in words what the Kolmogorov distance between a sum's law and the normal law measures, and how it shrinks with n.

Master's

  • Compute Cramer's rate function as a Legendre transform for the normal, Poisson and Bernoulli laws.
  • Check Lindeberg's condition for an i.i.d. sum and for an array in which one summand dominates.

PhD

  • Prove that a CDF determines its law by the pi-lambda theorem, and the strong law by Etemadi's truncation argument.
  • Prove Levy's continuity theorem from the tail bound, and the Lindeberg-Feller theorem by replacement.
  • Derive the Wasserstein bound rho / sqrt(n) from Stein's equation, and state what the Berry-Esseen constant 0.4748 does and does not claim.

Practice

  • Judge whether a normal approximation is safe at a given n from the summand's skewness, and say why a t interval for exponential data still undercovers at n = 30.
  • Fit a GEV law to annual maxima and report a return level with the assumptions it rests on.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Bachelor's 6 min · Master's 15 min · PhD 64 min · Practice 15 min.

  1. 0Hilbert's sixth problemBachelor's3 min
  2. 1Sigma-algebras and measuresPhD5 min
  3. 2Random variables as measurable mapsPhD4 min
  4. 3IntegrationPhD5 min
  5. 4Independence and productsPhD3 min
  6. 5Borel-Cantelli and the 0-1 lawsPhD4 min
  7. 6The strong lawPhD4 min
  8. 7Weak convergencePhD6 min
  9. 8Characteristic functionsPhD5 min
  10. 9Lindeberg-FellerPhD4 min
  11. 10Stein's method and the ratesPhD4 min
  12. 11Infinitely divisible and stable lawsPractice5 min
  13. 12Large deviationsPhD4 min
  14. 13ExtremesPractice4 min
  15. Recap, problems, and the road aheadAll tracks3 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

Hilbert's sixth problemBachelor's3 min

In August 1900, in Paris, David Hilbert set the International Congress of Mathematicians twenty-three problems, the ones he thought the new century should solve; there was time to read ten of them aloud. The sixth asked for axioms for physics: to treat in the same manner, by means of axioms, those physical sciences in which already today mathematics plays an important part. And it named the first two: the theory of probabilities, and mechanics. Probability, in 1900, had results, from Bernoulli's law to Laplace's central limit theorem, but no agreed definition of what a probability is, or of what a random variable is.

The answer came in 1933, in sixty-two pages by Andrey Kolmogorov, the Grundbegriffe, the foundations of the theory of probability. Its move was to make probability a branch of measure theory, the theory of length, area and volume that Henri Lebesgue had built thirty years earlier. A probability space is a set of outcomes, a collection of events, and a measure of total mass one. An event is a set in that collection. A random variable is a measurable function on the outcomes. An expectation is a Lebesgue integral. And a conditional expectation, the hardest idea of the old theory, became a Radon–Nikodym derivative. Every limit theorem in this course rests on these definitions.

Three promises from the first stage are now due. Part two defined probability as an additive function on events, and quietly assumed that every set of outcomes is an event. Chapter one shows why that is impossible for rotation-invariant length on every subset of the interval, assuming the axiom of choice. An atomic probability such as a point mass can be defined on all subsets. Part three said the moment generating function determines a law, and asked you to trust it. Chapter eight proves it, with characteristic functions. And Part six stated the strong law, proved the central limit theorem only for laws with a moment generating function, and quoted Berry and Esseen's rate. Chapters six and nine explain the strong law and central limit theorem proofs. Chapter ten develops Stein's method and states a published Berry–Esseen constant; it does not derive that sharp constant.

Numbers: 1900; the Grundbegriffe, 1933

1Sigma-algebras and measuresPhD5 min

Can every set of outcomes be given a probability? Part two quietly assumed that every set of outcomes has a probability. Try it for the simplest case: a length on every subset of the unit interval, unchanged by shifting a set around the interval, countably additive, and giving the whole interval length one. In 1905 Giuseppe Vitali showed there is no such thing. Call two points equivalent if they differ by a rational number, and, using the axiom of choice, pick one point from every equivalence class. Call that set V. Shifting V by each rational in the interval, wrapping around at one, gives countably many disjoint copies that together cover the interval exactly. So one would equal a countable sum of equal lengths: zero if V's length is zero, infinity if it is anything else. No rotation-invariant, countably additive extension of length can measure V.

Bend the interval into a circle, so that shifting with wrap-around becomes rotation. The blue points are a finite schematic for representatives; a computer cannot construct a Vitali set. Each colour is V rotated by a different rational; the infinitely many rotations fill the circle without overlapping. A rotation cannot change a length, so all the copies would have the same length, and there are too many of them. The lesson is not that probability is broken, but that it must be more modest. Probabilities are assigned to a collection of sets rich enough for everything we want to ask, and no richer: a sigma-algebra.

A sigma-algebra contains the whole space, the complement of each of its sets, and the union of any countable sequence of its sets, so also countable intersections and limits. A probability measure gives each of its sets a number between zero and one, one to the whole space, and adds over countably many disjoint sets: Part two's third axiom, now on a sigma-algebra. On the real line the standard choice is the Borel sigma-algebra, the smallest one containing the intervals. It contains the standard events on the real line: open and closed sets, countable sets, and the inverse images needed for measurable real-valued observations. Convergence events live in the underlying outcome sigma-algebra; completed measures can also contain non-Borel subsets of null sets. Vitali's set is not Lebesgue measurable.

How do we know that two measures agreeing on intervals agree everywhere? A pi-system is a class closed under finite intersections, like the half-lines from minus infinity to x. The sets on which two probability measures agree always form a lambda-system: it contains the whole space, differences of nested sets, and increasing limits. Dynkin's pi–lambda theorem says that a lambda-system containing a pi-system contains the whole sigma-algebra it generates. So two laws with the same CDF are the same law on every Borel set. This generating-class argument supports many uniqueness results, including laws determined by CDFs and product probability measures.

Existence is Carathéodory's extension theorem, proved in Part five of Analysis, Built. Define the outer measure of any set as the least total length of countably many intervals covering it. Call a set measurable if it splits every other set cleanly, with the outer measures of the two pieces adding up. Constantin Carathéodory showed that the measurable sets form a sigma-algebra containing all the Borel sets, and that the outer measure is countably additive on it. Measure lengths with F of b minus F of a instead, for any non-decreasing right-continuous F rising from zero to one, and the same construction gives a unique law with CDF F. Every distribution we have used exists because of this theorem.

Measure theory also allows laws that elementary probability had no name for. Remove the middle third of the interval, then the middle third of each piece, forever. After k steps the remaining length is two thirds to the k, which tends to zero, so the Cantor set has length zero. Yet it is uncountable: its points are the numbers whose ternary digits are all zeros and twos, which match the binary sequences one for one. Spread one unit of probability evenly over it, and the CDF is Cantor's function, the devil's staircase: continuous, so there are no atoms, and flat everywhere off the Cantor set, so there is no density either. Part two promised the general picture: by Lebesgue's decomposition, every law on the line is a mixture of atoms, a density, and a singular part like this one.

Numbers: Vitali; the Cantor set's length (2/3)^k → 0

2Random variables as measurable mapsPhD4 min

What is a random variable, really? A random variable is neither random nor a variable. It is a function from outcomes to numbers, with one requirement: for every Borel set B, the outcomes it sends into B form an event. That is what measurable means. By the pi–lambda theorem it is enough to check the half-lines. Its law is the measure it pushes forward onto the line: the probability of B is the probability of the outcomes landing in B. And every expectation can be computed either on the outcome space or on the line, against the law. This is why statistics can forget about omega: expectations of measurable functions of X are determined by its law. Dependence between observations requires their joint law, not just their marginal distributions.

Here is the most useful probability space of all: the unit interval with length as probability. Write a point omega in binary. Its first digit is one on the right half, its second on the right half of each half, and so on: each digit is one on exactly half the interval, and the digits are independent, because each pattern of the first k digits picks out an interval of length two to the minus k. Émile Borel noticed in 1909 that the binary digits of a uniform number are independent fair coins. Twenty thousand uniforms bear it out: each digit is one about half the time, neighbouring digits are uncorrelated, and three ones in a row turn up percent of the time, against an eighth.

An ideal real uniform number supplies infinitely many fair binary digits, up to the null set with ambiguous expansions. A finite-precision computer draw has only finitely many random bits. Deal its digits into infinitely many columns, the first digit to column one, the second to column two, the third back to column one, in a diagonal pattern, and each column's digits form a new uniform number, all of them independent. Apply the quantile function F inverse to each, and you have an independent sequence from any law you like. So the strong law, the central limit theorem and everything else in this part are theorems about the unit interval and its length. Infinite sequences of independent variables exist; chapter four gives the general reason.

The last step is the quantile transform. Start with uniform probability on the interval. Push it through F inverse, here minus the log of one minus u, and what arrives is the exponential law. The proof is one line: F inverse of U is at most x exactly when U is at most F of x, which has probability F of x. It is Part seven's inverse-CDF sampler, seen as a push-forward of measure, and chapter seven will use it again to turn convergence of laws into convergence of random variables.

Sigma-algebras also measure information. The sigma-algebra generated by X is the set of events whose occurrence you can decide by looking at X. The Doob–Dynkin lemma makes it exact: a random variable is determined by that information precisely when it is a function of X. Watching a sequence, the information grows: each sigma-algebra contains the last, a filtration, the setting of martingales in Part forty-four. And a statistic is just a measurable function of the data; sufficiency, in Part forty-five, will be the statement that its sigma-algebra keeps everything the data say about the parameter.

Numbers: binary digits: shares 0.496–0.504; three 1s 0.127

3IntegrationPhD5 min

Integration, and when a limit can pass inside an expectation. Riemann integrates by slicing the horizontal axis into strips. Lebesgue slices the values instead: for each height t, measure the set where the function exceeds t, and add up those measures over t. For a non-negative measurable function, this is the layer-cake formula, including infinite integrals. The sets where f exceeds t can be measured, which is exactly what measurability provides. For a non-negative random variable it says the expectation is the integral of the tail probability, the identity behind Part forty's restricted mean survival time.

Three theorems govern limits under the integral. Monotone convergence: if non-negative variables increase to a limit, their expectations increase to its expectation. Fatou's lemma: for non-negative variables, the expectation of the lower limit is at most the lower limit of the expectations. Mass can be lost in the limit, never gained. Dominated convergence: if the variables converge almost surely and are all bounded by one integrable variable, their expectations converge. Each proves the next: monotone convergence from simple functions, Fatou from monotone convergence, and dominated convergence by applying Fatou to Y plus X n and to Y minus X n. These are central tools for justified limit interchanges. Differentiating a likelihood or passing to moments in asymptotics still needs its own regularity conditions.

The conditions matter. On the unit interval, let X n be n on the first n-th of the interval and zero elsewhere: a bump that grows taller and thinner. Its expectation is n times one over n: one, for every n. But at every point except zero, the bump eventually passes by, and X n converges to zero. The limit has expectation zero, the expectations have limit one: the mass escaped to a point. Dominated convergence fails because nothing integrable bounds all the bumps: their supremum behaves like one over omega, whose integral is infinite. Fatou's inequality holds, strictly.

The opposite failure. Let X n be the indicator of an interval that sweeps across the unit interval, first in halves, then quarters, then eighths, like a typewriter carriage. The intervals shrink, so the expectations tend to zero: convergence in mean and in probability. But follow any single point, the gold line: every sweep passes over it once, so X n of omega is one infinitely often and converges for no omega at all. Convergence in probability does not imply almost sure convergence, as Part six warned. What is true, and is the workhorse of many proofs, is that a subsequence converges almost surely: here, the first interval of each sweep.

The exact condition is uniform integrability: the tails beyond K carry a share of the expectation that goes to zero uniformly in n. For a sequence of integrable variables, Vitali's theorem equates convergence in probability plus uniform integrability with L-one convergence to an integrable limit. A handy sufficient condition is a uniformly bounded moment of order a little above one. The bump, written as a random variable that equals n with probability one over n, fails it: beyond any K, its tail carries the whole expectation.

A statistician meets this every day. For a positive Poisson mean, define an extended-valued estimate as one over the sample mean, taking one over zero to be positive infinity. By the strong law the sample mean converges, so the estimate converges to the truth: it is consistent. But there is always a positive chance that every count is zero, and then the estimate is infinite; its expectation is infinite for every sample size, and its expectation and mean squared error are infinite rather than usable finite measures of accuracy. Consistency is a statement about probabilities; to infer convergence of expectations from convergence in probability, uniform integrability is needed for the relevant sequence. For mean squared error it is the squared errors that must be uniformly integrable; which is why careful asymptotics, from Part forty-seven on, speaks of limiting distributions rather than limiting moments.

Numbers: E X_n = 1, lim = 0; 1/X̄ consistent with infinite mean

4Independence and productsPhD3 min

Independence, products, and how infinitely many coins can exist at once. Independence is a property of information. Two sigma-algebras are independent if every event of one is independent of every event of the other. Two random variables are independent if the sigma-algebras they generate are. By pi–lambda again, it is enough that the joint CDF factors into the marginals. Measurable functions of independent variables are then independent, because their information is contained in the originals', and the expectation of a product factors, by the theorem that follows.

For sigma-finite measure spaces, including probability spaces, the product measure gives a rectangle the product of its sides' measures, and Carathéodory's theorem extends that uniquely. Tonelli's theorem: for a non-negative function, the double integral equals either iterated integral, in either order. Fubini's theorem: the same holds for a signed function, provided its absolute value is integrable. Independence says the joint law is the product of the marginals, and Fubini then gives the product rule for expectations. The proviso in Fubini is not a technicality.

Here is why. Counting measure on the integers is a measure too, so double series obey the same rules. Put plus one on the diagonal and minus one just to its right. Every row sums to zero, so summing rows first gives zero. But the first column sums to one and every other column to zero, so summing columns first gives one. The absolute values sum to infinity, and without that proviso the order of integration can change the answer. In probability it appears whenever an expectation of a product of non-integrable variables is computed by conditioning.

For infinitely many variables, Kolmogorov proved the theorem the Grundbegriffe is best remembered for. Suppose we specify a law for every finite collection of the variables, consistently, so that integrating one variable out of a joint law gives the smaller joint law. Then there is exactly one probability measure on the space of all paths with those finite-dimensional laws. That one theorem makes sense of an infinite sequence of coin tosses, of Part seven's Markov chains, of Part seventeen's time series and of Part thirty-nine's Gaussian fields. One warning: it builds measures on the product sigma-algebra, which cannot see properties of uncountably many coordinates at once, such as continuity of a path. Part forty-four's Brownian motion needs one more step.

Statistics lives on these products. A sample of n independent observations has the n-fold product law. Its density, with respect to the product of Lebesgue measures, is the product of the individual densities: the likelihood of Part twenty-two. In general a likelihood is a Radon–Nikodym derivative, the density of the data's law with respect to some fixed measure. That is why one definition covers counts, measurements, censored survival times and mixtures of them: when the whole parameter family admits one fixed, parameter-independent dominating measure. Some statistical families are not dominated in this way.

Numbers: the double series 0 ≠ 1

5Borel-Cantelli and the 0-1 lawsPhD4 min

Borel–Cantelli and the zero–one laws: what happens infinitely often? An event happens infinitely often if, however far out you start, it happens again: the intersection over n of the unions from n on. That event is in the sigma-algebra, so it has a probability. The first Borel–Cantelli lemma: if the probabilities have a finite sum, the event happens only finitely often, almost surely. The proof is one line: the probability of a union from n on is at most the tail of a convergent series. The second lemma is a converse, for independent events: if the probabilities sum to infinity, the event happens infinitely often, almost surely. Its proof: the chance that none happens from n on is a product of one minus each probability, at most e to the minus their sum, which is zero.

Here is the pair at work. Toss a fair coin n times: how long is the longest run of heads? Let A n be the event that a run of length r n starts at toss n; it has probability two to the minus r n. If r n is a little more than log base two of n, the probabilities sum like one over n to the one plus epsilon, which converges, so such runs happen only finitely often. If r n is a little less, the sum diverges, and an argument with independent blocks of tosses shows that such runs keep happening. So the longest run grows like log base two of n, the gold line. Simulated coins agree: about in a million tosses, against twenty for log base two. Paul Erdős and Alfréd Rényi proved it in 1970; a run of seven heads in a hundred tosses need not be surprising under fairness. Its evidential weight depends on the prespecified statistic and the probability model.

Borel's own illustration was a typing monkey. Give it twenty-seven keys and let it type one at random each second, forever. Cut the stream into blocks of nine keys; each block spells the word statistic with probability twenty-seven to the minus nine, about one in eight trillion. The blocks are independent and the probabilities sum to infinity, so by the second lemma the word appears infinitely often, with probability one. The first appearance, block by block, takes on average some two million years. Almost sure is not soon.

The tail sigma-algebra holds the events that no finite number of the variables can affect: what happens from n on, for every n. Kolmogorov's zero–one law: for independent variables, every tail event has probability zero or one. The proof is a gem: a tail event is independent of the first n variables for every n, so, by pi–lambda, of all of them; but it is determined by all of them, so it is independent of itself, and its probability equals its own square. So whether a random series converges, whether running means stay below a level, whether something happens infinitely often: each is either almost certain or almost impossible. The law never says which; the next chapter does.

Edwin Hewitt and Leonard Savage extended the law in 1955: for independent and identically distributed variables, any event unchanged by permuting finitely many of them has probability zero or one. The event that a random walk returns to zero infinitely often is not a tail event, since changing the first step changes every partial sum, but it is symmetric. So the walk returns infinitely often almost surely, or only finitely often almost surely. George Pólya showed in 1921 which: a walk on the line or the plane returns forever; in three dimensions it eventually wanders off. Part forty-four takes walks further.

Numbers: longest run 19.6 in 2^20 tosses

6The strong lawPhD4 min

The theorem: for independent, identically distributed variables with a finite mean, the running average converges to the mean, almost surely. And the condition is exactly right: if the mean of the absolute value is infinite, the running averages are unbounded, almost surely. The converse takes two lines. The layer-cake formula, in integer steps, says the expected absolute value is finite exactly when the probabilities that the absolute value exceeds n have a finite sum. If they don't, for every positive integer M, Borel–Cantelli gives absolute X n exceeding M n infinitely often. Thus limsup of absolute X n over n is infinite. Since X n over n equals the current average minus one minus one over n times the previous average, the averages cannot remain bounded. The Cauchy law is the standard example.

Kolmogorov's route went through series. His maximal inequality is Chebyshev's inequality for a whole path: the chance that the partial sums ever reach lambda, before time n, is at most the final variance over lambda squared. It gives the two-series theorem: centred independent terms whose variances have a finite sum form a series that converges almost surely. The three-series theorem says exactly when an independent series converges: after truncating each term at some level c, the chance of exceeding c, the truncated means and the truncated variances must all have convergent sums. The truncation is the trick: big terms are handled by Borel–Cantelli, small ones by the maximal inequality.

Two random series. On the left, the harmonic series with random signs: plus or minus one, one half, one third, and so on. The variances are one over j squared, with a finite sum, so the series converges almost surely, though the harmonic series itself diverges. Each path settles on its own random limit; between fifty and a hundred thousand terms the paths move by about . On the right, terms of size one over j to the point four: the variances sum to infinity, and the series wanders off. Kolmogorov's zero–one law promised that each series converges almost surely or diverges almost surely; the three series tell us which.

The shortest proof is Nasrollah Etemadi's, from 1981, and it needs only pairwise independence. Split each variable into positive and negative parts, so assume it is non-negative, and truncate the k-th at k. The truncated and original sequences differ only finitely often, by the first Borel–Cantelli lemma, because the chances of a difference sum to at most the mean. Along a geometric subsequence, k n equal to alpha to the n, Chebyshev's inequality and a careful sum show that the deviation probabilities are summable, so Borel–Cantelli again gives convergence along the subsequence. Finally, because the variables are non-negative, the partial sums increase, and every average between two subsequence times is sandwiched between their averages. The lower and upper limits are pinned between mu over alpha and alpha times mu. Here T n is the sum of the truncated variables; its expectation divided by n tends to mu by dominated convergence followed by Cesaro averaging. The variance summability follows by interchanging non-negative sums, bounded by a constant times the finite mean; and alpha can be taken as close to one as we like.

Six paths of running means for exponential draws, on a log scale of n: each one settles on the mean of one, as the strong law says almost every path must. The white dots mark the geometric subsequence on which Etemadi's proof first establishes convergence. And six paths for the Cauchy law, whose mean does not exist. The average of n Cauchy variables is again standard Cauchy, for every n, so the running means keep jumping, as the converse of the strong law guarantees.

Numbers: ±1/j settles (0.0025); ±1/j^0.4 wanders

7Weak convergencePhD6 min

Weak convergence: what it means for laws to converge, and how far apart two laws are.

Part six defined convergence in distribution through CDFs: they converge at every point where the limit is continuous. The exception matters: one over n converges to zero, but its CDF at zero is zero for every n, while the limit's is one. The portmanteau theorem gives equivalent forms. Expectations of every bounded continuous function converge: the definition that works in any metric space. Probabilities of closed sets can only grow in the limit, and probabilities of sets whose boundary carries no limiting mass converge. Each form is the right tool somewhere.

To say how close two laws are, we need distances, and this part's lab uses lattice extrema, analytic normal quantile-cell integrals and numerical bisection, avoiding simulation noise for these binomial comparisons. Here is a standardized binomial with ten trials, as a staircase, against the normal CDF. The Kolmogorov distance is the largest vertical gap between the graphs, , at zero, where the staircase jumps over the curve. Paul Lévy's distance is the side of the largest box that can be slid between the two graphs, allowing a little horizontal slack as well as vertical: . Unlike Kolmogorov's, it metrizes weak convergence, so it is not fooled by one over n. The Wasserstein distance is the area between the graphs, : the least average distance mass must move to turn one law into the other. And the Lévy–Prokhorov distance, on Polish metric spaces, is pinned between Lévy's below and the Ky Fan distance of the quantile coupling above.

The same distances for four, ten, forty and a hundred and sixty trials. The displayed distances shrink as the number of trials grows; several roughly halve when the number of trials quadruples, but the quantile-coupling upper bound is not an exact one-over-root-n law: these are deterministic calculations with numerical tolerances, rather than Monte Carlo estimates. From four trials to a hundred and sixty, the Kolmogorov distance falls -fold, close to the square root of forty. The inequalities between them hold at every n, as they must.

Weak convergence is about laws, not random variables, yet it can always be represented by variables on a new common space that converge almost surely, without asserting the original variables do so. Take a single uniform U. For each n, put Y n equal to F n inverse of U: by chapter two it has law F n. Here are the quantile functions of standardized binomials with four, sixteen and sixty-four trials. When the laws converge weakly, the quantile functions converge at almost every u, here to the normal quantile function in gold, so the Y n converge almost surely. This is Anatoliy Skorokhod's representation theorem. It turns proofs about laws into proofs about variables: the continuous mapping theorem of Part six, for instance, becomes a one-line consequence of continuity.

Laws can also fail to converge by losing mass. Normal laws with standard deviation n spread out ever more thinly, and their CDFs converge to one half at every point. One half is not a CDF: the mass has escaped to plus and minus infinity. The cure is tightness: for every epsilon, one interval holds all but epsilon of every law in the sequence. Yuri Prokhorov's theorem: a family of laws is tight exactly when every sequence from it has a weakly convergent subsequence, a compactness theorem for probability measures. On the line it rests on Helly's selection theorem: any sequence of CDFs has a subsequence converging at continuity points, though perhaps to a limit of mass less than one. Tightness is what keeps the mass.

A real limit theorem at work. In 1898 Ladislaus Bortkiewicz counted the soldiers of the Prussian cavalry killed by horse kicks: deaths over corps-years, a mean of . The counts, in blue, are compared with a fitted Poisson law, in gold. For an approximate goodness-of-fit reference, pool the rare counts into two or more deaths; the resulting statistic is . Why Poisson? A rare-event model with independent, small event probabilities motivates a Poisson approximation. Agreement of this historical table with a fitted Poisson does not establish that independence or equal risks held. Lucien Le Cam's 1960 inequality says how fast: the total variation distance between a sum of independent Bernoullis and the Poisson with the same mean is at most the sum of the squared chances, here lambda squared over n. The table checks it exactly. Total variation bounds every event's probability at once, a stronger kind of convergence than weak convergence.

Numbers: Bin(10): Kolmogorov 0.123, Lévy 0.088, W 0.159; horse kicks pooled χ²₁ 0.063

8Characteristic functionsPhD5 min

Characteristic functions: a transform that always exists. Part three's moment generating function, the expectation of e to the t X, can be infinite for every nonzero t, as for the Cauchy law. For positive lognormal and Pareto variables it diverges to the right of zero, while remaining finite for nonpositive t. Put an i in the exponent and the problem vanishes. The characteristic function is the expectation of e to the i t X, a cosine and a sine, bounded by one, so it exists for every law and every t. It keeps the MGF's virtues: the characteristic function of a sum of independent variables is the product, and affine maps act simply. The normal's is e to the minus t squared over two; the Cauchy's, e to the minus absolute t, with a corner at zero because it has no mean; a uniform's, sine t over t. When k moments exist, it is k times differentiable, and its derivatives at zero give the moments.

A characteristic function determines its law, and the law can be read back off it. The sum of two uniforms on minus one to one has characteristic function sine t over t, squared: the square, because the variables are independent. In blue, the empirical version from four thousand simulated sums, which converges to it. When the characteristic function is integrable, the inversion formula gives the density directly: one over two pi times the integral of e to the minus i t x times phi. Computed numerically, its maximum error on the displayed grid is about eight ten-thousandths; truncation and quadrature error remain. For any law, a slightly more careful version recovers the probability of every interval whose endpoints carry no atoms, so by pi–lambda, the characteristic function determines the law.

Now Part three's promise. Suppose the moment generating function is finite on an interval around zero. Then the expectation of e to the z X is an analytic function of a complex z on the strip where the real part is within delta of zero, and on the imaginary axis it is the characteristic function. Two such functions that agree on a real interval agree on the whole strip, by the identity theorem of complex analysis, so they agree on the imaginary axis too. Equal characteristic functions mean equal laws. So a moment generating function finite near zero does determine its law. Without that condition, the claim can fail, and so can a stronger-sounding one.

The lognormal has every moment, but no moment generating function to the right of zero. In 1963 Christopher Heyde wiggled its density by one plus a constant times the sine of two pi log x. The result is a different law, with exactly the same moments: the integral of x to the r times the wiggle vanishes for every whole number r, because after substituting the log, the sine integrates to zero against a shifted normal. The table checks the first four numerically. So moments alone need not determine a law. A moment generating function finite near zero is enough, and so is Carleman's condition on the growth of the moments; the lognormal's grow too fast.

Lévy's continuity theorem turns convergence of characteristic functions into weak convergence: if they converge pointwise to a function continuous at zero, the laws converge to the law with that characteristic function. The key is a tail bound: the chance that absolute X exceeds two over u is at most one over u times the integral of one minus the real part of phi from minus u to u. For the Cauchy law with u equal to one, the bound is against a true value of . If the limit is continuous at zero, that integral is small for small u, uniformly in n eventually, so the sequence is tight. Helly's theorem then supplies a convergent subsequence, its limit must have characteristic function phi, and by uniqueness every subsequence has the same limit. The proof uses every tool of the last two chapters.

One more consequence, by Harald Cramér and Herman Wold in 1936: random vectors converge in law exactly when every linear combination of their coordinates does. The proof is a single line: the vector's characteristic function at t is the characteristic function of the projection onto t, evaluated at one. So the multivariate central limit theorem is the univariate one applied in every direction at once. Every asymptotic statement about several parameters in the master's, from Wald tests to the sandwich, rests on it.

Numbers: inversion to 0.0008; Heyde's equal moments

9Lindeberg-FellerPhD4 min

The central limit theorem in its exact form: Lindeberg and Feller. The general setting is a triangular array: for each n, independent centred variables, not necessarily identically distributed, with total variance s n squared. Lindeberg's quantity measures how much of that variance comes from summands larger than epsilon times s n. Jarl Waldemar Lindeberg proved in 1922 that if it tends to zero for every epsilon, the standardized sum is asymptotically normal. And William Feller proved in 1935 that the condition is also necessary, as long as no single summand's variance is a non-vanishing share of the total. So the theorem is exact: under Feller's maximal-variance condition, Lindeberg's tail-variance condition is equivalent to the CLT. Without that condition, a dominant summand can itself be normal and the sum can still be normal.

Lindeberg's own proof avoids characteristic functions and is the ancestor of Stein's method. Take a smooth bounded test function f, and replace the summands by normal variables of the same variance, one at a time. After n swaps the sum, in blue, has become a normal sum, in gold, exactly normal with variance s n squared. The difference between E f of the original sum and E f of the normal is at most the sum of the changes made by each swap, where W k holds the other summands, already swapped or not yet. So it is enough to show each swap changes very little.

First divide every summand and normal replacement by s n, so their total variance is one. Expand f around the sum of the other standardized terms to second order. The remainder is at most a sixth of the absolute cube times the third derivative's bound, or the square times the second derivative's, whichever is smaller. Do the same for the normal replacement. Because X and its replacement have the same mean and variance and are independent of W, the first three terms cancel exactly. Use the cubic bound on summands smaller than epsilon s n, and the quadratic bound on the larger ones, whose total is exactly Lindeberg's quantity. The error is at most epsilon times a derivative bound plus a constant times L n of epsilon, with the same bounds for the normal replacements. Lindeberg implies that their largest variance vanishes, so their tail term also vanishes. Let n grow, then epsilon shrink. Smooth test functions suffice for weak convergence, and the theorem is proved.

Here is the condition doing its work. On the left, twenty independent uniforms of equal size: Lindeberg's quantity is zero once n passes twelve, and the standardized sum is normal to within in Kolmogorov distance. On the right, twenty random signs whose variances grow like four to the k: the last one alone carries three quarters of the total. At epsilon one half, Lindeberg's quantity tends to three quarters as this array grows, and the sum is no more normal at twenty terms than at two. Read from the largest term down, the signs have sizes that halve each time: they are the binary digits of chapter two, and their finite sum is uniform on a fine lattice and its limiting law is continuous uniform, not normal. This particular dominant-sign construction fails the CLT; dominance alone is not a universal obstruction.

For identically distributed summands with finite variance, Lindeberg's quantity is the expected squared value beyond epsilon sigma root n, which tends to zero by dominated convergence. So the iid classical CLT needs a positive finite variance, with centering by the finite mean. Part six's proof assumed a moment generating function, which quietly excluded t distributions, Pareto tails and the World's incomes; that assumption is now gone. In practice one often checks Lyapunov's stronger condition on moments slightly above two, which implies Lindeberg's.

Numbers: KS 0.003 vs 0.057 (L_n = 0.75)

10Stein's method and the ratesPhD4 min

Stein's method, and how fast the central limit theorem works, with constants. In 1972 Charles Stein found a characterization of the normal law that leads to explicit error bounds. A random variable is standard normal exactly when the expectation of f prime minus z f is zero for a suitable class of smooth test functions with bounded derivatives and integrable terms. One direction is integration by parts, because the normal density's derivative is minus z times the density. The other comes from choosing f cleverly, as the solution of an equation we write next. The kit checks it numerically: with f the sine, the expectation is zero for normal draws, and clearly not zero for a centred exponential.

For a bounded test function h, or a Lipschitz function with finite normal expectation, Stein's equation asks for an f whose f prime minus w f equals h minus its normal expectation. It is a first-order linear equation with an explicit bounded solution, and the relevant Stein-factor bounds depend on the class of h. Indicator tests require almost-everywhere derivatives or a smoothing argument. Substitute the sum W for w and take expectations: the distance between E h of W and E h of Z equals the expectation of f prime minus W f at W. The question about distances has become a question about one expectation, which a Taylor expansion and a clever coupling can bound.

For an iid standardized sum with common third absolute moment rho, Stein's method with Larry Goldstein's zero-bias coupling gives a clean bound on the Wasserstein distance: at most rho over root n, constant one. For the Kolmogorov distance, the Berry–Esseen theorem gives C rho over root n, and after decades of work a published universal upper bound for iid summands is point four seven four eight, by Irina Shevtsova in 2011. The rate one over root n cannot be improved: a fair coin's standardized sum has largest atom about the square root of two over pi n. Half that jump is one over the square root of two pi n, which a continuous CDF cannot avoid.

This is the part's weak-convergence lab. For four kinds of sum, the exact Kolmogorov distance from the normal, computed from binomial, Poisson and gamma probabilities, for n from one to a thousand and twenty-four, on log-log axes. Every line has slope minus one half to within a few thousandths: the one-over-root-n rate, measured. The dashed lines are the Berry–Esseen bounds. The fair coin comes within percent of its bound, so the constant is nearly sharp; the exponential sits at about percent of its own, because a continuous law has no atoms to jump over and its skewness costs less than the bound fears.

What about the folklore of Part six, that thirty is enough? For the exponential at thirty, the Kolmogorov distance is , against a bound of . The sum's CDF is within two and a half percent of normal everywhere, which sounds safe. But a confidence interval lives in the tails, where two and a half percent is half of the five percent we promised, and the t statistic's skewness enters at exactly the one-over-root-n rate. Part forty-seven's Edgeworth expansion will give the correction term; the Board shows what happens without it.

Numbers: slopes −0.497 to −0.500; 84% vs 14% of the bound

11Infinitely divisible and stable lawsPractice5 min

Which laws can be limits of sums in an infinitesimal triangular array, where every summand becomes small in probability? Exactly the infinitely divisible ones: those that can be written, for every n, as a sum of n independent identical pieces. Lévy and Khintchine described them all. The logarithm of the characteristic function is a drift, a Gaussian part, and an integral against a Lévy measure nu that records how often jumps of each size occur, with no mass at zero and finite integral of the smaller of one and x squared. The normal has no jumps; the Poisson has jumps of size one at rate lambda; the gamma, the Cauchy and Student's t are infinitely divisible too. The uniform and the binomial are not: no bounded law other than a point can be. Part forty-four's Lévy processes are these laws, unrolled in time.

Among them, the stable laws are the possible limits of normalized sums of identical variables: a sum of n copies has the same shape as one copy, scaled by n to the one over alpha. In the symmetric case the characteristic function is e to the minus c times absolute t to the alpha, with alpha between zero and two. Alpha two is the normal; alpha one is the Cauchy. Below two, the tails fall off like a power, x to the minus alpha, so the variance is infinite. The generalized central limit theorem: for alpha strictly below two, stable domains of attraction require regularly varying tails and a limiting tail balance. In general the normalization includes a slowly varying factor and centering; a pure n to the one over alpha scale is a special case such as our symmetric Pareto example. The normal domain has a separate truncated-variance criterion. The normal law is the one stable law with a finite variance, which is why it is everywhere; but it is not the only possible limit.

A test of the generalized theorem. Take symmetric Pareto variables whose tails fall like x to the minus three halves: infinite variance, finite mean. The theorem predicts that sums divided by n to the two thirds converge to the symmetric stable law with alpha three halves, whose characteristic function, in gold, has a constant c that comes from the tail: gamma of minus a half times the cosine of three pi over four, . The dots are empirical characteristic functions of twenty thousand normalized sums each, for ten, a hundred and a thousand terms. They approach the limit, but slowly: the leftover error shrinks only like n to the minus one third, because the Pareto law's bounded core still adds a little Gaussian-like variance. This particular Pareto law has a slow approach. Exact stable inputs already preserve their shape under summation, so heavy tails do not slow every limit theorem.

Real data with heavy tails. Here are daily returns of the German stock index, the DAX, from 1991 to 1998, standardized, against the normal curve. The peak is too sharp and the tails too heavy: the excess kurtosis is . Days beyond four standard deviations happen percent of the time, some fifty times more often than a normal law allows. Bruce Hill's estimator of the tail index, from the largest hundred down to the largest twenty-five returns, gives between and . Those estimates exceed two, which is compatible with a finite-variance tail model. They cannot establish a tail exponent or finite variance from this record, and a CLT for dependent returns needs further assumptions. Benoît Mandelbrot argued in 1963 that cotton prices had stable laws with alpha below two; this one DAX record does not settle a universal tail model for stock returns.

Sum the daily returns into weekly and monthly ones. The excess kurtosis falls from six to about one and then to about point three seven: a descriptive aggregation pattern, which finance calls aggregational Gaussianity. The Kolmogorov distances barely move, because there are fewer and fewer months to estimate them from. And real returns are not independent: their volatility clusters, as Part thirty-eight's GARCH models showed. Limit theorems for dependent sequences are the subject of the next part.

Numbers: c = 2.507; DAX kurtosis 6.3 → 1.2 → 0.36

12Large deviationsPhD4 min

Large deviations: how rare is a rare event? The central limit theorem describes deviations of the order of one over root n. For iid summands whose MGF is finite near zero, Cramer's theorem describes fixed deviations from the mean on an exponential probability scale. Heavy-tailed laws need not have this behavior. The rate is a Legendre transform: the supremum over t of t a minus the log moment generating function. The upper bound is Markov's inequality applied to e to the t S n, for any positive t. Optimizing t gives Chernoff's bound, e to the minus n times the rate. Harald Cramér, an actuary as well as a mathematician, proved in 1938, with insurance ruin in mind, that exponential rate; iid and MGF near zero on the exponential scale: the logarithm of the probability, divided by n, tends to minus the rate.

For coin flips with success probability point six, the rate function has a closed form, and it is a Kullback–Leibler divergence: how far the observed frequency a is from p in information. In gold, the quadratic rate that the normal approximation implies. Near p the two agree, which is why the central limit theorem works for moderate deviations; far from p the quadratic is wrong in both directions, and normal approximations to very small tail probabilities can be off by orders of magnitude. That is the regime of the p-values in a genome scan, Part thirty-three.

Part six's oldest example. Jacob Bernoulli asked how many draws from an urn with three white tokens to two black would make it a thousand to one that the observed share lies within one fiftieth of three fifths. The first admissible exact sample size is 6,481, but lattice oscillations can take later sizes back above the threshold. Checking every size through the Chernoff cutoff gives a sample size safe for every larger n of draws. The normal approximation gets close, at : this is a moderate deviation. Chernoff's large-deviation bound, which is a guarantee rather than an approximation, needs . Bernoulli's own bound, in 1713, demanded . The exponential rate he did not have is the difference between a theorem and a useful one.

Ivan Sanov lifted Cramér's theorem from averages to whole empirical distributions. The chance that the empirical law of n draws from P falls in a set A decays like e to the minus n times the infimum of KL of Q relative to P over Q in A, when the interior and closure rate bounds agree. In general Sanov gives lower and upper bounds for the interior and closure rather than equality for every set. Conditioned on the rare event, under the additional regularity and uniqueness conditions for Gibbs conditioning, the sample concentrates near the minimizing law: the most likely way for something unlikely to happen. In testing, the same divergence is the exponent of the best type two error, Chernoff and Stein's lemma, which Part forty-six proves.

Numbers: Bernoulli 25,550; Chernoff 9,171; CLT 6,498; safe at every later size from 6,520

13ExtremesPractice4 min

Extremes: what a maximum can converge to. Part six previewed the extreme-value families. The maximum of n independent copies has CDF F to the n. Suppose that, after centring by b n and scaling by a n, it converges to a non-degenerate limit G. The maximum of k n variables is the maximum of k blocks of n, so the limit must satisfy G to the k equals G of an affine change of x, for every k: it must be max-stable. Ronald Fisher and Leonard Tippett in 1928, and Boris Gnedenko rigorously in 1943, solved that equation: the only solutions form one family, the generalized extreme value laws, Gumbel when xi is zero, Fréchet when xi is positive, reversed Weibull when it is negative.

The proof in outline. Write psi for minus the log of G; max-stability says k times psi of x is psi of an affine function of x. Because psi is monotone, the relation extends from whole numbers k to rationals and then to every positive real s. Composing two such changes shows that the scale factor is multiplicative, alpha of s t equals alpha of s times alpha of t, so it is a power of s, s to the minus xi. When xi is zero the shift is minus log s and psi is e to the minus x, the Gumbel law; otherwise psi is one plus xi x to the minus one over xi. Three families, one equation.

Which laws go where? The exponential and the normal both lie in the Gumbel domain, Pareto tails in the Fréchet domain, the uniform in the reversed Weibull domain. Bounded support alone does not establish a Weibull domain, and not every distribution admits a nondegenerate affine maximum limit. But the speed differs enormously. Normalized exponential maxima are close to the Gumbel law already at ten. Normal maxima, at ten and even at a thousand, are still visibly off. For the exponential, the Pareto and the uniform, after normalizing, the CDF of the maximum is exactly one minus t over n, to the n, against its limit e to the minus t, so all three converge at the same rate, about one over n. For the normal, the convergence is logarithmically slow, with log-log corrections for the displayed classical normalizing constants. Better quantile-based centering changes the rate constants and corrections: a hundred thousand observations are not enough for a good Gumbel fit to normal maxima.

The exact distances. The exponential, Pareto and uniform rows are identical, not by accident but because each normalized maximum is the same function of a transformed variable. They fall tenfold for every tenfold increase in n. The normal row falls from point oh six four at ten to point oh three five at a hundred thousand: barely halved in ten thousand times the data.

Real maxima. Stuart Coles's standard example: the highest sea level each year at Port Pirie, in South Australia, sixty-five years from 1923. Each point is already a maximum over a year of tides, so a stationary block-maximum model motivates a GEV approximation if the domain-of-attraction and dependence conditions hold. Annual maxima alone do not guarantee this; the fitted curve is an illustrative model, not a goodness-of-fit proof. The fitted shape xi is , close to the Gumbel case. The fitted level with one percent annual exceedance probability, the hundred-year return level that engineers design sea walls for, is metres under an iid stationary fitted law, and under a pure Gumbel. A return level is an uncertain model estimate, not a guarantee about the next hundred years. The record, in 1934, was . Part six's Dutch dikes were designed this way, with the theorem behind them.

Numbers: 0.028 → 0.0003 vs 0.064 → 0.035; Port Pirie ξ̂ = −0.05, 100-year 4.69 m

Recap, problems, and the road aheadAll tracks3 min

Part forty-three in twelve lines. Vitali showed that not every set can have a size, so probabilities live on sigma-algebras, built from intervals by Carathéodory's theorem and pinned down by pi–lambda. A random variable is a measurable map, and its law a push-forward. Monotone and dominated convergence move limits through expectations, and uniform integrability characterizes L-one convergence when integrable variables converge in probability. Product measures, Fubini and Kolmogorov's extension make infinite sequences exist. Borel–Cantelli decides what happens infinitely often, and the zero–one laws say tail events are certain or impossible. The strong law follows from three series, or from Etemadi's truncation. Weak convergence has its distances and Skorokhod's representation; characteristic functions determine laws and detect their convergence. under Feller's maximal-variance condition, Lindeberg's condition characterizes the array CLT, and Stein's method measures its speed. Beyond the normal lie stable laws, exponential large deviations, and the extreme-value laws.

A promise for the next part. The main sum limit theorems here concern independent summands. Integration and weak-convergence tools do not generally need independence; even the strong law proof used only pairwise independence. But Part seven's Markov chains, Part seventeen's time series and every MCMC sampler produce dependent sequences, and we have been averaging them anyway. Part forty-four supplies the tools: conditional expectation, martingales and their convergence theorems, the ergodic theorem for Markov chains, and Brownian motion.

Where it comes back. Part forty-four gives the L-two projection view of conditional expectation and builds martingales. Part forty-five treats sufficiency as a statement about sigma-algebras. Part forty-six uses the large-deviation exponent for the error rates of tests. Part forty-seven proves the delta method and the Edgeworth expansion. And Part forty-eight extends weak convergence from laws on the line to whole random functions, with Donsker's theorem.

Six problems, with full solutions in the README. The Borel sets from rational half-lines; the tail-integral formula from Tonelli; almost sure convergence from summable probabilities; Lindeberg for identically distributed summands; two Cramér rates; and the exact distance of an exponential maximum from the Gumbel law. Pause here if you want to try them.

The books this part follows: Durrett and Billingsley; Kallenberg, and David Williams's Probability with Martingales; Chen, Goldstein and Shao on Stein's method; Coles on extremes, and Dembo and Zeitouni on large deviations; with the papers from Hilbert's problems to Shevtsova's constant.

Forty-three parts of sixty-five, and the PhD core has begun. A random variable is a measurable map, and the limit theorems say exactly what they say, with their conditions and their rates. Next, dependence: Part forty-four, martingales, Markov chains and Brownian motion.

Where it goes next. Conditional expectation, martingales and Brownian motion follow in Part 44; sufficiency becomes a sigma-algebra in Part 45; the delta method and Edgeworth expansions are proved in Part 47; weak convergence of whole processes (Donsker) is Part 48.

Key results

The part's results in one place, for revision.

The portmanteau theorem\(\displaystyle X_n\Rightarrow X\iff \operatorname{E}f(X_n)\to\operatorname{E}f(X)\ \text{for }\allowbreak \text{all }\allowbreak \text{bounded }\allowbreak \text{continuous }f\iff \limsup_n P(X_n\in F)\le P(X\in F)\ \text{for }\allowbreak \text{all }\allowbreak \text{closed }F\)
Lindeberg's condition\(\displaystyle L_n(\varepsilon)=\frac{1}{s_n^2}\sum_{k\le n}\operatorname{E}\bigl[X_k^2\,1(|X_k|>\varepsilon s_n)\bigr]\to 0\ \text{for }\allowbreak \text{all }\varepsilon>0\ \Longrightarrow\ \frac{S_n}{s_n}\Rightarrow N(0,1)\)
Stein and Berry-Esseen\(\displaystyle d_W(S_n^*,Z)\le\frac{\rho}{\sqrt n},\qquad\allowbreak \sup_z\bigl|P(S_n^*\le z)-\Phi(z)\bigr|\le\frac{0.4748\,\rho}{\sqrt n},\qquad\allowbreak \rho=\frac{\operatorname{E}|X-\mu|^3}{\sigma^3}\)
Cramer's theorem\(\displaystyle \tfrac1n\log P(\bar X_n\ge a)\to -I(a),\qquad\allowbreak I(a)=\sup_t\bigl\{ta-\log\operatorname{E}e^{tX}\bigr\}\quad\allowbreak (a>\operatorname{E}X)\)
The extreme-value laws\(\displaystyle P\Bigl(\frac{M_n-b_n}{a_n}\le x\Bigr)\to G_\xi(x)=\exp\bigl\{-(1+\xi x)^{-1/\xi}\bigr\},\qquad\allowbreak 1+\xi x>0\)

Try it

Lab 43 · How fast is the central limit theorem?

Compute the exact Kolmogorov distance between a standardized sum and the normal law for four kinds of summand, n = 1 to 1,024, fit its slope on log-log axes, and compare it with the Berry-Esseen bound 0.4748 rho / sqrt(n); then check Stein's identity on simulated sums.

Figure produced by Lab 43: How fast is the central limit theorem?
Produced by the lab below, seed 0, in 0.2 s.
python -m videos.stats.labs 43 needs numpy, scipy, matplotlib · download lab43.py · source on GitHub
fair coin: slope of log distance on log n                 -0.497   (theory -0.5)
fair coin: distance / Berry-Esseen bound at n = 1024      0.01246 / 0.01484 = 84%
coin, p = 0.1: slope of log distance on log n             -0.496   (theory -0.5)
coin, p = 0.1: distance / Berry-Esseen bound at n = 1024  0.02632 / 0.04056 = 65%
Poisson(1): slope of log distance on log n                -0.498   (theory -0.5)
Poisson(1): distance / Berry-Esseen bound at n = 1024     0.00831 / 0.02575 = 32%
exponential: slope of log distance on log n               -0.500   (theory -0.5)
exponential: distance / Berry-Esseen bound at n = 1024    0.00416 / 0.03583 = 12%
Stein residual, normal sample                             -0.008   (theory 0)
Stein residual, 16 exponentials                           -0.497   (theory -2/sqrt(16) = -0.500)

Every exact distance falls like 1 / sqrt(n) and stays under 0.4748 rho / sqrt(n); the fair coin uses 84% of the bound, the exponential about an eighth of it.
The code (83 lines; it asserts its own result)
"""Lab 43: measure the central limit theorem's rate exactly, and hold it against Berry-Esseen and Stein."""

import numpy as np
from scipy import stats

from videos.coursekit import labs
from explainer.stats.kit import limits

TITLE = "How fast is the central limit theorem?"
GOAL = ("Compute the exact Kolmogorov distance between a standardized sum and the normal law for four kinds of "
        "summand, n = 1 to 1,024, fit its slope on log-log axes, and compare it with the Berry-Esseen bound "
        "0.4748 rho / sqrt(n); then check Stein's identity on simulated sums.")
TASKS = [
    "Change the unfair coin's p from 0.1 to 0.01. How does the share of the Berry-Esseen bound it uses change, and why?",
    "Replace the Kolmogorov distance by limits.wasserstein1 for the fair coin and compare with Stein's bound rho / sqrt(n).",
    "In the Stein check use f(x) = x**3 (f' = 3x**2). Which moment of the sum does the residual measure now?",
]


def distance(kind, n, p=0.5):
    """The Kolmogorov distance of a standardized sum of n summands from N(0, 1): exact for the lattice laws."""
    if kind == "bernoulli":
        a = limits.bernoulli_sum_atoms(n, p)
        return limits.kolmogorov_lattice(a["atoms"], a["probs"], stats.norm.cdf)["d"]
    if kind == "poisson":
        a = limits.poisson_sum_atoms(n)
        return limits.kolmogorov_lattice(a["atoms"], a["probs"], stats.norm.cdf)["d"]
    z = np.linspace(-6, 6, 24001)  # a gamma law is continuous: a fine grid
    return limits.kolmogorov(limits.exponential_sum_cdf(n), stats.norm.cdf, z)


def run(seed=0):
    rng = np.random.default_rng(seed)
    lab = labs.Lab()
    ns = 2 ** np.arange(0, 11)
    kinds = [("fair coin", "bernoulli", 0.5, labs.BLUE), ("coin, p = 0.1", "bernoulli", 0.1, labs.GREEN),
             ("Poisson(1)", "poisson", 0.5, labs.PURPLE), ("exponential", "exponential", 0.5, labs.GOLD)]
    out = {}
    for name, kind, p, color in kinds:
        d = np.array([distance(kind, int(n), p) for n in ns])
        rho = limits.third_abs_moment(kind, p) if kind == "bernoulli" else limits.third_abs_moment(kind)
        bound = np.array([limits.berry_esseen(rho, int(n)) for n in ns])
        slope = np.polyfit(np.log(ns[4:]), np.log(d[4:]), 1)[0]
        out[name] = dict(d=d, bound=bound, slope=slope, ratio=d[-1] / bound[-1], color=color)
        lab.row(f"{name}: slope of log distance on log n", f"{slope:.3f}   (theory -0.5)")
        lab.row(f"{name}: distance / Berry-Esseen bound at n = 1024", f"{d[-1]:.5f} / {bound[-1]:.5f} = {d[-1] / bound[-1]:.0%}")
        assert np.all(d <= bound + 1e-12), "the Berry-Esseen bound holds at every n"
        assert abs(slope + 0.5) < 0.02, "the rate is 1 / sqrt(n)"
    fair = out["fair coin"]
    # a fair coin's largest gap is half the central atom, about 1 / sqrt(2 pi n): 0.399 / 0.4748 = 84% of the bound
    assert abs(fair["ratio"] - 1 / (np.sqrt(2 * np.pi) * limits.SHEVTSOVA)) < 0.01, "the constant is nearly sharp"
    assert out["exponential"]["ratio"] < 0.25, "a smooth summand is far inside the bound"

    # Stein's identity: E[f'(W) - W f(W)] = 0 exactly when W is N(0, 1).  With f(x) = x^2 the residual is -E W^3,
    # which for a standardized sum of n exponentials is -2 / sqrt(n).
    reps, n = 400_000, 16
    w = (rng.gamma(n, size=reps) - n) / np.sqrt(n)
    z = rng.standard_normal(reps)
    f, fp = (lambda x: x ** 2), (lambda x: 2 * x)
    r_sum, r_norm = limits.stein_residual(f, fp, w), limits.stein_residual(f, fp, z)
    lab.row("Stein residual, normal sample", f"{r_norm:+.3f}   (theory 0)")
    lab.row("Stein residual, 16 exponentials", f"{r_sum:+.3f}   (theory -2/sqrt(16) = -0.500)")
    assert abs(r_norm) < 0.03 and abs(r_sum + 0.5) < 0.06, "Stein's identity separates the two laws"
    lab.note = ("Every exact distance falls like 1 / sqrt(n) and stays under 0.4748 rho / sqrt(n); the fair coin uses "
                "84% of the bound, the exponential about an eighth of it.")

    fig, ax = labs.figure(2, size=(11, 4.3))
    for name, r in out.items():
        ax[0].loglog(ns, r["d"], "o-", ms=3, color=r["color"], label=f"{name} (slope {r['slope']:.3f})")
        ax[0].loglog(ns, r["bound"], ls="--", lw=1, color=r["color"], alpha=0.7)
    ax[0].set(title="Exact Kolmogorov distance (dashed: Berry-Esseen bound)", xlabel="n", ylabel="sup |F_n - Phi|")
    ax[0].legend(loc="lower left")
    a = limits.bernoulli_sum_atoms(10)
    F = limits.lattice_cdf(a["atoms"], a["probs"])
    x = np.linspace(-3.5, 3.5, 2001)
    k = limits.kolmogorov_lattice(a["atoms"], a["probs"], stats.norm.cdf)
    ax[1].step(x, F(x), where="post", color=labs.BLUE, label="standardized Binomial(10, 1/2)")
    ax[1].plot(x, stats.norm.cdf(x), color=labs.GOLD, label="normal CDF")
    ax[1].plot([k["x"], k["x"]], [k["F"], k["G"]], color=labs.RED, lw=3, label=f"Kolmogorov gap {k['d']:.3f}")
    ax[1].set(title="Ten coin tosses against the normal law", xlabel="z", ylabel="CDF")
    ax[1].legend(loc="upper left")
    lab.fig = fig
    return lab

Now change it

  1. Change the unfair coin's p from 0.1 to 0.01. How does the share of the Berry-Esseen bound it uses change, and why?
  2. Replace the Kolmogorov distance by limits.wasserstein1 for the fair coin and compare with Stein's bound rho / sqrt(n).
  3. In the Stein check use f(x) = x**3 (f' = 3x**2). Which moment of the sum does the residual measure now?

Problems, with solutions

Try each problem before opening its solution.

  1. Rational half-lines generate the Borel sets. Show that \(\mathcal B(\mathbb R)\) is generated by the half-lines \((-\infty, q]\) with \(q\) rational.

    Solution
    • Let 𝒢 = σ{(−∞, q] : q ∈ ℚ}.
    • For real x, (−∞, x] = ⋂_{q ∈ ℚ, q > x} (−∞, q], a countable intersection, so it lies in 𝒢.
    • Hence (a, b] = (−∞, b] ∖ (−∞, a] ∈ 𝒢, and every open set is a countable union of such intervals, so 𝓑 ⊆ 𝒢.
    • The reverse inclusion is clear.
  2. The tail formula. For \(X \ge 0\), prove \(E X = \int_0^\infty P(X > t)\, dt\) with Tonelli's theorem.

    Solution
    • X = ∫₀^∞ 1(X > t) dt pointwise.
    • Tonelli on Ω × [0, ∞) (a non-negative integrand) gives E X = ∫₀^∞ E 1(X > t) dt = ∫₀^∞ P(X > t) dt.
  3. Summable deviations. If \(\sum_n P(|X_n - X| > \varepsilon) < \infty\) for every \(\varepsilon > 0\), show \(X_n \to X\) almost surely.

    Solution
    • By Borel–Cantelli I, for each ε = 1/k, |X_n − X| > 1/k only finitely often, almost surely.
    • Intersecting over k (countably many null sets) gives X_n → X almost surely.
    • For convergence in probability, choose n_k with P(|X_{n_k} − X| > 2^{−k}) < 2^{−k}. This gives an almost surely convergent subsequence.
  4. Lindeberg for i.i.d. summands. Show that i.i.d. summands with finite variance satisfy Lindeberg's condition.

    Solution
    • With s_n² = nσ², L_n(ε) = E[X² 1(|X| > εσ√n)]/σ².
    • The integrand tends to 0 pointwise and is dominated by X², which is integrable, so L_n → 0 by DCT.
  5. Two Cramér rates. Find Cram'er's rate \(I(a)\) for \(N(\mu, \sigma^2)\) and for Poisson(\(\lambda\)) summands.

    Solution
    • N(μ, σ²): Λ(t) = μt + σ²t²/2, so I(a) = sup_t (ta − μt − σ²t²/2) = (a − μ)²/(2σ²). The CLT's quadratic is exact here.
    • Poisson(λ): Λ(t) = λ(e^t − 1). The maximizer is t = log(a/λ), so I(a) = a log(a/λ) − a + λ.
  6. An exponential maximum's distance from the Gumbel law. For Exp(1) maxima, show \(\sup_{0\le t\le n} |(1 - t/n)^n - e^{-t}| \approx 2e^{-2}/n\), the distance in chapter 13's table.

    Solution
    • (M_n − log n ≤ x) has probability (1 − e^{−x}/n)^n. With t = e^{−x}, this is (1 − t/n)^n = e^{n log(1 − t/n)} = e^{−t}(1 − t²/(2n) + O(n^{−2})).
    • So the gap is e^{−t} t²/(2n) + O(n^{−2}), maximized at t = 2: 2e^{−2}/n ≈ 0.271/n.
    • That gives 0.0271 at n = 10, against the exact 0.0280 in chapter 13's table, and 0.00271 at n = 100 (exact 0.0027).

Notes and sources

Where it comes back

  • Part 44: conditional expectation, martingales, the ergodic theorem, Brownian motion.
  • Part 45: sufficiency as a σ-algebra.
  • Part 46: Stein's lemma and the KL exponent of tests.
  • Part 47: the delta method and Edgeworth expansions, proved.
  • Part 48: Donsker's theorem: weak convergence of whole processes.

Glossary

  • The foundations.
    • σ-algebra; Borel sets; measure; probability space; π-system, λ-system; outer measure: the axioms' vocabulary.
    • Measurable map; law (push-forward); generated σ-algebra; filtration: random variables.
  • Integration and products.
    • Simple function; Lebesgue integral; MCT, Fatou, DCT; uniform integrability; Vitali's theorem: integration.
    • Product measure; Tonelli, Fubini; Kolmogorov's extension theorem; Radon–Nikodym derivative: products and densities.
  • Limits of sequences.
    • Limsup of events; Borel–Cantelli; tail σ-algebra; 0–1 law; exchangeable (symmetric) events: infinitely often.
    • Strong law; maximal inequality; three-series theorem; truncation: almost sure limits.
  • Weak convergence.
    • Portmanteau; Kolmogorov, Lévy, Wasserstein, Lévy–Prokhorov and total-variation distances; coupling; Ky Fan distance; Skorokhod representation; tightness; Prokhorov's theorem; Helly selection: weak convergence.
    • Characteristic function; inversion; Lévy's continuity theorem; Cramér–Wold: transforms.
    • Triangular array; Lindeberg and Lyapunov conditions; Feller's converse; Stein's identity and equation; zero-bias coupling; Berry–Esseen: the CLT and its rate.
  • Beyond the normal.
    • Infinitely divisible; Lévy measure; stable law; domain of attraction; regular variation; tail index: other limits.
    • Rate function; Legendre transform; Chernoff bound; Sanov's theorem: large deviations.
    • Max-stable; GEV; Gumbel, Fréchet, Weibull; return level: extremes.

Sources

  • Foundations.
    • D. Hilbert, Bull. AMS 8 (1902, transl. of the 1900 address); A. N. Kolmogorov, Grundbegriffe der Wahrscheinlichkeitsrechnung (1933).
    • G. Vitali (1905); H. Lebesgue (1902); C. Carathéodory (1914); É. Borel, Rend. Circ. Mat. Palermo 27 (1909).
  • Laws of large numbers and 0–1 laws.
    • A. N. Kolmogorov, Math. Ann. 99 (1928), 102 (1929); N. Etemadi, Z. Wahrsch. 55 (1981).
    • E. Hewitt & L. Savage, Trans. AMS 80 (1955); P. Erdős & A. Rényi, J. Analyse Math. 23 (1970); G. Pólya, Math. Ann. 84 (1921).
  • Weak convergence and characteristic functions.
    • P. Lévy, Calcul des probabilités (1925); H. Cramér & H. Wold, J. London Math. Soc. 11 (1936).
    • Y. Prokhorov, Theory Probab. Appl. 1 (1956); A. Skorokhod, Theory Probab. Appl. 1 (1956).
    • C. Heyde, JRSS B 25 (1963); L. Le Cam, Pacific J. Math. 10 (1960); L. Bortkiewicz, Das Gesetz der kleinen Zahlen (1898).
  • The CLT and its rate.
    • J. W. Lindeberg, Math. Z. 15 (1922); W. Feller, Math. Z. 40 (1935).
    • C. Stein, Proc. Sixth Berkeley Symp. 2 (1972); L. Goldstein, J. Appl. Probab. 47 (2010).
    • L. Chen, L. Goldstein & Q.-M. Shao, Normal Approximation by Stein's Method (2011); I. Shevtsova, arXiv:1111.6554 (2011).
  • Beyond the normal.
    • B. Mandelbrot, J. Business 36 (1963); J. Chambers, C. Mallows & B. Stuck, JASA 71 (1976); B. Hill, Ann. Stat. 3 (1975).
    • H. Cramér, Actualités Sci. Indust. 736 (1938); I. Sanov, Mat. Sb. 42 (1957); A. Dembo & O. Zeitouni (2nd ed. 1998).
    • R. A. Fisher & L. Tippett, Proc. Camb. Phil. Soc. 24 (1928); B. Gnedenko, Ann. Math. 44 (1943); S. Coles (2001).
  • Books.
    • R. Durrett, Probability: Theory and Examples (5th ed. 2019); P. Billingsley, Probability and Measure (3rd ed. 1995).
    • O. Kallenberg, Foundations of Modern Probability (3rd ed. 2021); D. Williams, Probability with Martingales (1991).
About this partfrom its README

Part 43 of a sixty-five-part course in statistics, from a first course to a PhD (see the series plan and the syllabus), and the first part of Stage IV, the PhD core. In 1900 Hilbert asked for axioms of probability (his sixth problem), and in 1933 Kolmogorov supplied them, on top of Lebesgue's measure. This part:

  • builds the axioms: σ-algebras, measures, random variables, integrals, products;
  • develops proofs and proof outlines for the strong law, Lévy continuity and Lindeberg–Feller; presents Stein bounds and a cited Berry–Esseen constant;
  • then looks beyond the normal: stable laws, large deviations and extremes.

It keeps three promises from Stage I:

  • Part 2 used elementary event spaces; Vitali rules out extending rotation-invariant length to every subset of the interval (with choice). Atomic probabilities can be defined on all subsets.
  • Part 3 said the MGF determines the law; this part proves it, and shows that moments alone do not.
  • Part 6 proved the CLT by MGFs and stated the strong law and the Berry–Esseen rate; this part develops the strong-law/CLT arguments and explains the approximation rates; the published 0.4748 constant is stated rather than derived.

Built in this part:

  • statkit.limits, the weak-convergence lab (explainer/stats/kit/limits.py), tested in tests/test_stats_kit_limits.py:
    • Distances:
      • Kolmogorov, exact for a lattice law against a continuous one;
      • Lévy's metric;
      • Wasserstein-1;
      • the Lévy–Prokhorov distance, bracketed between Lévy's below and the Ky Fan distance of the quantile coupling above (Strassen);
      • total variation between binomial and Poisson laws, with Le Cam's bound.
    • Exact laws of standardized sums: binomial, Poisson and gamma; Borel's binary digits; the quantile transform; the Cantor function.
    • Bounds:
      • Berry–Esseen with Shevtsova's 0.4748;
      • the Stein/zero-bias Wasserstein bound ρ/√n;
      • Stein's identity and the solution of Stein's equation.
    • Characteristic functions: empirical, numerical inversion, and Lévy's tail bound.
    • Heavy tails and large deviations: the Chambers–Mallows–Stuck stable sampler; Hill's tail index; Cramér's rate as a Legendre transform, with the Bernoulli rate (a KL divergence) and exact binomial tails.
    • Extremes: GEV laws, the classical norming constants and the exact law of a normalized maximum.
    • Series: the random harmonic series and the three series.
  • The convergence lab (ConvergenceLab in explainer/stats/viz.py), the part's instrument: a law against its limit on CDF axes, with the Kolmogorov gap, Lévy's box and the Wasserstein area drawn in.

Data.

  • From the Museum:
    • Bortkiewicz's (1898) horse kicks;
    • Bernoulli's urn (Ars Conjectandi, 1713);
    • the DAX, 1991–1998 (R's EuStockMarkets);
    • Port Pirie's annual maximum sea levels, 1923–1987 (Coles 2001).
  • The rest is exact arithmetic or seeded simulation.

The Coverage Board gains six rows, all nominal 90% t intervals for a mean:

Setting Achieved Verdict
Uniform(0, 1), n = 10 89.8% kept
Exp(1), n = 10 85.6% broken
Exp(1), n = 100 89.2% broken (studentization/skewness; the leading CDF term cancels for symmetric two-sided coverage)
Exp(1), n = 1,000 89.9% kept
Pareto, α = 2.5 (finite variance), n = 100 83.7% broken
Pareto, α = 1.5 (infinite variance), n = 1,000 70.4% broken in this simulation; Gaussian studentization is not asymptotically justified
Chapter notes
# Chapter Numbers
0 Hilbert's sixth problem 1900; the Grundbegriffe, 1933
1 σ-algebras and measures Vitali; the Cantor set's length (2/3)^k → 0
2 Random variables as measurable maps binary digits: shares 0.496–0.504; three 1s 0.127
3 Integration E X_n = 1, lim = 0; 1/X̄ consistent with infinite mean
4 Independence and products the double series 0 ≠ 1
5 Borel–Cantelli and the 0–1 laws longest run 19.6 in 2^20 tosses
6 The strong law ±1/j settles (0.0025); ±1/j^0.4 wanders
7 Weak convergence Bin(10): Kolmogorov 0.123, Lévy 0.088, W 0.159; horse kicks pooled χ²₁ 0.063
8 Characteristic functions inversion to 0.0008; Heyde's equal moments
9 Lindeberg–Feller KS 0.003 vs 0.057 (L_n = 0.75)
10 Stein's method and the rates slopes −0.497 to −0.500; 84% vs 14% of the bound
11 Infinitely divisible and stable laws c = 2.507; DAX kurtosis 6.3 → 1.2 → 0.36
12 Large deviations Bernoulli 25,550; Chernoff 9,171; CLT 6,498; safe at every later size from 6,520
13 Extremes 0.028 → 0.0003 vs 0.064 → 0.035; Port Pirie ξ̂ = −0.05, 100-year 4.69 m
14 Outro —

The rest of the part's numbers, chapter by chapter:

  • Chapter 1.
    • Vitali's set: rational shifts of one point from each class tile [0, 1), so no shift-invariant countably additive length exists on all subsets.
    • Then the Borel σ-algebra, the π–λ theorem (a CDF determines its law), and Carathéodory's extension.
    • The Cantor function is a singular CDF, completing Part 2's promise of Lebesgue's decomposition.
  • Chapter 2. A random variable is a measurable map and its law a push-forward. One uniform yields infinitely many coins, hence any i.i.d. sequence; σ(X) is information (Doob–Dynkin).
  • Chapter 3.
    • The layer-cake formula; MCT, Fatou, DCT.
    • Counterexamples: the escaping bump (E X_n = 1, X_n → 0); the typewriter (in L¹ but nowhere almost surely); X_n = n with probability 1/n (not UI).
    • Vitali's convergence theorem. A consistent estimator, 1/X̄ for Poisson data, has infinite expectation at every n.
  • Chapter 4.
    • Independence of σ-algebras; Tonelli and Fubini.
    • The array a_mm = 1, a_m,m+1 = −1 sums to 0 by rows and to 1 by columns.
    • Kolmogorov's extension theorem; likelihoods as Radon–Nikodym derivatives.
  • Chapter 5.
    • Borel–Cantelli I and II. Erdős–Rényi: the longest run of heads ≈ log₂ n (19.6 in 2^20 tosses).
    • The typing monkey: 27^−9 per block.
    • Kolmogorov's 0–1 law; Hewitt–Savage and Pólya's recurrence.
  • Chapter 6.
    • The strong law and its converse (E|X| = ∞ ⇒ limsup |X̄_n| = ∞).
    • Kolmogorov's maximal inequality and three-series theorem: ±1/j converges (tail movement 0.0025); ±1/j^0.4 diverges.
    • Etemadi's four-step proof (pairwise independence suffices); Cauchy running means never settle.
  • Chapter 7.
    • The portmanteau theorem. The lab's four distances for standardized binomials:

      n Kolmogorov Lévy Prokhorov ≤ (Ky Fan) Wasserstein
      4 0.1875 0.1341 0.3357 0.2571
      10 0.1230 0.0880 0.2409 0.1594
      40 0.0627 0.0448 0.1367 0.0792
      160 0.0315 0.0225 0.0733 0.0395
    • Skorokhod's representation; tightness, Prokhorov and Helly (N(0, n²) loses its mass).

    • Bortkiewicz: 122 deaths in 200 corps-years, λ̂ = 0.61, pooled χ²₁ = 0.0628 (approximate p = 0.802), combining counts ≥ 2 before the reference test. Le Cam: d_TV(Bin(n, λ/n), Poi(λ)) = 0.0311, 0.0073, 0.0014 at n = 5, 20, 100, under λ²/n = 0.074, 0.019, 0.0037.

  • Chapter 8.
    • Characteristic functions; inversion (the triangle recovered to 0.0008).
    • The MGF determines the law when finite near 0 (analytic continuation).
    • Heyde's f(x)[1 + 0.8 sin(2π log x)] has the lognormal's moments 1.6487, 7.3891, 90.017, 2980.96.
    • Lévy's continuity theorem via the tail bound (Cauchy, u = 1: 0.736 ≥ 0.295); Cramér–Wold.
  • Chapter 9.
    • Lindeberg's theorem and Feller's converse; the replacement proof with its two Taylor remainders.
    • 20 equal uniforms: KS 0.003. Twenty signs with Var X_k = 4^k: the last holds 75% of the variance, L_n(1/2) → 0.75, and the limiting law is uniform (binary digits); each finite sum is on a lattice, KS 0.057.
  • Chapter 10.
    • Stein's identity and equation; d_W ≤ ρ/√n; Berry–Esseen with C = 0.4748.
    • Exact Kolmogorov slopes: coin −0.497, coin(0.1) −0.496, Poisson −0.498, exponential −0.500. They reach 84%, 65%, 32% and 14% of the bound.
    • At n = 30 the exponential is within 0.024 (bound 0.209), yet t intervals undercover.
  • Chapter 11.
    • Lévy–Khintchine; stable laws; the generalized CLT.
    • Symmetric Pareto(3/2) sums: the characteristic function approaches exp(−2.507|t|^{3/2}) at rate n^{−1/3}.
    • DAX: 1,859 returns, kurtosis 6.3, 0.32% of days beyond 4 SD (normal 0.0063%), Hill α̂ 3.5–4.4. Complete nonoverlapping 5- and 20-day blocks (371 and 92) have sample excess kurtosis 1.234 and 0.372. Residual days are discarded.
  • Chapter 12.
    • Chernoff and Cramér; the Bernoulli rate is KL(a‖p).
    • Bernoulli's urn (p = 0.6, ±0.02, 1000:1): exact 6,520 draws; CLT 6,498; Chernoff 9,171; Bernoulli 25,550.
    • Sanov.
  • Chapter 13.
    • Max-stability and the Fisher–Tippett–Gnedenko theorem with its proof.
    • Exact distances: exponential = Pareto = uniform = 0.0280, 0.0027, 0.00027 at n = 10, 100, 1,000 (each is (1 − t/n)^n vs e^{−t}); the normal 0.064 → 0.035 at n = 10^5.
    • Port Pirie: ξ̂ = −0.050, μ̂ = 3.87, σ̂ = 0.198; the 100-year level is 4.69 m (Gumbel 4.77 m); the record 4.69 m (1934).

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: Hilbert's sixth problem (1900) and the Grundbegriffe (1933). Upgrade cards from Parts 2 and 6.
  2. σ-algebras and measures. π–λ (Dynkin); Carathéodory's extension (Analysis, Built Part 5); why not every set is measurable.
  3. Random variables as measurable maps. Laws as push-forwards; generated σ-algebras as information.
  4. Integration. Monotone and dominated convergence; Fatou; uniform integrability; the counterexamples.
  5. Independence and products. Product measures; Kolmogorov's extension theorem; Fubini.
  6. Borel–Cantelli and the 0–1 laws. Kolmogorov's 0–1 law; Hewitt–Savage.
  7. The strong law. Kolmogorov's maximal inequality and three-series theorem; Etemadi's proof (1981).
  8. Weak convergence. The portmanteau theorem; Skorokhod representation; tightness and Prokhorov; Helly.
  9. Characteristic functions. Inversion; Lévy's continuity theorem, proved; Cramér–Wold.
  10. Lindeberg–Feller. Proof; Feller's converse; what the MGF proof of Part 6 assumed.
  11. Stein's method (Stein 1972). The Stein equation; a Berry–Esseen bound with explicit constants (Chen, Goldstein & Shao 2011).
  12. Infinitely divisible and stable laws. Lévy–Khintchine; domains of attraction; the generalized CLT.
  13. Large deviations. Cramér's theorem (1938); Sanov; the rate as a Legendre transform.
  14. Extremes. The Fisher–Tippett–Gnedenko theorem, proved via max-stability.
  15. Outro.

Built: a weak-convergence lab (laws converging in Lévy–Prokhorov and Kolmogorov distance, with the rates measured). Books: Durrett; Billingsley; Kallenberg; Chen, Goldstein & Shao.

Build the film

python -m videos.stats.stats43.compute        # the part's numbers, into .cache/stats43
python tools/build.py stats43                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py stats43 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/stats/stats43. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
OMP_NUM_THREADS=1 python -m videos.stats.stats43.compute   # once (under a minute)
python tools/build.py stats43 -q l                         # fast 480p preview
python tools/build.py stats43                              # 1080p30 -> renders/stats43.mp4
python tools/qa_scene.py stats43 Stein
python tools/lecture_length.py stats43 --floor 50