Bootstrapping (statistics) Created 2026-09-24 Updated 2026-10-18
The bootstrap approximates a sampling distribution by repeatedly sampling with replacement from the empirical measure of the observed data. In the ordinary nonparametric version, observations are assumed independent and identically distributed; a bootstrap sample has the same size as the original statistical sample. A statistic, such as a sample mean or sample median, is recomputed on each resample. Its variation across resamples estimates how the original statistic would vary across repeated sampling from the unknown probability distribution.[ref]
Lecture 12: The Bootstrap. UW STAT 535: Statistical Machine Learning, Autumn 2026; The Bootstrap, resampling procedure; High level idea of how bootstrap works, conditional empirical sampling law
The key distinction is between the observed statistical sample and its still-unknown source probability distribution. Condition on the observed values and form the empirical measureHere is a Dirac measure. Draw independent indices from the uniform distribution on a finite set and set . Each observed slot has probability on every draw. If equal values occupy several slots, their total probability is the sum of those slot probabilities; distinct observed values need not be equally likely. A star denotes this conditional resampling experiment. There are equally likely ordered index sequences, although bootstrap count vectors and statistics can combine many such sequences.
Sampling with replacement reuses observed slots while keeping the original data fixed
. Original schematic for observations . Three possible ordered bootstrap samples have different sample means. Their colors identify source slots; none of these samples is new evidence about the unknown probability distribution. Details.A complicated sampling distribution need not stop statistical inference when recomputing the statistic is easy. The bootstrap reuses that calculation on simulated datasets. The plug-in estimator principle replaces the unknown probability measure by in the whole repeated-sampling experiment. Whether that substitution approximates the target sampling distribution needs an appropriate bootstrap consistency theorem for the sample mean or a result for the particular statistic. A larger number of resamples reduces Monte Carlo error; it cannot repair the bootstrap failure for a uniform endpoint, an unrepresentative statistical sample or ignored statistical dependence.[ref]
Lecture 12: The Bootstrap. UW STAT 535: Statistical Machine Learning, Autumn 2026; High level idea of how bootstrap works; Bootstrap and Statistical Functionals, conditional variance and bootstrap variance consistency; Failure of the bootstrap, uniform-endpoint counterexample
On a compact metric space, every sequence of Borel probability measures has a subsequence with weak convergence of probability measures to a Borel probability measure. To see this, choose a countable uniformly dense subset of continuous functions, extract a diagonal subsequence of their bounded integrals, and extend the resulting positive normalized functional to all continuous functions. The Riesz representation theorem supplies its Borel probability measure. This is useful for constructing an invariant measure from orbit empirical measures.
Empirical characteristic function Created 2026-10-06 Updated 2026-10-07
For a sample , is the characteristic function of the sample's empirical measure. For independent and identically distributed random variables, and , without any moment condition on the observations.
Empirical distribution function Created 2026-09-24 Updated 2026-10-18
The empirical distribution function counts the fraction of observations at or below a threshold. For a statistical sample of real observations , defineEach indicator function contributes one exactly when its observation is counted. Equivalently, , where the empirical measure assigns probability mass to each observation, including repeated observations.[ref]
Choose the illustrative statistical sample . Its empirical distribution function isFor example, counts both observations equal to , , and . There is no observation at , so there is no jump there. The five observations produce only four distinct jump locations.
The convention makes the empirical distribution function right-continuous: once a threshold reaches an observation, that observation remains counted immediately to its right. For a finite statistical sample, the count is constant from any up to the next larger observed value, proving right continuity. Its left-hand limit counts observations strictly below , soA value occurring times causes one jump of size . At the jump is ; at , , and each jump is . All jumps sum to one. Thus the empirical distribution function is a nondecreasing step function with limits zero and one, and is itself a valid cumulative distribution function.
This turns many questions about data into simple cumulative distribution function operations. The observed fraction in is : for it is , counting and but excluding both s. Including the left endpoint gives . A sample quantile reads the same staircase in reverse: the smallest threshold reaching is . Unlike a histogram, this representation requires no choice of bins; its jumps retain every observation and its multiplicity.
The exact description of a finite statistical sample must be distinguished from a statistical model for how it was obtained. The empirical distribution function is defined for any finite list, with no independence assumption. Once the list is observed, its counts are fixed. For statistical inference, one often models as independent and identically distributed random variables with an unknown population cumulative distribution function . Then describes the sampling law, while varies across repeated statistical samples. The value is an observed fraction and an estimate of ; it does not establish that the population probability is . Even when is continuous, every finite is discrete.
For any threshold fixed before sampling, the indicator functions are independent Bernoulli random variables with success probability . Therefore the count has a binomial distribution andThe expected value follows by adding the expected values of the indicator functions; the variance follows by adding their variances using independence and dividing by . Thus is an unbiased estimator of at a fixed threshold. Controlling the error at every threshold at once requires more than a fixed-threshold calculation: the DKW inequality supplies such control, and the Glivenko-Cantelli theorem describes its uniform convergence almost surely as grows.
Comparing with a proposed cumulative distribution function also motivates goodness-of-fit tests, including the Kolmogorov-Smirnov test, the Anderson–Darling test, and the Cramér–von Mises criterion. A standard Kolmogorov-Smirnov test calibration assumes a fully specified continuous population law; fitting its statistical parameters from the same statistical sample changes that calibration.[ref]
1.3.5.16. Kolmogorov-Smirnov Goodness-of-Fit Test. NIST and SEMATECH e-Handbook of Statistical Methods; Characteristics and Limitations, items 1 and 3; Definition, test statistic and fully specified distribution requirement
Take the original observations , with sample mean . All ordered bootstrap samples have probability . The bootstrap sample has sample mean ; has sample mean ; has sample mean . These are illustrative possibilities, not three simulated measurements used to estimate the distribution.
For bootstrap count vectors , records the number of copies of observed slot . Their multinomial distribution isand . Thus the unordered counts have probability , whereas have probability . Stars and bars gives ten count vectors, but assigning each probability would be wrong. Two different count vectors, and , both give sample mean ; combining their probabilities gives .
The conditional bootstrap variance of a sample mean gives a compact check on the enumeration. Each resampled draw has expected value and varianceAveraging three independent draws divides that variance by three:The exact conditional bootstrap standard error is . The original sample variance with denominator is , so its usual estimated standard error for the sample mean is . Their squared ratio is here; the difference follows from the empirical measure's denominator , not a numerical simulation error. Neither number is the known true sampling standard error of the unknown source probability distribution.
Gaussian kernel density worked example 2026-10-14
Take the realized statistical sample , the Gaussian density kernel and smoothing bandwidth . ThenAt , the three contributions are , , and , because and . Their sum isThis is a probability density function value, not the probability of observing exactly zero. Each of the three component curves has area , despite having a different height at zero.
Let be the cumulative distribution function of the standard normal distribution. The fitted probability of the interval is its area under the kernel density estimator:The shaded area in the diagram is this fitted probability. Its agreement to a few digits with is incidental: the empirical measure gives this interval mass exactly, whereas kernel density estimation redistributes that mass into neighboring intervals.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 30 4 Solution Created 2026-10-03 Updated 2026-10-14
Use the convention that level counts the nonzero shifts, hence an arithmetic progression of length . The SZ property at level means that every measurable set of positive measure satisfiesThis is the averaged multiple-recurrence property, stronger than merely finding one positive intersection. Shifting the indexing convention from terms to terms does not change the all-levels assertion. We work with probability measure-preserving systems.
Here is the Furstenberg correspondence principle construction proving the Szemerédi theorem. Let have positive upper density . Put equal to the indicator of on the positive coordinates and zero elsewhere, and let be the left shift. The binary full shift is a compact metric space in the product topology, and is a homeomorphism. Choose attaining the upper density and define the empirical measuresWe use the standard weak compactness fact that every sequence of Borel probability measures on a compact metric space has a weakly convergent subsequence, where weak convergence means convergence of integrals of continuous functions. Pass to a subsequence with limit . For every continuous , telescoping givesPassing to the limit proves . The cylinder set is clopen, so its indicator is continuous andIf every measure-preserving system has the SZ property at level , there is some for which , where . This is also a clopen cylinder set, so . For some sufficiently large , at least one term of the empirical average is positive: for some . Unwinding the coordinates givesTherefore contains an arithmetic progression of length with positive common difference. Having the SZ property at every level gives the infinite-density form of the Szemerédi theorem.
The finite uniform form follows from the same argument. If, for fixed and , arbitrarily large admitted sets with and no such arithmetic progression, replace above by the indicator of , extended by zero outside that interval. Their empirical measures still have an invariant weak limit with . For every fixed positive , however, , since a point contributing to that cylinder would be an actual progression in . Thus for all positive , contradicting the SZ property. Consequently a sufficiently large depending only on forces the required progression.
A compact measure-preserving system is one for which every observable has relatively compact forward orbit under the Koopman operator . Equivalently, each of these orbits is totally bounded in the global norm; compactness refers to observables, not just to the underlying topological space. For an invertible system it is usual to use all integer times. One may also define compactness by density of almost periodic observables: the two definitions coincide because , so a finite net for an approximating observable is a finite net, with slightly larger radius, for .
To prove the SZ property, fix with , put , and chooseCompactness gives a finite -net for its orbit with centers , where . Let . For every integer , some center satisfies . Since is an isometry, cancellation givesThus the return set meets every interval for . In particular, is a syndetic set with lower density at least . This proves the needed syndetic near returns of an almost periodic observable without any assumption of ergodicity.
For , telescoping and the isometry property giveAs is an indicator, . The union bound therefore givesAll other multiple-intersection measures are nonnegative. Averaging over the bounded-gap set yieldsThus every compact measure-preserving system has the SZ property at every level, including nonergodic systems and, under the forward-orbit definition, noninvertible transformations.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 33 1 Solution Created 2026-10-03 Updated 2026-10-14
Write and for the population and empirical measure. The empirical distribution function isFix and a finite cover by function brackets of width below . If belongs to the th bracket, thenand, using instead, . ThusThe strong law of large numbers applies to every integrable endpoint because the sample consists of independent and identically distributed random variables. For this finite collection the maximum tends to zero on a common probability-one event. Apply the argument for , , and intersect those countably many events. On the resulting event the limsup is at most for every , proving the uniform strong law from finite L1 bracketing. This pathwise argument also avoids assuming without justification that an arbitrary uncountable supremum is measurable.
For the Glivenko-Cantelli theorem, take . Here is a finite bracketing construction which also handles atoms of the distribution. Choose and divide the possible values of into finitely many bins , including the final value one. For each nonempty parameter set , set and pointwise. These functions are indicators of rays, possibly with an open endpoint, so they are measurable. Monotonicity of and monotone limits at the extreme thresholds give and . Hence . No continuity of is required. Applying the proved uniform law givesFor an uncountable class of continuous functions, use . The functions are distinct, bounded and integrable for every probability law. Moreover by the strong law of large numbers. This supplies the requested example without additional compactness machinery.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 33 2 Solution Created 2026-10-03 Updated 2026-10-14
For a normalized kernel for density estimation , with , the kernel density estimator isIt replaces each atom of the empirical measure by a translated, scaled copy of : averaging these small probability-density bumps gives a smooth approximation to the sampling density. Integral one is part of the probability-kernel convention; without it, the estimator generally targets .
The printed bandwidth assumption is insufficient for the claimed normal limit. The additional condition is needed at points with positive density. For a counterexample, take a normal distribution density , , the unit-width box kernel and . Then , but the probability that any observation lies in the window is at most . On the complementary event the estimator is zero, and . The limit in probability is therefore zero, whereas the stated normal limit has positive variance.
We now prove the intended pointwise central limit theorem for a kernel density estimator under , and . The first condition also follows from the last one. A mean value theorem bound, with , gives the bias of a kernel density estimatorThus the bias multiplied by tends to zero.
The Lindeberg-Feller central limit theorem says that independent centered variables in each row of a triangular array have sum converging in distribution to if the sum of their variances tends to and, for every , the sum of their truncated second moments tends to zero. Put and . The independence hypothesis holds within each row. A change of variable givesContinuity of at and the compact support and boundedness of justify the limit. Also , so the Lindeberg condition is eventually identically zero for every . The sum is exactly . Combining the centered limit with the negligible bias by the Slutsky theorem provesIf , the centered variance tends to zero, and the Chebyshev inequality proves the corresponding degenerate limit directly.
For , let be the supplied -quantile of this limiting normal distribution. Inverting the limiting central probability gives the confidence intervalContinuity of the limiting distribution gives asymptotic coverage . Equivalently, its half-width is under the stipulated oracle quantiles. A degenerate limit at does not by itself justify this nominal-coverage normal interval.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 39 1 Solution Created 2026-10-03 Updated 2026-10-07
Write and for the expectation and empirical measure. A sufficient bracketing of a function class condition is that, for every , finitely many brackets cover , with measurable integrable endpoints and . The uniform strong law from finite L1 bracketing then givesHere the observations are independent and identically distributed. For an uncountable class, one either assumes a measurable supremum, for example through a pointwise separable function class, or formulates the conclusion as a pathwise bound on a common probability-one event.
For the parameterized class, the Heine-Borel theorem makes compact. Put . A countable dense subset of gives the same supremum because of continuity, so is measurable. Define the modulusThe supremum is measurable by taking a countable dense subset of the compact set of admissible pairs. For each , uniform continuity on gives . Also , and . Thus the dominated convergence theorem gives .
Choose a finite net of radius in . The lower and upper envelopes of over each closed ball are measurable integrable function brackets; the same countable-dense-set argument applies within each such compact ball. Their widths are at most . They cover the whole class, so its bracketing of a function class condition follows. Moreover, dominated convergence shows that is continuous. Both empirical and population functions therefore have a supremum over a common countable dense parameter set. Applying the uniform strong law from finite L1 bracketing proves uniform almost-sure convergence over the entire compact parameter set, rather than merely convergence at each fixed parameter.
For the exponential family,where and . Thus a weak sufficient condition is bounded on , almost surely, and integrability of under the sampling law. No positive lower bound on over the whole real line is required. Zeros off the sampling support are harmless: choose arbitrary finite versions of the log-densities on that common null set when applying the function-class theorem.
If the sampling law is , one convenient assumption is that is a compact subset of the interior of the finite domain of the cumulant function of an exponential family, andOn that interior, is continuous, hence bounded on . Finiteness of at for some implies , hence . The displayed integral gives the remaining integrability. If the observations come from an arbitrary unrelated law, assumptions on and alone cannot control that law's tails; the sampling-law integrability must then be stated explicitly.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 33 1 Solution Created 2026-10-03 Updated 2026-10-07
Write and . A function bracket contains the measurable functions satisfying for every . Require its endpoints to be integrable and call its width. A sufficient condition is that, for every , finitely many brackets of width at most cover the whole class . Under this condition the uniform strong law from finite L1 bracketing statesThe conclusion holds outside a common measurable null set. If the supremum is not initially known to be measurable, this formulation means pathwise convergence on a measurable probability-one event; a pointwise separable function class, including the application below, has a measurable supremum. Pointwise brackets also ensure the sample inequalities hold simultaneously over the class.
To prove the result, choose a finite -cover , . If belongs to bracket , monotonicity of the empirical measure and of expectation givesandConsequentlyApply the strong law of large numbers to these finitely many integrable endpoints. On a probability-one event, the maximum tends to zero. Repeat with , , and intersect the countably many probability-one events. The limiting supremum is bounded by for every , hence is zero. This proves the uniform law of large numbers without a boundedness assumption on the class itself.
For the moment-generating function, use the empirical measure estimatorIf , this estimator and are both identically one. Otherwise, makes increasing in , and provides an integrable envelope. The dominated convergence theorem shows that is continuous on , hence uniformly continuous.
For any , choose a partition so that for every . If , then for every . These endpoint functions form finitely many integrable function brackets with the required widths. The just-proved uniform law of large numbers therefore givesBoth functions of are continuous; their supremum equals the supremum over a countable dense subset, so it is measurable. This proves uniform consistency of an empirical moment-generating function using only the observed sample.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 108 2 Solution Created 2026-10-03 Updated 2026-10-06
The Szemerédi theorem says that for every integer and every , there is such that, for , every with contains a nonconstant arithmetic progressionEquivalently, every subset of the positive integers with positive upper asymptotic density contains arithmetic progressions of every finite length. Length one is immediate.
The Furstenberg multiple recurrence theorem states that for every probability measure-preserving system, every measurable with , and every integer , there is withHere means a preimage, so invertibility is unnecessary. The Furstenberg multiple recurrence theorem also does not assume an ergodic transformation.
We prove the implication to the finite Szemerédi theorem by constructing the Furstenberg correspondence principle explicitly. Suppose, to the contrary, that for fixed and there are and with , but with no length- arithmetic progression of positive common difference. In the binary full shift , encode as , taking all coordinates outside to be zero. Let be the left shift, , and setThe cylinder set is a clopen set, and . The binary full shift is a compact metric space, so compactness of probability measures on a compact metric space gives a subsequence of these empirical measures with weak convergence of probability measures to a Borel probability measure .
For every continuous on the full shift,Passing to the weak limit shows that is an invariant measure for the continuous left shift. Thus is a probability measure-preserving system. Since the indicator function of is continuous, .
Apply the Furstenberg multiple recurrence theorem to . For some , the clopen sethas . Its continuous indicator function gives . For large , at least one in the defining empirical measure therefore belongs to . The choice of left shift impliesso lies in . This contradicts the assumed absence of arithmetic progressions and proves the finite Szemerédi theorem. Applying the finite Szemerédi theorem on intervals where an infinite set has density bounded below proves the stated upper asymptotic density formulation.
For multiple recurrence for circle rotations, write and , with normalized Lebesgue measure , which is the Haar measure of the circle group. Fix a measurable with and . If is rational, there is with the identity, and gives an intersection of measure .
For irrational , the pigeonhole principle applied to in equal arcs gives with . In particular there are arbitrarily small nonzero returns to zero for the irrational rotation of the circle.
We also need translation continuity in L1 on the circle. Given a measurable , approximate its indicator function in the L1 norm by a continuous on the circle group. Such approximation follows from regularity of Lebesgue measure, or approximation by finite unions of intervals. Translation invariance and uniform continuity givewhere the approximation error is first made arbitrarily small. Equivalently, .
Choose a return time so small modulo one that for each ,This is possible because multiplication by each fixed is continuous on the circle group and translation continuity in L1 on the circle applies to the finitely many translates. The union bound now givesThis proves the Furstenberg multiple recurrence theorem for every circle rotation with its normalized Lebesgue measure, including both rational and irrational angles.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 108 1 Solution Created 2026-10-03 Updated 2026-10-05
A continuous transformation of a compact metric space is uniquely ergodic when there is exactly one -invariant Borel probability measure on . We use the usual compact-space convention for unique ergodicity; the compactness and continuity hypotheses matter in the assertion about all starting points.
Let on the circle group, with irrational. Normalized Lebesgue measure is invariant under this irrational rotation of the circle. If is any invariant Borel probability measure, define its Fourier coefficients by . Invariance givesFor , irrationality makes , so ; also . These are the Fourier coefficients of . Hence and have the same integrals against every trigonometric polynomial. Such polynomials are uniformly dense in the continuous functions by the Stone-Weierstrass theorem, so the measures agree on every continuous test function and therefore agree as Borel measures. Thus
For the general uniquely ergodic system, fix and form the empirical measuresOn a compact metric space, the Borel probability measures are compact for weak convergence of probability measures. Any subsequential limit is invariant: for every continuous ,Here is bounded and is continuous, so the identity passes to the limit. Uniqueness of the invariant Borel probability measure gives . Every subsequential limit is therefore , and compactness implies convergence of the entire sequence. Testing against provesIn fact this proves uniform ergodic convergence for uniquely ergodic systems: if convergence were not uniform in , choose and where the discrepancy stays above a fixed positive number. The same compactness and telescoping argument applied to forces a subsequence to converge to , a contradiction. This also makes clear why an almost-everywhere Birkhoff ergodic theorem alone would not establish the requested everywhere assertion. Without the compact-space hypothesis the assertion need not hold: on the discrete space , set and . The only invariant probability is , but the continuous bounded function which is zero at and one on the integer orbit has orbit average one there.
For the decimal application put . This is irrational: if with positive integers , then , contradicting unique prime factorization. Writing with and gives . Its leading decimal digit is seven exactly whenThe half-open upper endpoint correctly excludes powers whose leading digit is eight, including .
The indicator of is not continuous, so an extra step is needed. For any , choose continuous functions on the circle with and , by tapering in small neighbourhoods of the two endpoints. Applying the everywhere averaging result to these functions traps the lower and upper limits of the interval frequency between their integrals. Letting proves everywhere interval frequency under an irrational rotation. ConsequentlyThis is the leading-seven case of Benford frequencies for powers of an integer.
SetSymmetry here means , so and . The bounded Hessian matrix and the fact that is an orthogonal matrix giveThus the particle system is . On the configuration space with norm , its vector field has Lipschitz constant at most :The Picard-Lindelöf theorem gives local existence and uniqueness. Linear growth and the Gronwall inequality give , which rules out escape to infinity in finite time and extends the solution to every .
The associated empirical measure isHere each is a Dirac measure. The finite first absolute moment follows from . Pairing equal particle labels defines a coupling, soConsequently
For a candidate curve , define the velocity field by the convolutionIt is well defined with a finite first absolute moment, because . Equality of mixed partial derivatives givesThe Hessian matrix bound justifies moving a spatial derivative through this convolution. For smooth densities, the transport equation consequently becomes the continuity equationThis form defines the equation for singular probability measures as well. With initial probability measure , a weak solution is a curve in such that every satisfiesUsing smooth test functions gives the same definition by approximation on compact sets. Continuity in the Wasserstein distance bounds first absolute moments on compact time intervals, so the displayed integrals exist.
For the empirical measure, the chain rule and the particle equations giveIntegrating in time, with zero terminal contribution because has compact support, gives precisely the weak identity and the correct initial empirical measure. Thus is a global weak solution. The self-interaction term vanishes since .
For a uniquely ergodic continuous map of a compact metric space, every continuous satisfies uniformly in . Otherwise choose increasingly long orbit empirical measures with a fixed discrepancy. Compactness provides a weak limit; the telescoping identity makes it invariant, so it must be the unique measure , contradicting that discrepancy. Compactness and continuity are essential hypotheses.
Uniform strong law from finite L1 bracketing 2026-10-07
Suppose an integrable measurable-function class can be covered by finitely many function brackets of every positive width. For an independent sample with common law , the empirical measure satisfies on a common probability-one event. For one finite -cover, the supremum is bounded by plus the largest empirical error among its endpoints. The strong law of large numbers makes that finite maximum vanish. Taking a countable sequence of widths decreasing to zero proves the assertion. A measurable supremum can be obtained from a pointwise separable function class; otherwise the probability-one-event formulation expresses the same pathwise conclusion.


