GLOBAL KNOWLEDGE ARK

Mathematics · Article

High-dimensional probability and mathematical learning theory

Connect the geometry of high-dimensional random data with precise mathematical guarantees for prediction, optimization and validation.

Back to Mathematics

After reading, you can

  • Derive Gaussian and sub-Gaussian concentration and use it to bound maxima, covariance error and finite projection distortion.
  • Compute Bayes decisions and separate prediction variance, squared bias and conditional response variability.
  • Prove finite and VC-based uniform learning guarantees using pattern counts and random signs.
  • Use replacement stability and a relative-entropy change of measure to derive learning bounds.
  • Read the bias, variance and identifiability of linear estimates through their singular and restricted directions.
  • Derive convex optimization rates and evaluate risk under independent, grouped or reweighted sampling.
01

From random geometry to prediction guarantees

High-dimensional random vectors have a useful combination of effects. Their total squared length can concentrate while a collection of many coordinates still produces a sizable maximum. A finite set of well-chosen direction tests can control a symmetric matrix, and a random projection can preserve the distances of a fixed point set. Independent Gaussian calculations make the constants visible and show where a rank obstruction interrupts a uniform claim.

The statistical question begins by specifying a loss, a rule class and a fresh-data risk. A fitted rule needs control that survives its dependence on the same observations used to fit it. Finite-class bounds, VC growth, Rademacher complexity, stability and PAC–Bayes inequalities give different mathematical ways to obtain that control. Their assumptions concern the candidate class, the sampling law, the selection rule or the prior.

Linear regression exposes the role of singular directions and penalties through explicit bias and variance. Convex optimization supplies separate guarantees for the quality of a fitted parameter. Finally, independent evaluation, groups and covariate shift show why the unit and distribution of a measurement matter. All numerical examples here have declared sampling models so their conclusions can be compared within those assumptions.

02

Concentrate the squared length of a standard Gaussian vector

Let G=(G₁,…,G_d) have independent standard normal coordinates and write Q=‖G‖₂²=∑G_i². Each G_i has second moment one, so E Q=d by linearity.

The standard Gaussian fourth moment is three. Integrate x⁴φ(x) by parts using φ′(x)=−xφ(x), giving E[G_i⁴]=3E[G_i²]=3. The boundary term vanishes by the Gaussian tail.

Hence Var(G_i²)=3−1=2. Independence makes cross covariances zero, so Var Q=2d and its root-mean-square deviation relative to its mean is √(2d)/d=√(2/d).

Applying Chebyshev to Q/d gives P(|Q/d−1|≥ε)≤2/(dε²) for any ε>0. This describes relative concentration of the squared norm. The probability upper bound can also be capped at one. Related reading: [Concentration of length in high dimensions](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf). The Gaussian model gives exact squared-length mean and variance. These quantify the relative concentration of a particular normalized random vector.

03

Derive a two-sided Gaussian norm tail from a transform

For a standard normal coordinate, evaluating the Gaussian integral gives E e^{tG_i²}=(1−2t)^(−1/2) for t<1/2. Independence yields E e^{tQ}=(1−2t)^(−d/2) for Q=‖G‖²₂.

The upper event Q≥d(1+ε) permits t=ε/[2(1+ε)]>0 in exponential Markov. Substitution gives exp{−d[ε−log(1+ε)]/2}. The lower event Q≤d(1−ε) uses t=−ε/[2(1−ε)]<0 and gives exp{−d[−ε−log(1−ε)]/2}.

For 0<ε<1, ε−log(1+ε) is the integral of s/(1+s) from 0 to ε. Its value is at least ε²/4 because s≤1. Likewise −ε−log(1−ε) integrates s/(1−s) and is at least ε²/2.

Mark both exact deviations from the Gaussian squared norm meanFour dimensions and relative deviation one-half; Colored tails are the events to be bounded. The line is a squared-norm coordinate, not the probability density.Mark both exact deviations from the Gaussian squared norm meanlower 2mean 4upper 6S=∑ Zᵢ²; dimension 4; relative deviation 1/2.Lower-side tail: P(S≤2) ≤ exact bound (≈ 0.67957).Upper-side tail: P(S≥6) ≤ exact bound (≈ 0.827729).These are two one-sided upper bounds, with natural logarithms.0
Colored tails are the events to be bounded. The line is a squared-norm coordinate, not the probability density.

The χ² moment formula applies to the sum of independent squared standard Gaussian coordinates. Optimizing the exponential Markov inequality on each side gives the displayed distinct logarithmic exponents.

Exact Gaussian thresholds
QuantityExact result
Lower threshold2
Upper threshold6
Lower-tail probability upper boundexp(−4/2·(−1/2−ln(1−1/2))) ≈ 0.67957
Upper-tail probability upper boundexp(−4/2·(1/2−ln(1+1/2))) ≈ 0.827729
Exact inputs and supporting calculations
Declared inputs
ParameterValue
k4
delta1/2

The sum of the two bounds is at most 2 exp(−dε²/8). The common exponent applies to both events, even though the lower-tail estimate alone gives the stronger constant. Related reading: [Exponential chi-square tails](https://projecteuclid.org/journals/annals-of-statistics/volume-28/issue-5/Adaptive-estimation-of-a-quadratic-functional-by-model-selection/10.1214/aos/1015957395.pdf), [Concentration of length in high dimensions](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf). The Gaussian transform gives the upper and lower saddle exponents. The displayed elementary integral inequalities lead to this lesson’s relative bound.

04

Compute the geometry of a uniformly random direction

An orthogonal transform of a standard Gaussian vector has the same Gaussian density, since it preserves length and volume. As G is almost surely nonzero, U=G/‖G‖ is well defined and is invariant in distribution under every orthogonal transform.

Sign reflections give E U_i=0 and E U_iU_j=0 for i≠j. Permutations make E U_i² the same for every i, and ∑U_i²=1 gives E U_i²=1/d. Hence E[UUᵀ]=I_d/d.

For a fixed unit vector a, E[a·U]=0 and Var(a·U)=aᵀE[UUᵀ]a=1/d. For arbitrary a its variance is ‖a‖²/d by the same quadratic identity.

If U,V are independent draws, conditioning on U keeps V’s second-moment matrix unchanged. Thus E[(U·V)²|U]=Uᵀ(I_d/d)U=1/d almost surely, and the unconditional second moment is also 1/d. Related reading: [Uniform directions from Gaussian vectors](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf). Orthogonal invariance, reflections and the unit-length constraint determine the second-moment matrix and projection variance.

05

Control the maximum of Gaussian-scaled coordinates

For every coordinate assume E exp(tX_i)≤exp(σ²t²/2) for real t. For σ>0, Markov with t=u/σ² bounds P(X_i≥u) by exp(−u²/(2σ²)). The same argument for −X_i bounds the other tail.

Summing over the two signs and all d coordinates gives P(max_i|X_i|≥u)≤2d exp(−u²/(2σ²)). A union bound needs only marginal estimates, even when the coordinate events are dependent.

For t>0, exp(t max_i|X_i|) is at most ∑_i[exp(tX_i)+exp(−tX_i)]. Jensen then gives E max_i|X_i|≤log(2d)/t+σ²t/2.

The positive minimizer t=√(2log(2d))/σ gives σ√(2log(2d)). If σ=0, Markov with t tending to infinity gives P(|X_i|≥u)=0 for every u>0, and the maximum is zero almost surely. Related reading: [Sub-Gaussian moments and sums](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf). Marginal moment estimates give both an exponential union bound and a bound on the expected maximum by a finite exponential sum.

06

Combine independent sub-Gaussian variables with weights

Let X_i be independent centered variables with E e^{tX_i}≤e^{σ_i² t²/2} for all real t. For a weighted sum Y=∑a_iX_i, independence gives E e^{tY}=∏ E e^{ta_iX_i}.

Each factor is at most e^{σ_i²a_i² t²/2}, so the product bound is e^{Vt²/2} with V=∑a_i²σ_i². Centering is preserved by the linear combination.

If V>0, choosing t=u/V in exponential Markov gives P(Y≥u)≤e^{−u²/(2V)}. Apply the same calculation to −Y and sum to get P(|Y|≥u)≤2e^{−u²/(2V)} for u>0.

If V=0, the bound E e^{tY}≤1 for every t lets exponential Markov drive both positive and negative tails to zero for any u>0. Thus Y is almost surely zero. The proxy V is an upper-bound parameter and equals the variance when each moment bound is exact. Related reading: [Sub-Gaussian moments and sums](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf). The weighted-sum transform factors under independence and squares the weights inside the stated variance proxy.

07

Prove Hoeffding’s bounded-variable moment estimate

Let X be supported in [a,b] and put Y=X−EX. Write φ(t)=log E e^{tY}. Boundedness allows two derivatives under the expectation, with φ(0)=φ′(0)=0 and φ″(t)=Var_t(Y) for the probability law tilted by e^{tY}.

The support interval of the tilted law has the same length b−a. Its variance is no larger than its mean square distance from the midpoint, bounded by (b−a)²/4. Therefore φ″(t)≤(b−a)²/4 for all t.

Taylor’s integral form along the segment from 0 to t yields φ(t)≤t²(b−a)²/8 for every real t. For n independent centered observations with that common support length, the average has moment proxy (b−a)²/(4n).

Optimization of the exponential bound gives P(|X̄−E X̄|≥u)≤2 exp(−2nu²/(b−a)²) for u>0 and b>a. For b=a every variable is constant, so the corresponding probability is zero. Related reading: [Independent bounded-variable concentration](https://www.cs.rpi.edu/academics/courses/spring06/random/hoefding.pdf). The source states the bounded independent tail bound. The tilted-variance argument supplies the log-moment proof and its two-sided form here.

08

Prove concentration for a function with bounded coordinate effects

Let f depend on independent X₁,…,X_n with absolute change at most c_i when only X_i varies. Set M_i=E[f|X₁,…,X_i], so M_n=f, M_0=Ef and D_i=M_i−M_{i−1} has conditional mean zero.

With the past fixed, the average over future coordinates defines a function of X_i. The distribution of the future stays the same for either value of X_i, and pointwise differences in f are bounded by c_i. Thus the conditional range of D_i has length at most c_i.

The bounded-variable moment inequality now gives E[e^{tD_i}|X₁,…,X_{i−1}]≤exp(t²c_i²/8). Iterating conditional expectation shows E e^{t(f−Ef)}≤exp(t²∑c_i²/8).

For ∑c_i²>0 the exponential optimization yields P(f−Ef≥u)≤exp(−2u²/∑c_i²). Applying it to −f gives the two-sided version with prefactor two. Zero total range gives f constant almost surely under the same argument. Related reading: [The independent bounded-differences inequality](https://www.math.cmu.edu/~ctsourak/T797003/Readings/concentration/mcdiamird-conc-survey.pdf), [Independent bounded-variable concentration](https://www.cs.rpi.edu/academics/courses/spring06/random/hoefding.pdf). Bounding the conditional range of each Doob increment lets the independent-coordinate hypothesis enter the martingale argument precisely.

09

Construct a small Euclidean net on a sphere

Take 0<ε and consider the Euclidean unit sphere in ℝᵈ with d≥1. Choose points successively so that each new point has distance greater than ε from the previous ones, stopping if their closed ε-balls cover the sphere.

Open balls of radius ε/2 around the chosen points are pairwise disjoint and are contained in the ball of radius 1+ε/2 centered at zero. The containment follows from the triangle inequality.

If there are M points, volume in dimension d gives M(ε/2)^d≤(1+ε/2)^d after canceling the unit-ball volume. Thus the construction cannot choose more than (1+2/ε)^d points.

It terminates in finitely many choices, as also follows from the total boundedness of a compact sphere. At termination every sphere point is within ε of one chosen point. This gives the net in ambient Euclidean distance. Related reading: [A volume bound for small nets](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf). A maximal separated set covers the sphere, and the disjoint Euclidean balls give the ambient-dimensional volume ratio.

10

Control a symmetric operator from its net quadratic values

For a real symmetric A the spectral theorem gives a unit vector u such that |uᵀAu|=‖A‖op. Select a net point v of norm one within ε of u.

The difference is uᵀAu−vᵀAv=(u−v)ᵀAu+vᵀA(u−v). By Cauchy–Schwarz and the operator norm definition, its absolute value is at most 2ε‖A‖op.

Therefore ‖A‖op≤max_v|vᵀAv|+2ε‖A‖op. Moving the last term to the left and dividing by the strictly positive 1−2ε gives the claimed inequality.

Every tested value is itself at most ‖A‖op, so the net controls the whole norm within this factor. Symmetry supplies the starting quadratic characterization, which would fail for a nonzero real skew-symmetric matrix. Related reading: [Quadratic tests on a net and covariance estimation](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf). The symmetric quadratic characterization and a nearest net point control the difference by twice the covering radius times the operator norm.

11

Bound the Gaussian sample covariance from finitely many directions

Let X₁,…,X_n be independent N(0,I_d) and set S=n⁻¹∑X_iX_iᵀ. For a fixed unit v, n vᵀSv=∑(v·X_i)² has the chi-square law with n degrees of freedom.

Choose a deterministic 1/4-net of the sphere with ≤9^d points. The directional bound and a union bound give P(max_v|vᵀ(S−I)v|≥ε)≤2·9^d exp(−nε²/8) for 0<ε<1.

The symmetric net estimate at radius 1/4 multiplies the maximum by at most two. Thus ‖S−I‖op≤2ε with probability at least 1−δ once n≥(8/ε²)[d log 9+log(2/δ)] with 0<δ<1.

The empirical matrix here uses a known mean of zero. Estimating the mean would change the matrix and its exact directional identity, so the proof states the sample convention at the start. Related reading: [Quadratic tests on a net and covariance estimation](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf), [Exponential chi-square tails](https://projecteuclid.org/journals/annals-of-statistics/volume-28/issue-5/Adaptive-estimation-of-a-quadratic-functional-by-model-selection/10.1214/aos/1015957395.pdf). Each fixed Gaussian direction has an exact chi-square sample law. A deterministic net converts those bounds into one covariance control event.

12

Prove a finite-set Gaussian distance preservation statement

Take a fixed set of k≥2 distinct points in ℝᵈ and an m by d matrix A of independent N(0,1/m) entries. For each fixed nonzero pair difference z, the vector Az has independent N(0,‖z‖²/m) coordinates.

Hence ‖Az‖²/‖z‖² has the law of a chi-square variable with m degrees of freedom divided by m. The probability it leaves 1±ε is at most 2exp(−mε²/8) for 0<ε<1.

There are M=k(k−1)/2 pairs. Their events can share the same matrix, but the union bound still gives failure probability at most 2M exp(−mε²/8). A sufficient integer is m≥ceil((8/ε²)log(2M/δ)).

On the complement, every squared distance is preserved within the same relative tolerance. If the set has at most one point there are no comparisons to enforce. The conclusion is for fixed pair differences and imposes no all-vector lower bound. Related reading: [Finite-set distance preservation](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf), [Exponential chi-square tails](https://projecteuclid.org/journals/annals-of-statistics/volume-28/issue-5/Adaptive-estimation-of-a-quadratic-functional-by-model-selection/10.1214/aos/1015957395.pdf). The argument tests the finite pair differences. Their marginal Gaussian length tails yield the simultaneous projection dimension.

13

Find a rank obstruction to uniform covariance approximation

Each matrix X_iX_iᵀ has range in span{X_i}. Thus the range of their sum is contained in the span of the n observed vectors, which has dimension at most n.

If n<d, choose a unit u orthogonal to that span. Then S u=0 for S=n⁻¹∑X_iX_iᵀ, so (S−I)u=−u and ‖S−I‖op≥1.

The null space has dimension at least d−n by rank–nullity. This obstruction is deterministic and survives any distribution of the vectors, provided the stated uncentered second-moment form is used.

Compute the exact directional variance before testing a uniform boundTwo samples in three dimensions miss an axis; Each row is both the diagonal entry and eigenvalue in that coordinate. Signed deviations reveal which directions vary more or less than the identity.Compute the exact directional variance before testing a uniform boundAxisEigenvalue of Σ̂Signed deviation from 1Null direction?e01/2−1/2Falsee11/2−1/2Falsee20−1TrueUncentered covariance on 2 samples.Rank 2; ‖Σ̂−I‖op=1.Null directions: e2.Identity reference λ=1 on every basis axis.
Each row is both the diagonal entry and eigenvalue in that coordinate. Signed deviations reveal which directions vary more or less than the identity.

A sample covariance spans only the observed vectors. A missing direction forces error at least one, but full rank alone does not imply close agreement with the identity.

Exact sample-covariance test
QuantityExact result
Diagonal(1/2, 1/2, 0)
Rank2
Signed deviation from I(-1/2, -1/2, -1)
Operator distance1
Null basis axese2
Exact inputs and supporting calculations
Declared inputs
ParameterValue
d3
axes[[0,1],[1,1]]

A finite-set projection tests only the listed pair directions. Its map may have a kernel disjoint from those nonzero differences. An all-vector estimate would include every kernel direction and therefore face the rank obstruction. Related reading: [Quadratic tests on a net and covariance estimation](https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-1.pdf), [Row space, nullspace and singular directions](https://web.mit.edu/~linalg/webpage/Essays/newpaper_ver3.pdf). The rank bound produces a null direction with unit covariance error, while a finite difference set can avoid that kernel.

14

Decompose expected squared prediction error

Fix a feature value x for which the conditional second moment is finite. Write m=E[Y|X=x] and v=Var(Y|X=x). Let T be the training-based predictor at x. Conditional on x, assume T has a finite second moment and is independent of the fresh test response.

Write Y−T=(Y−m)+(m−T). The cross term has conditional expectation zero, because conditioning on T and x leaves E[Y−m|T,x]=0. The expected squared error is therefore v+E[(T−m)²|x].

Put a=E[T|x]. Expanding T−m=(T−a)+(a−m) and using E[T−a|x]=0 gives Var(T|x)+(a−m)² for the remaining term.

Thus the three terms are the response variance, a squared conditional bias and the training variation of the prediction. The identity integrates over test x when the conditional quantities are integrable. Training–test dependence would require checking the cross term again. Related reading: [The expected squared-test-error decomposition](https://www.teach.cs.toronto.edu/~csc311notes/bias_variance_decomposition/bv.html). The remaining conditional response variance and the two training-prediction terms come from exact squared-error expansions.

15

Derive the Bayes classifier and its excess binary risk

For Y∈{0,1}, the conditional risk at x of predicting zero is η(x), and the risk of predicting one is 1−η(x). A Bayes rule takes one when η≥1/2 and zero when η<1/2.

The conditional minimum is min(η,1−η), so a measurable choice of this rule gives population risk E[min(η(X),1−η(X))]. At η=1/2 both actions have the same conditional risk.

If a classifier h agrees with the Bayes choice, its conditional excess is zero. If it differs, the excess is the larger of η and 1−η minus the smaller, namely |2η−1|. At a tie this formula is again zero.

Compute conditional mistakes and weight them by each point massWrong decision at one of two points; Each excess contribution is counted only at a point where the supplied action has higher conditional risk.Compute conditional mistakes and weight them by each point massPointηBayes actionGiven actionWeighted excess01/4011/413/4110Prediction costs 1 only when it disagrees with the true label.Bayes risk 1/4; given risk 1/2; excess 1/4.A tie at η=1/2 allows either action with zero excess.Point 0 (mass 1/2): Bayes 1/8, given 3/8; excess 1/4.Point 1 (mass 1/2): Bayes 1/8, given 1/8; excess 0.
Each excess contribution is counted only at a point where the supplied action has higher conditional risk.

The Bayes action minimizes the conditional error at each input before averaging. A tie contributes equal risks regardless of which action is chosen.

Exact binary decision risks
QuantityExact result
Bayes decision at each point0, 1
Bayes risk1/4
Given risk1/2
Excess risk1/4
Exact inputs and supporting calculations
Declared inputs
ParameterValue
w["1/2","1/2"]
eta["1/4","3/4"]
g[1,1]
Pointwise risk contributions
PointWeightBayes contributionSupplied contributionExcess
01/21/83/81/4
11/21/81/80

Integrating gives R(h)−R(h*)=E[|2η(X)−1|·1{h(X)≠h*(X)}]. This shows how the location of disagreements matters in addition to their probability. Related reading: [The Bayes optimal binary decision](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf). The conditional risk comparison determines the optimal binary decision and gives the margin-weighted disagreement identity.

16

Relate empirical minimization to population risk

Let D=sup_{h∈H}|R̂(h)−R(h)| for the observed sample. Suppose the fitted ĥ satisfies R̂(ĥ)≤inf_{h∈H}R̂(h)+α with α≥0.

For any fixed comparison rule h in the same class, split the difference into R(ĥ)−R̂(ĥ), R̂(ĥ)−R̂(h), and R̂(h)−R(h). The first and last terms are at most D separately.

The approximate minimization property gives R̂(ĥ)−R̂(h)≤α. Summation proves R(ĥ)−R(h)≤2D+α for each such comparator.

The reasoning is deterministic for a sample on which the uniform bound holds. It also implies R(ĥ)≤inf_{h∈H}R(h)+2D+α by taking the infimum over comparators, without assuming that a population minimizing rule exists. Related reading: [Empirical risk and finite-class generalization](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf). The empirical comparator inequality allows a finite optimization error, and two uniform loss deviations transfer it to population risk.

17

Prove a finite-class uniform learning guarantee

Let H contain M≥1 fixed rules with losses in [0,1] and let the observations be iid. For a given h, its independent loss values have expectation R(h), so Hoeffding gives P(|R̂(h)−R(h)|≥t)≤2e^{−2nt²}.

A union bound over the M rules implies P(sup_h|R̂(h)−R(h)|≥t)≤2M e^{−2nt²}. A rule selected from H after looking at the sample is still covered on the simultaneous event.

For δ in (0,1), take t=√[log(2M/δ)/(2n)]. With probability at least 1−δ every empirical risk differs from its population counterpart by at most t.

Solve the Hoeffding union bound before taking the ceilingEight functions, tolerance one-quarter; The two rows straddle the confidence target. The smaller row is not certified by this particular inequality.Solve the Hoeffding union bound before taking the ceilingn2M exp(−2nε²)At most δ?400.107807152No410.095139478YesM=8, ε=1/4, δ=1/10.Real threshold 40.601390522; least sufficient integer 41.This is a sufficient guarantee from the stated inequality.
The two rows straddle the confidence target. The smaller row is not certified by this particular inequality.

Apply the two-sided Hoeffding bound to each bounded-loss function and union bound over the finite class. This calculation provides a sufficient size, not a general lower bound.

Exact finite-class certificate
QuantityExact result
Analytic thresholdln(2·8/(1/10))/(2(1/4)²)
Sufficient n41
Bound at n−10.107807152
Bound at n0.0951394777
Exact inputs and supporting calculations
Declared inputs
ParameterValue
M8
eps1/4
delta1/10

An α-approximate empirical minimizer then satisfies R(ĥ)−inf_h R(h)≤2t+α by the deterministic comparison. The class and any construction used to define it must meet the fixed-class assumption before this concentration is applied. Related reading: [Empirical risk and finite-class generalization](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf), [Independent bounded-variable concentration](https://www.cs.rpi.edu/academics/courses/spring06/random/hoefding.pdf). Each fixed loss has an independent-sample deviation bound, and the finite union makes it simultaneous over the entire fitted class.

18

Show why pointwise training guarantees cannot be used after arbitrary fitting

Take X uniform on N feature values and Y a fair bit independent of X and of the other observations. Conditional on a training sample and any independent learner randomness, the resulting classifier is fixed and the fresh label is still fair at each x.

Consequently its conditional population classification error is exactly 1/2, since either prediction disagrees with a fair test label with probability 1/2. This holds for every realized fit.

For i<j the probability that training features X_i and X_j coincide is 1/N. The union bound gives probability at least 1−n(n−1)/(2N) of all features being distinct, with a lower bound of zero whenever the expression is negative.

On that event the class of all binary tables contains a classifier agreeing with every observed label, by assigning those labels individually and filling the unobserved entries arbitrarily. A zero empirical error therefore coexists with conditional population error 1/2. Related reading: [Empirical risk and finite-class generalization](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf), [Unseen labels and finite-domain learning limits](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf). A fitted binary table can remember every observed independent label on the distinct-feature event. A fresh independent fair label still yields error one half.

19

Prove the Sauer bound on restriction patterns

A family of binary strings shatters a coordinate set if each binary pattern on it occurs. Let H be the restriction family on n distinct coordinates with shattering dimension at most v. If n=0 it has at most one pattern. If v=0 it has at most one pattern because two distinct strings differ on at least one coordinate.

Project to the first n−1 coordinates. Let A contain prefixes with at least one admitted extension and B those with both last bits. Counting the two possibilities shows |H|=|A|+|B|.

Any set shattered by A is shattered by H on the same first coordinates, so A has dimension at most v. If B shatters a set of size v, then H shatters those coordinates plus the last, which is impossible. Thus B has dimension at most v−1 when B is nonempty.

For 0<v<n, induction bounds the two sizes by the binomial sums for (n−1,v) and (n−1,v−1). Pascal’s identity combines them into ∑_{j=0}^v C(n,j). When v≥n all binary strings already fit the value 2ⁿ of the capped sum. Related reading: [The Sauer–Shelah–Perles growth inequality](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf). Projecting away the last coordinate separates prefixes that permit one or both extensions. The induction follows Pascal’s identity.

20

Derive expectation symmetrization with a ghost sample

Let F be a class of measurable real functions with a common measurable envelope H such that |f(z)|≤H(z) for every f and E[H(Z)]<∞. Take F countable or assume all suprema used below are measurable. For iid Z_i and independent copies Z_i′, E′[n⁻¹∑f(Z_i′)]=Pf for each f.

Taking the supremum after the conditional expectation cannot exceed taking it inside. Thus E sup_f(Pf−P_nf)≤E sup_f n⁻¹∑[f(Z_i′)−f(Z_i)].

Let ε_i be independent fair signs independent of both samples. Pair-swapping the samples according to the signs preserves their joint law, so the last expectation equals E sup_f n⁻¹∑ ε_i[f(Z_i′)−f(Z_i)].

The supremum of this difference is bounded by the sum of two suprema, one on each sample, and each expectation is the same by symmetry of the signs. The upper bound is 2E sup_f n⁻¹∑ε_i f(Z_i). For absolute deviations apply the result to F together with its negatives. Related reading: [Signed complexity and finite evaluation sets](https://sml.inf.ethz.ch/gml23/files/lec4-handout.pdf). An independent ghost sample replaces the population integral, and pair swapping introduces signs before the two suprema are bounded.

21

Prove a finite-vector Rademacher estimate

For v in a finite family V of M vectors, write A_v=n⁻¹∑ε_i v_i, with ε_i independent fair signs and ‖v‖₂≤B. The moment transform is a product of cosh terms, each at most exp(t²v_i²/(2n²)). This follows from the bounded centered moment estimate for a signed constant.

Thus E exp(tA_v)≤exp(t²B²/(2n²)). Since exp(t max_v A_v)≤∑_v exp(tA_v) for t>0, Jensen yields E max_v A_v≤log M/t+tB²/(2n²).

When M>1 and B>0, choose t=(n/B)√(2log M). The right side becomes (B/n)√(2log M), which is the finite-vector estimate.

For M=1, the maximum is a single centered linear combination and the expectation is zero. When B=0 every vector vanishes. Both cases agree with the corresponding limiting bound. Related reading: [Signed complexity and finite evaluation sets](https://sml.inf.ethz.ch/gml23/files/lec4-handout.pdf). The finite collection of sign sums admits an exponential-moment bound at their common radius, including a zero expected maximum for a singleton.

22

Combine growth, Rademacher bounds and concentration

Let H be a measurable binary classifier class with VC dimension v under 0–1 loss. Assume the suprema are measurable, for instance by countability. On a sample of n feature-label pairs, loss strings are prediction strings with a coordinate-wise bit flip wherever the observed label is one.

Thus the number of loss strings is at most Π=∑_{j=0}^{min(v,n)} C(n,j) by Sauer, with duplicate feature positions contributing no additional patterns. Each loss vector has norm at most √n. Including their negatives gives at most 2Π vectors of the same norm.

Expectation symmetrization and the finite-vector signed bound give E D≤2√[2log(2Π)/n] for D=sup_h|R(h)−R̂(h)|. This bound is valid for each n≥1 and can be capped by one.

Replacing a single data point changes every empirical loss by at most 1/n, so D has the same bounded replacement effect. With probability at least 1−δ, D≤2√[2log(2Π)/n]+√[log(1/δ)/(2n)] by the one-sided concentration of D itself. Related reading: [Signed complexity and finite evaluation sets](https://sml.inf.ethz.ch/gml23/files/lec4-handout.pdf), [The Sauer–Shelah–Perles growth inequality](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf), [The independent bounded-differences inequality](https://www.math.cmu.edu/~ctsourak/T797003/Readings/concentration/mcdiamird-conc-survey.pdf). The binary loss vectors inherit the growth count, the signed finite-vector bound controls expectation, and bounded differences adds its confidence term.

23

Compute two basic VC dimensions

On the line, two distinct ordered points can be selected individually, together or neither by an interval. Among any three ordered points an interval containing the first and last contains the middle, so that three-pattern family is incomplete. The VC dimension is two.

For affine halfspaces in ℝᵈ, choose d+1 affinely independent points, so the augmented vectors (x_i,1) form a basis of ℝ^{d+1}. For any labels, solve a linear system assigning affine scores +1 to positive points and −1 to negative points.

For any d+2 points there is a nonzero affine dependence ∑λ_i(x_i,1)=0. Since ∑λ_i=0, some coefficients are positive and some negative. Assign label one to λ_i>0 and zero to λ_i<0, with arbitrary labels at zero coefficients.

Use label one for affine score s≥0 and label zero for s<0. If the assignment were realized, the terms λ_i s_i would be nonnegative for positive λ and strictly positive for negative λ. Their sum would be positive, contradicting ∑λ_i s_i=0. Hence the dimension is d+1. Related reading: [The VC dimension of intervals](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf), [Affine halfspaces and VC dimension](https://perso.ens-lyon.fr/aurelien.garivier/www.math.univ-toulouse.fr/_agarivie/sites/default/files/8_linearClassifiers_19.pdf). Intervals use their order structure. Affine halfspaces use a basis of augmented points and a dependence that respects the equality convention.

24

Bound linear Rademacher complexity under a norm constraint

Fix vectors x₁,…,x_n with ‖x_i‖₂≤R and take linear scores f_w(x)=w·x with ‖w‖₂≤B. The conditional signed supremum is (B/n)‖∑ε_i x_i‖₂ by Euclidean duality, including the zero-sum case.

Since the signs are independent, centered and have square one, E_ε ‖∑ε_i x_i‖²₂=∑‖x_i‖²₂. Each cross term has zero sign expectation.

By Cauchy–Schwarz the expected norm is at most the square root of this sum, no larger than R√n. Thus the conditional complexity is at most BR/√n, with the sharper form (B/n)√(∑‖x_i‖²₂).

The bound concerns real-valued score functions at the stated norms. Converting it to a loss complexity would require a controlled loss transformation, and a binary shattering statement would use a separate class argument. Related reading: [Signed complexity and finite evaluation sets](https://sml.inf.ethz.ch/gml23/files/lec4-handout.pdf). The conditional supremum becomes the Euclidean dual norm. Independent signs remove cross terms from its second moment.

25

Derive uniform stability for a strongly convex regularizer

Let F_S(w)=n⁻¹∑ℓ(w,Z_i)+r(w) with all losses convex and L-Lipschitz on a convex set and r λ-strongly convex there. Assume the minimum is attained, and let w and w′ be the minimizers for samples that differ by replacing Z_i by Z_i′.

For any minimizer w of a λ-strongly convex objective, F_S(w′)−F_S(w)≥(λ/2)‖w−w′‖². This follows by applying strong convexity to (1−t)w+tw′, using minimality and sending t↓0. The analogous inequality holds with S′ and the two minimizers reversed.

Add these inequalities. The common regularizer and common n−1 losses cancel, giving λ‖w−w′‖²≤[ℓ(w′,Z_i)−ℓ(w,Z_i)+ℓ(w,Z_i′)−ℓ(w′,Z_i′)]/n≤(2L/n)‖w−w′‖.

Hence ‖w−w′‖≤2L/(λn), including the zero-difference case. At any test datum the loss changes by at most L times this difference, so the uniform stability constant is at most 2L²/(λn). Related reading: [Stability of a regularized empirical minimizer](https://www.jmlr.org/papers/volume2/bousquet02a/bousquet02a.pdf). Strong convexity puts a quadratic lower bound on the two objective changes, and a single replaced loss bounds their residual difference.

26

Convert uniform stability into expected generalization

Let S=(Z₁,…,Z_n) be iid, and suppose the learner A changes the loss at every test point by at most β when one training point is replaced. Assume the expected risks exist. Any learner randomness can be held to the same independent seed for the two fits.

Let Z_i′ be an independent copy and S^{(i)} replace Z_i by Z_i′. For each i, E R(A(S))=E ℓ(A(S),Z_i′), since Z_i′ has the fresh observation law.

Swapping Z_i and Z_i′ preserves their joint law with the other observations. Therefore E ℓ(A(S),Z_i′)=E ℓ(A(S^{(i)}),Z_i). Subtracting E ℓ(A(S),Z_i) from each term yields the signed generalization gap upon averaging over i.

Every integrand ℓ(A(S^{(i)}),Z_i)−ℓ(A(S),Z_i) lies between −β and β by uniform stability, so the same bound holds for the expected signed gap. A concentration claim for an individual dataset would need additional reasoning. Related reading: [Replacement and expected generalization](https://www.jmlr.org/papers/volume2/bousquet02a/bousquet02a.pdf). Exchanging an observation and its fresh copy makes the expected signed generalization gap a mean of controlled replacement differences.

27

Prove a finite relative-entropy variational inequality

For a finite rule set let p_i>0 be a probability mass function, let f_i be real scores, and set Z=∑p_i e^{f_i}. The tilted distribution r_i=p_i e^{f_i}/Z is positive.

For any distribution q, with 0 log 0 interpreted as zero in the sums, expand D(q‖r)=∑q_i log(q_i/p_i)−∑q_i f_i+log Z.

Nonnegativity follows from log x≤x−1 applied to log(r_i/q_i) at q_i>0, giving −D(q‖r)≤∑_{q_i>0}r_i−1≤0. Thus ∑q_i f_i≤D(q‖p)+log Z.

Taking q=r makes the divergence to r vanish and shows the bound is attained. Positivity of the prior ensures that every finite posterior used here has a well-defined finite relative entropy. Related reading: [PAC–Bayes change of measure](https://arxiv.org/pdf/1307.2118#page=14). The finite tilted prior makes the difference between the log moment and the posterior score a relative-entropy calculation.

28

Derive a fixed-temperature PAC–Bayes risk inequality

Fix λ>0 before observing an iid sample of size n. For each fixed rule h with loss in [0,1], Hoeffding’s moment inequality gives E exp(λ[R(h)−R̂(h)])≤exp(λ²/(8n)).

For the positive data-independent finite prior p, sum these inequalities with weights p_h. The nonnegative random sum Z=∑p_h exp(λ[R(h)−R̂(h)]) has expectation at most exp(λ²/(8n)).

Markov gives an event of probability at least 1−δ on which log Z≤λ²/(8n)+log(1/δ). On that event the finite variational inequality applies pointwise to all probability distributions q over the rules.

Consequently E_q R≤E_q R̂+[D(q‖p)+log(1/δ)]/λ+λ/(8n) simultaneously for all q, including a data-dependent one. These risks average losses of sampled rules. The event was constructed for the fixed λ. Related reading: [PAC–Bayes change of measure](https://arxiv.org/pdf/1307.2118#page=14), [Independent bounded-variable concentration](https://www.cs.rpi.edu/academics/courses/spring06/random/hoefding.pdf). A fixed moment temperature gives one high-probability event valid for all posteriors through the change-of-measure inequality.

29

Compute fixed-design least-squares variability

Let the n by d design X have full column rank and y=Xβ+ε with E ε=0 and Cov ε=σ²I after the design is fixed. The least-squares normal equations give β̂=(XᵀX)⁻¹Xᵀy.

Thus β̂−β=(XᵀX)⁻¹Xᵀε. Its conditional mean is zero, so β̂ is unbiased under the written noise assumptions.

Multiplying the noise covariance on the left and its transpose on the right gives Cov(β̂|X)=σ²(XᵀX)⁻¹. Normality of ε is unnecessary for this second-moment calculation.

Use the design energy as the exact denominatorTwo nonzero design rows; The last two columns are the numerator and denominator contributions for through-origin scalar least squares.Use the design energy as the exact denominatorRowxyxyx²01221125104Fixed design, no intercept; common independent error variance 1.Numerator Σxy=12; denominator Σx²=5.β̂=12/5, Var(β̂)=1/5.(1,2)(2,5)Orange points, green fitted line through the origin.xy
The last two columns are the numerator and denominator contributions for through-origin scalar least squares.

When Σx²>0, the estimation error β̂−β is a fixed linear combination of the independent errors, so Var(β̂)=σ²/Σx². With a zero design the objective is independent of β.

Exact fixed-design variance
QuantityExact result
Σxy12
Σx²5
Slope12/5
Variance of slope1/5
Exact inputs and supporting calculations
Declared inputs
ParameterValue
x[1,2]
y[2,5]
sigma21

The expected squared coefficient error is the trace of this covariance, σ²∑_{j=1}^d 1/s_j² for the positive singular values of X. A small singular value creates a large variance along its corresponding right singular vector. Related reading: [Row space, nullspace and singular directions](https://web.mit.edu/~linalg/webpage/Essays/newpaper_ver3.pdf), [Ridge’s estimator and variance decomposition](https://homepages.math.uic.edu/~lreyzin/papers/ridge.pdf). The full-rank fixed design and centered spherical noise assumptions determine the covariance and trace through the Gram eigenvalues.

30

Derive ridge’s spectral shrinkage and its bias and variance

For ridge use the objective ‖y−Xw‖²/2+λ‖w‖²/2 with λ>0. Then ŵ=(XᵀX+λI)⁻¹Xᵀy. Write the rank-r singular terms of X as s_j u_j v_jᵀ and complete the v_j to an orthonormal basis.

With y=Xβ+ε and centered noise, the j-th fitted coordinate for j≤r is [s_j²/(s_j²+λ)]β_j+[s_j/(s_j²+λ)]u_jᵀε. In each null direction the fitted coordinate is zero, since Xᵀy has no such component.

Thus the squared bias is ∑_{j≤r}[λ/(s_j²+λ)]² β_j²+∑_{j>r}β_j². With centered noise of covariance σ²I, the coordinate variances are σ²s_j²/(s_j²+λ)² for j≤r and zero in the null space.

Distinct fitted coordinates have zero conditional covariance because their left singular directions are orthogonal and the noise covariance is σ²I. This yields the total expected squared error by adding all squared biases and variances. Related reading: [Ridge’s estimator and variance decomposition](https://homepages.math.uic.edu/~lreyzin/papers/ridge.pdf), [Row space, nullspace and singular directions](https://web.mit.edu/~linalg/webpage/Essays/newpaper_ver3.pdf). Each singular direction gives an explicit shrinkage and noise coefficient. The lesson adds the null-direction bias and zero fitted variance.

31

Characterize minimum-norm least squares in a rank-deficient design

Use a rank-r singular decomposition X=∑_{j≤r}s_j u_j v_jᵀ with positive s_j. For w written in the full right orthonormal basis, the j-th fitted left coordinate is s_j⟨v_j,w⟩.

Decompose y into its projection onto the column space and its orthogonal remainder. Only the projected part can be fitted, so least squares requires ⟨v_j,w⟩=⟨u_j,y⟩/s_j for every j≤r.

All remaining components of w are arbitrary in ker X. The particular w†=∑_{j≤r}v_j⟨u_j,y⟩/s_j has no null component, and orthogonality makes ‖w†+z‖²=‖w†‖²+‖z‖² for z∈ker X.

Thus w† is the unique minimum-norm minimizer. In the mean model Xβ, a linear parameter functional a·β is identifiable exactly when a is orthogonal to ker X. Otherwise two parameters differing by a null vector can give the same mean and different values. Related reading: [Row space, nullspace and singular directions](https://web.mit.edu/~linalg/webpage/Essays/newpaper_ver3.pdf). All minimizers share the fitted row-space component. The perpendicular null part controls Euclidean norm and nonidentifiability.

32

Derive the Lasso basic inequality and a restricted prediction bound

Set y=Xβ+ε, S=supp β, Δ=ŵ−β, and choose λ>0 with λ≥2‖Xᵀε/n‖∞. Let ŵ minimize ‖y−Xw‖²/(2n)+λ‖w‖₁. Comparing the penalized objective at ŵ and β and expanding gives ‖XΔ‖²/(2n)≤εᵀXΔ/n+λ(‖β‖₁−‖β+Δ‖₁).

The noise term is at most (λ/2)‖Δ‖₁ by duality. The penalty difference is at most ‖Δ_S‖₁−‖Δ_{Sᶜ}‖₁ from the triangle inequality and β_{Sᶜ}=0. Together they give ‖XΔ‖²/(2n)≤(3λ/2)‖Δ_S‖₁−(λ/2)‖Δ_{Sᶜ}‖₁.

Nonnegative prediction error therefore implies ‖Δ_{Sᶜ}‖₁≤3‖Δ_S‖₁. If ‖Xv‖/√n≥κ‖v_S‖₂ for every v in that cone, with κ>0, then ‖Δ_S‖₂≤‖XΔ‖/(κ√n).

Let D=‖XΔ‖/√n and s=|S|. The inequality gives D²≤3λ√s‖Δ_S‖₂≤(3λ√s/κ)D. When D>0 divide by D and square to get D²≤9λ²s/κ². The bound holds immediately when D=0. Related reading: [Restricted geometry in Lasso prediction](https://www.stat.berkeley.edu/~bickel/BickelRitovTsybakov2009aos.pdf). The objective comparison restricts the estimation error to a cone, and the written restricted lower bound controls the prediction error there.

33

Show that binary log loss estimates a conditional probability

For p,q∈[0,1], the expected logarithmic loss from reporting q under Bernoulli probability p is −p log q−(1−p)log(1−q) with the extended conventions at zero. The expression at q=p is the Bernoulli entropy and is finite.

Subtracting the expression at p yields p log(p/q)+(1−p)log((1−p)/(1−q)), exactly the relative entropy between the two Bernoulli laws. Zero-probability terms contribute zero by convention.

For 0<p<1, reporting q=0 or q=1 assigns zero probability to a possible event and gives infinite loss. For interior q the expression is nonnegative, with equality only at q=p by the strict log inequality or direct minimization.

If p=0 the expected loss is −log(1−q), minimized at q=0. If p=1 it is −log q, minimized at q=1. In both degenerate cases the wrong deterministic report still has infinite loss. Related reading: [Logarithmic scoring and relative entropy](https://sites.stat.washington.edu/people/raftery/Research/PDF/Gneiting2007jasa.pdf). The expected binary log-loss excess is the relative entropy of two Bernoulli laws. The endpoint cases use the extended logarithmic convention.

34

Derive the smooth strongly convex gradient-descent rate

If ∇f is L-Lipschitz on Euclidean space, integrating along a line segment gives f(x+h)≤f(x)+∇f(x)·h+(L/2)‖h‖². Take h=−∇f(x)/L to decrease f by at least ‖∇f(x)‖²/(2L).

If f is μ-strongly convex with μ>0, its lower tangent bound is f(y)≥f(x)+∇f(x)·(y−x)+(μ/2)‖y−x‖². Minimizing the quadratic lower model over y gives f*≥f(x)−‖∇f(x)‖²/(2μ).

Therefore the gradient step obeys f(x_next)−f*≤(1−μ/L)[f(x)−f*]. The constants satisfy μ≤L in a nontrivial space by applying the upper and lower quadratic bounds to a nonzero increment.

Iterating yields f(x_t)−f*≤(1−μ/L)^t[f(x₀)−f*]. The argument assumes the unconstrained Euclidean step and a global pair of smoothness and strong-convexity bounds on its domain. Related reading: [Linear convergence of gradient descent](https://arxiv.org/pdf/1405.4980#page=52). Smoothness controls one gradient step, while the strongly convex lower quadratic forces a geometric decrease in objective error.

35

Bound averaged stochastic gradient error in a convex problem

Take a nonempty closed convex set K, convex f with an attained minimizer w*, and iterates w_{t+1}=Π_K(w_t−ηg_t) for η>0. Assume E[g_t|past] is a subgradient of f at w_t and E[‖g_t‖²|past]≤G².

Projection is nonexpansive and fixes w*. Expanding the preprojection squared distance yields ‖w_{t+1}−w*‖²≤‖w_t−w*‖²−2η g_t·(w_t−w*)+η²‖g_t‖².

Take conditional expectation and use convexity to lower-bound the middle dot product before its subtraction by f(w_t)−f(w*). Summing the resulting inequalities from t=1 to T telescopes the squared distances and discarding the nonnegative final distance gives average expected excess ≤D²/(2ηT)+ηG²/2 if ‖w₁−w*‖≤D.

Convexity of f gives the same bound for the averaged iterate. For D,G>0, choosing η=D/(G√T) gives DG/√T. The general inequality also applies if either bound parameter is zero, without requiring that step choice. Related reading: [Averaged stochastic-gradient guarantees](https://arxiv.org/pdf/1405.4980#page=104). Projection controls the norm after a stochastic step. Conditional unbiasedness and a second-moment bound let the squared distances telescope.

36

Give a holdout guarantee for selecting among trained candidates

Let the independent evaluation set contain m iid observations with bounded loss in [0,1]. Condition on the training data and any training randomness used to fix M candidate rules. They are now a finite set of fixed rules relative to evaluation.

For each rule, Hoeffding bounds the probability of an evaluation risk error of at least t by 2e^{−2mt²}. The conditional union bound at t=√[log(2M/δ)/(2m)] gives simultaneous errors at most t with probability at least 1−δ.

On that event, the rule selected by the smallest evaluation risk has population risk at most min_j R(h_j)+2t. This follows by inserting the two evaluation risks between the selected and comparison population values.

Averaging the conditional probability gives the same unconditional guarantee. Candidate generation that uses evaluation outcomes would require establishing a different scope for the evaluation guarantee. Related reading: [Using independent held-out data](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf), [Independent bounded-variable concentration](https://www.cs.rpi.edu/academics/courses/spring06/random/hoefding.pdf). Conditioning on the training data fixes the candidates. Independent evaluation then controls the selected rule by a simultaneous loss deviation.

37

Compute the effect of grouping on validation precision

Let G groups have independent Bernoulli variables B_j with success probability p. In each group all m observed responses equal B_j, and the balanced observation mean is (Gm)⁻¹∑_j m B_j=G⁻¹∑_jB_j.

By independence across groups its variance is G⁻²∑_j p(1−p)=p(1−p)/G. Within a group each duplicate carries the same outcome.

An observation mean from Gm independent Bernoulli variables would have variance p(1−p)/(Gm). With p between zero and one, the variance in this shared-outcome model is m times that independent-observation value.

Compare the actual precision to independent observationsWithin-group correlation one-half; Group means are independent across groups. Within each group, the off-diagonal covariance contributes to variance of the overall mean.Compare the actual precision to independent observationsRandom structureExact valueIndependent groups4Rows per group3Variance with independence1/6Actual variance1/3Within-group correlation ρ=1/2; marginal variance 2.Design effect 2; effective observation count 6.Count both diagonal and within-group covariance terms.Representative block, marginal v=2 and off-diagonal ρv=1.211121112Nominal count 12; effective 6.Cross-group covariance is zero.Per row, 2 same-group off-diagonal terms.
Group means are independent across groups. Within each group, the off-diagonal covariance contributes to variance of the overall mean.

Each row has m−1 other members in the same group. Their covariance contributes the design effect 1+(m−1)ρ. Zero correlation removes these off-diagonal terms; perfect correlation leaves only one independent unit per group.

Exact grouped variance
QuantityExact result
Variance assuming independence1/6
Variance with group correlation1/3
Design effect2
Effective sample size6
Exact inputs and supporting calculations
Declared inputs
ParameterValue
g4
m3
rho1/2
v2

Applying Hoeffding to the actual independent group variables gives P(|X̄−p|≥u)≤2e^{−2Gu²}. The balanced group assumptions give this exact reduction. Unequal sizes or partially correlated items would change the weights or covariance. Related reading: [Independent bounded-variable concentration](https://www.cs.rpi.edu/academics/courses/spring06/random/hoefding.pdf). Duplicated items share one outcome within each group. The probability calculation uses independent groups as its sampling units.

38

Reweight risk under covariate shift with overlap

Let source P and target Q share a conditional response law given X, with Q_X absolutely continuous under P_X. Set w=dQ_X/dP_X. For bounded loss ℓ, its conditional mean g(x) is the same under the two joint laws on the target feature support.

Then R_Q=∫g dQ_X=∫wg dP_X=E_P[w(X)ℓ]. An iid source mean of the weighted loss is unbiased for this expression when the fixed weight is known.

For finite variance one sufficient condition under loss in [0,1] is E_P[w(X)²]<∞, since the second moment of the weighted loss is at most that value. The independent-sample variance is the single-weighted-loss variance divided by sample size.

Clipping at M≥0 replaces w with min(w,M). The target risk minus the clipped expectation is E_P[(w−M)_+ℓ], between zero and E_P[(w−M)_+]. This controls the bias of an unnormalized clipped-weight estimate. Related reading: [Importance weighting under covariate shift](https://jmlr.org/papers/volume8/sugiyama07a/sugiyama07a.pdf). The target-to-source feature ratio transfers risk under a common response law. The lesson derives the second-moment condition and clipping bias.

39

Prove a finite-domain lack-of-information lower bound

Take the N feature labels to form an unknown deterministic table whose entries are independent fair bits under the prior. Training features and the fresh test feature are independent uniform draws. The learner uses only the training labelled data, the test feature and independent randomness.

For any fixed test feature x, the probability that none of the n training features equals x is (1−1/N)^n. The same value therefore holds after averaging over the uniform test feature.

On that event, the table entry at x has not appeared among the observed labels. Conditional on the observed features, labels, test feature and learner seed, its independent prior remains fair. Either prediction then errs with probability 1/2.

Errors on seen features are nonnegative, so the prior-averaged expected risk is at least (1−1/N)^n/2. Since it is an average over finitely many deterministic tables, at least one table has expected risk at least this large for the given learner. Related reading: [Unseen labels and finite-domain learning limits](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf). Independent fair entries in an unknown deterministic label table create an exact unpredictable event when the test feature was unseen.

Check finite concentration, covariance, exact classification risk and sampling precision.

Use a two-sided transform bound for a standard Gaussian norm

Four dimensions and relative deviation one-half

Mark both exact deviations from the Gaussian squared norm meanFour dimensions and relative deviation one-half; Colored tails are the events to be bounded. The line is a squared-norm coordinate, not the probability density.Mark both exact deviations from the Gaussian squared norm meanlower 2mean 4upper 6S=∑ Zᵢ²; dimension 4; relative deviation 1/2.Lower-side tail: P(S≤2) ≤ exact bound (≈ 0.67957).Upper-side tail: P(S≥6) ≤ exact bound (≈ 0.827729).These are two one-sided upper bounds, with natural logarithms.0
Colored tails are the events to be bounded. The line is a squared-norm coordinate, not the probability density.

The χ² moment formula applies to the sum of independent squared standard Gaussian coordinates. Optimizing the exponential Markov inequality on each side gives the displayed distinct logarithmic exponents.

Exact Gaussian thresholds
QuantityExact result
Lower threshold2
Upper threshold6
Lower-tail probability upper boundexp(−4/2·(−1/2−ln(1−1/2))) ≈ 0.67957
Upper-tail probability upper boundexp(−4/2·(1/2−ln(1+1/2))) ≈ 0.827729
Exact inputs and supporting calculations
Declared inputs
ParameterValue
k4
delta1/2

Detect a null direction when the sample span is too small

Two samples in three dimensions miss an axis

Compute the exact directional variance before testing a uniform boundTwo samples in three dimensions miss an axis; Each row is both the diagonal entry and eigenvalue in that coordinate. Signed deviations reveal which directions vary more or less than the identity.Compute the exact directional variance before testing a uniform boundAxisEigenvalue of Σ̂Signed deviation from 1Null direction?e01/2−1/2Falsee11/2−1/2Falsee20−1TrueUncentered covariance on 2 samples.Rank 2; ‖Σ̂−I‖op=1.Null directions: e2.Identity reference λ=1 on every basis axis.
Each row is both the diagonal entry and eigenvalue in that coordinate. Signed deviations reveal which directions vary more or less than the identity.

A sample covariance spans only the observed vectors. A missing direction forces error at least one, but full rank alone does not imply close agreement with the identity.

Exact sample-covariance test
QuantityExact result
Diagonal(1/2, 1/2, 0)
Rank2
Signed deviation from I(-1/2, -1/2, -1)
Operator distance1
Null basis axese2
Exact inputs and supporting calculations
Declared inputs
ParameterValue
d3
axes[[0,1],[1,1]]

Compute Bayes decisions and excess binary risk from exact conditional laws

Wrong decision at one of two points

Compute conditional mistakes and weight them by each point massWrong decision at one of two points; Each excess contribution is counted only at a point where the supplied action has higher conditional risk.Compute conditional mistakes and weight them by each point massPointηBayes actionGiven actionWeighted excess01/4011/413/4110Prediction costs 1 only when it disagrees with the true label.Bayes risk 1/4; given risk 1/2; excess 1/4.A tie at η=1/2 allows either action with zero excess.Point 0 (mass 1/2): Bayes 1/8, given 3/8; excess 1/4.Point 1 (mass 1/2): Bayes 1/8, given 1/8; excess 0.
Each excess contribution is counted only at a point where the supplied action has higher conditional risk.

The Bayes action minimizes the conditional error at each input before averaging. A tie contributes equal risks regardless of which action is chosen.

Exact binary decision risks
QuantityExact result
Bayes decision at each point0, 1
Bayes risk1/4
Given risk1/2
Excess risk1/4
Exact inputs and supporting calculations
Declared inputs
ParameterValue
w["1/2","1/2"]
eta["1/4","3/4"]
g[1,1]
Pointwise risk contributions
PointWeightBayes contributionSupplied contributionExcess
01/21/83/81/4
11/21/81/80

Compute the uniform Hoeffding union bound over a finite class

Eight functions, tolerance one-quarter

Solve the Hoeffding union bound before taking the ceilingEight functions, tolerance one-quarter; The two rows straddle the confidence target. The smaller row is not certified by this particular inequality.Solve the Hoeffding union bound before taking the ceilingn2M exp(−2nε²)At most δ?400.107807152No410.095139478YesM=8, ε=1/4, δ=1/10.Real threshold 40.601390522; least sufficient integer 41.This is a sufficient guarantee from the stated inequality.
The two rows straddle the confidence target. The smaller row is not certified by this particular inequality.

Apply the two-sided Hoeffding bound to each bounded-loss function and union bound over the finite class. This calculation provides a sufficient size, not a general lower bound.

Exact finite-class certificate
QuantityExact result
Analytic thresholdln(2·8/(1/10))/(2(1/4)²)
Sufficient n41
Bound at n−10.107807152
Bound at n0.0951394777
Exact inputs and supporting calculations
Declared inputs
ParameterValue
M8
eps1/4
delta1/10

Compute least-squares variability with independent errors

Two nonzero design rows

Use the design energy as the exact denominatorTwo nonzero design rows; The last two columns are the numerator and denominator contributions for through-origin scalar least squares.Use the design energy as the exact denominatorRowxyxyx²01221125104Fixed design, no intercept; common independent error variance 1.Numerator Σxy=12; denominator Σx²=5.β̂=12/5, Var(β̂)=1/5.(1,2)(2,5)Orange points, green fitted line through the origin.xy
The last two columns are the numerator and denominator contributions for through-origin scalar least squares.

When Σx²>0, the estimation error β̂−β is a fixed linear combination of the independent errors, so Var(β̂)=σ²/Σx². With a zero design the objective is independent of β.

Exact fixed-design variance
QuantityExact result
Σxy12
Σx²5
Slope12/5
Variance of slope1/5
Exact inputs and supporting calculations
Declared inputs
ParameterValue
x[1,2]
y[2,5]
sigma21

Retain the covariance when averaging repeated observations

Within-group correlation one-half

Compare the actual precision to independent observationsWithin-group correlation one-half; Group means are independent across groups. Within each group, the off-diagonal covariance contributes to variance of the overall mean.Compare the actual precision to independent observationsRandom structureExact valueIndependent groups4Rows per group3Variance with independence1/6Actual variance1/3Within-group correlation ρ=1/2; marginal variance 2.Design effect 2; effective observation count 6.Count both diagonal and within-group covariance terms.Representative block, marginal v=2 and off-diagonal ρv=1.211121112Nominal count 12; effective 6.Cross-group covariance is zero.Per row, 2 same-group off-diagonal terms.
Group means are independent across groups. Within each group, the off-diagonal covariance contributes to variance of the overall mean.

Each row has m−1 other members in the same group. Their covariance contributes the design effect 1+(m−1)ρ. Zero correlation removes these off-diagonal terms; perfect correlation leaves only one independent unit per group.

Exact grouped variance
QuantityExact result
Variance assuming independence1/6
Variance with group correlation1/3
Design effect2
Effective sample size6
Exact inputs and supporting calculations
Declared inputs
ParameterValue
g4
m3
rho1/2
v2

Worked examples

Estimate the relative spread of squared Gaussian length

For a standard Gaussian in dimension 200, compute the mean and standard deviation of squared length, its relative root-mean-square deviation and Chebyshev’s bound at relative deviation 1/4.

  1. For d=200 the squared norm Q has mean 200 and variance 2d=400. Its standard deviation is therefore 20 in the same squared-length units.
  2. The relative root-mean-square deviation is 20/200=0.1. This ratio is dimensionless and uses the mean of Q as the reference.
  3. A relative deviation of 1/4 is an absolute squared-length deviation of 50. Chebyshev gives P(|Q−200|≥50)≤400/50²=0.16.
  4. This is a bound obtained from the first two moments. The event concerns squared norm, so the corresponding length interval would have endpoints √150 and √250.

Mean 200, standard deviation 20, relative root-mean-square deviation 0.1, and tail probability bounded above by 0.16.

Compare a directional and simultaneous coordinate bound

For 1000 centered coordinates with unit sub-Gaussian proxy, choose a common threshold such that the probability any absolute coordinate exceeds it is at most 0.05. Evaluate the expression approximately.

  1. For one coordinate of unit sub-Gaussian scale, the probability of |X_i|≥u is at most 2e^(−u²/2). Use the union bound across all 1000 coordinates.
  2. The bound for at least one exceedance is 2000e^(−u²/2). Requiring it to be at most 0.05 yields u²/2≥log(2000/0.05)=log 40000.
  3. Thus u=√(2log 40000)≈4.604 gives the requested common threshold. Substituting the symbolic value into the bound returns exactly 0.05.
  4. Independence among these coordinates is unnecessary for the probability sum. A threshold for only one coordinate would satisfy the weaker relation 2e^(−u²/2)≤0.05.

Use √(2log 40000)≈4.604 for a two-sided coordinate maximum failure bound of 0.05.

Bound a weighted measurement error

Let three independent centered sub-Gaussian variables have scale parameters σ₁=1, σ₂=2, σ₃=1 in the bounds E exp(tX_i)≤exp(σ_i²t²/2). For coefficients 1/2,−1,2 compute the variance proxy and an explicit threshold for a two-sided failure probability 0.1.

  1. Use σ=(1,2,1) in the moment bound exp(σ_i²t²/2) and a=(1/2,−1,2) for the weights. Their independent sum has variance proxy V=∑a_i²σ_i².
  2. Here V=1/4+4+4=33/4. The negative coefficient contributes its square, because the moment estimate was assumed for positive and negative transform arguments.
  3. To make the two-sided bound 2e^(−u²/(2V)) equal to 0.1, choose u=√(2V log 20)=√[(33/2)log 20]. Numerically this is about 7.03.
  4. The bound concerns the centered weighted sum. It holds for every permitted distribution of the three independent variables under the stated scale bounds.

The variance proxy is 33/4. Use √[(33/2)log 20]≈7.03 for two-sided failure bound 0.1.

Check covariance control at one dimension and tolerance

Using the 1/4-net result with d=20, δ=0.01 and target operator error at most 1/2, calculate the sufficient number of independent known-zero-mean Gaussian samples. State the gap between sufficient size and what was proved necessary.

  1. A 1/4-net multiplies the directional quadratic tolerance ε by at most two. To guarantee operator error at most 1/2, use direction tolerance ε=1/4.
  2. The sufficient sample size is n≥(8/ε²)[d log 9+log(2/δ)]. Thus the integer threshold here is ceil[128(20 log 9+log 200)].
  3. Since 20 log 9+log 200≈49.2428, the bracketed value before rounding is about 6303.08. Taking 6304 is sufficient for probability at least 0.99.
  4. The deterministic rank result rules out n<20 at error below one. It gives a necessary lower bound of 20 for this uncentered covariance task, while 6304 comes from the union-bound sufficient estimate.

6304 is sufficient from the directional net bound. Rank alone makes at least 20 samples necessary at the specified error.

Size a finite distance-preserving projection

For 100 fixed points, ε=1/3 and δ=0.05 compute the sufficient independent Gaussian projection dimension. Explain what happens if the resulting sufficient bound exceeds the original dimension.

  1. The number of unordered pairs is M=C(100,2)=4950. For tolerance ε=1/3 and δ=0.05, the sufficient size is ceil[(8/ε²)log(2M/δ)].
  2. The multiplier is 72 and the log argument is 198000. Thus the size before rounding is about 72×12.1960=878.11.
  3. Choose m=879 or greater to meet this sufficient Gaussian condition. The simultaneous event concerns the squared distances of the original fixed 100 points.
  4. When this conservative bound exceeds the ambient dimension, it gives no guarantee of a dimension reduction by the stated calculation. Keeping the ambient coordinates via the identity preserves all distances exactly.

879 Gaussian coordinates suffice for the stated simultaneous squared-distance bound.

Turn a finite hypothesis bound into a risk guarantee

For 32 fixed classifiers, 500 labelled examples and 0–1 loss, compute the 95 percent one-sided-on-risk empirical minimizer excess bound from simultaneous two-sided deviations.

  1. The finite-class bound at confidence 0.95 gives t=√[log(2×32/0.05)/(2×500)] for the maximum absolute risk estimation error.
  2. Here t=√(log 1280/1000)≈0.084585. The event simultaneously covers the 32 classifier risks, including whichever classifier the empirical procedure chooses.
  3. The fitted classifier’s population risk is at most the smallest class population risk plus 2t by the empirical minimizer comparison. Thus the excess is at most about 0.16917.
  4. This is a one-sided conclusion about the selected rule’s excess loss. Its proof first controlled the two-sided risk deviations of every candidate under iid observations.

The simultaneous deviation is about 0.084585, so population excess is bounded above by about 0.16917 at confidence 0.95.

Trace a binary class on three ordered points

For intervals classifying three distinct real points, list the realized subset patterns and count how many. Identify the first excluded pattern and connect it to the growth bound.

  1. Write the points x₁<x₂<x₃. A real interval can select the empty set by lying outside them and can select any single point by a small interval around it.
  2. A contiguous pair can be selected as {x₁,x₂} or {x₂,x₃}, and an interval spanning the outside points selects all three. These give 1+3+2+1=7 patterns.
  3. The remaining subset {x₁,x₃} is excluded, because including both outside points forces including x₂. Thus the count is exactly seven.
  4. At n=3 and VC dimension two, Sauer gives 1+3+3=7. The interval class attains that bound on this sample.

The count is seven: empty, each singleton, the two adjacent pairs, and the entire set.

Compute a conditional linear complexity estimate

With B=2 and 64 feature vectors each of norm at most 3, compute the norm-based bound. Show how a feature rescaling interacts with the norm bound.

  1. The conditional linear signed bound is BR/√n. Substituting B=2, R=3 and n=64 gives 6/8=0.75.
  2. It applies to the fixed feature vectors and random signs. An explicit empirical version would place (2/64)√(∑‖x_i‖²) on the right before using the radius limit.
  3. If each feature becomes s x for s>0 and the parameter bound remains B, the radius is sR and the upper bound scales by s. The score functions can attain that same scaling.
  4. If one simultaneously changes the parameter bound to B/s, then v·(s x) equals w·x under v=w/s. The product of the bounds, and the score class itself, then stays the same.

The bound is 0.75. Scaling features by s and dividing the parameter radius by s keeps the score class and bound identical.

Compare empirical objectives without and with an information penalty

Consider two fixed rules with empirical losses 0.12 and 0.10, finite prior probabilities 0.9 and 0.1 and fixed temperature 20. Compute the empirical-loss-plus-KL/temperature terms for their point mass posteriors.

  1. For the point mass on rule j, the relative entropy to prior p is log(1/p_j). The empirical term is simply the observed loss of that selected rule.
  2. For the first rule the penalized term is 0.12+log(1/0.9)/20≈0.12527. For the second it is 0.10+log(1/0.1)/20≈0.21513.
  3. The second rule has smaller empirical loss. The larger information penalty in this expression gives the smaller overall term to the first rule.
  4. In the fixed-temperature bound the confidence and temperature-only terms are common to the two posteriors. These numbers compare the two contributions to the upper bound, without identifying either population risk by itself.

The respective empirical-plus-penalty values are about 0.12527 and 0.21513.

Read ridge along two singular directions

A fixed design has positive singular values 3 and 1 and parameter components 2 and 2 in those directions. Use the ridge objective ‖y−Xw‖²/2+λ‖w‖²/2 with λ=1 and centered noise of covariance σ²I. Compute the shrinkage factors, mean coefficients, squared bias and total conditional variance in those directions.

  1. With the unscaled squared-error objective and λ=1, the spectral shrinkage factor is s²/(s²+1). It equals 9/10 for s=3 and 1/2 for s=1.
  2. The true coordinate equals 2 in each direction. Centered noise therefore gives mean fitted coordinates 9/5 and 1.
  3. The two biases are −1/5 and −1. Their squared sum is 1/25+1=26/25, which is 1.04.
  4. The coordinate variances are σ²·9/100 and σ²·1/4. Their sum is (17/50)σ², or 0.34σ², using orthogonal singular directions.

Shrinkage factors 9/10 and 1/2, mean coefficients 9/5 and 1, squared bias 26/25, and total variance 17σ²/50.

Evaluate the effect of correlated validation items

There are 20 independent groups with five identical binary outcomes per group and success probability 0.3. Compute the observation mean variance and compare with 100 independent Bernoulli observations.

  1. Let one Bernoulli variable with p=0.3 represent each group. Each of those 20 independent variables appears five times, so the ordinary mean of 100 records equals the average of the 20 variables.
  2. The Bernoulli variance is p(1−p)=0.21. Thus the grouped mean has variance 0.21/20=0.0105.
  3. One hundred independent Bernoulli variables of the same success probability would instead give variance 0.21/100=0.0021.
  4. These two values differ by the five shared copies per group. Counting independent groups gives the correct scale for the elementary concentration bound in this example.

The grouped mean variance is 0.0105. The independent-record mean variance is 0.0021.

Reweight a two-category validation domain

For source feature probabilities (3/4,1/4), target probabilities (1/2,1/2) and common conditional losses (1/5,3/5), compute both risks, both weights and clip-at-one risk.

  1. The source risk is (3/4)(1/5)+(1/4)(3/5)=3/10. The target risk is (1/2)(1/5)+(1/2)(3/5)=2/5.
  2. The two importance weights are (1/2)/(3/4)=2/3 and (1/2)/(1/4)=2. Both source categories have positive probability, as required for overlap.
  3. Clipping the weights at one gives (2/3,1). Their unnormalized expectation against the loss under the source is (3/4)(2/3)(1/5)+(1/4)(1)(3/5)=1/4.
  4. The target-minus-clipped difference is 2/5−1/4=3/20. It comes entirely from the originally weight-two category, where clipping removes one unit of weight.

Source risk 3/10, target risk 2/5, weights 2/3 and 2, and unnormalized clipped risk 1/4.

Try it yourself

  1. Insert d=512 and ε=1/4 into the derived two-sided tail and compare its numerical value with Chebyshev. Check both describe the same event.

    Show the answer and reasoning

    The exponential bound is 2e^(−4)≈0.03663 and Chebyshev gives 1/16=0.0625.

    For ε=1/4 and d=512, the product dε² is 512/16=32. The event is |Q/512−1|≥1/4 with Q=‖G‖². The exponential bound equals 2exp(−32/8)=2e^(−4)≈0.03663, including the prefactor that covers both tails. Chebyshev gives 2/(512·(1/4)²)=2/32=1/16=0.0625, using Var Q=1024 and deviation 128 in Q. Both inequalities control the same two tails of the normalized squared norm. The transform-based upper bound is smaller at these supplied values.

  2. If U is uniform on the unit sphere in ℝ²⁵ and a is a fixed vector of norm 5, compute E[a·U] and Var(a·U). State which part of the derivation uses symmetry.

    Show the answer and reasoning

    The mean is zero and the variance is one.

    Reflection symmetry gives E U=0 for a direction uniform on the sphere. Consequently E[a·U]=0. Orthogonal invariance forces equal diagonal second moments and zero off-diagonal ones. Since ‖U‖²=1, the diagonal moments are 1/25. The variance of the projection is aᵀE[UUᵀ]a=‖a‖²/25=25/25=1. Sign symmetry supplies the zero mean and off-diagonal cancellations. Equal treatment of the axes and the unit-length condition give the common diagonal value.

  3. For n=200 independent variables in [−1,3] with common mean, derive the bound at deviation 1/2 and a threshold giving a two-sided failure bound 0.05.

    Show the answer and reasoning

    The bound at deviation 1/2 is 2e^(−6.25). The 0.05 threshold is √(log 40)/5≈0.384.

    The support interval [−1,3] has length 4. With n=200 the two-sided mean bound is 2exp(−2·200 u²/16). At u=1/2 this is 2exp(−400/(4·16))=2e^(−6.25)≈0.00386 for a deviation of at least half a unit. For two-sided failure at most 0.05, require 400u²/16≥log 40. Hence u=√[(16/400)log 40]=√(log 40)/5. Numerically the threshold is about 0.384. Independence gives the sample-mean moment product, and the common mean is the expected value of that mean.

  4. For independent inputs X_i in [0,1] and f=max(n⁻¹∑X_i,1/2), find c_i and the exact bounded-differences bound for f−E f≥t.

    Show the answer and reasoning

    Use c_i=1/n and P(f−Ef≥t)≤e^(−2nt²). For n=1 the sharp range c₁=1/2 gives e^(−8t²).

    Changing one coordinate of the average changes it by at most 1/n. The real function u↦max(u,1/2) is 1-Lipschitz, so c_i=1/n is a valid coordinate bound. With these constants ∑c_i²=n(1/n²)=1/n. The bounded-differences inequality therefore gives P(f−Ef≥t)≤exp(−2nt²) for every t>0. For n≥2 the choice c_i=1/n is attained when the other coordinates are all 1 and the changed one goes from 0 to 1. The starting average is then at least 1/2, so the clipping changes neither endpoint. For n=1 the same uniform formula remains valid, and the sharper range c₁=1/2 gives exp(−8t²). The concentration centers at Ef, which depends on the actual input laws.

  5. For a 1/4-net of the unit circle, apply the volume estimate and then compute the resulting operator norm bound in terms of the largest tested quadratic value.

    Show the answer and reasoning

    81 net points suffice, and the norm is at most twice the largest absolute sampled quadratic value.

    For ε=1/4 in the ambient plane, the sphere net construction gives at most (1+2/(1/4))²=9²=81 points on the circle. The construction chooses points with mutual distances greater than 1/4. Open radius-1/8 balls are disjoint and lie in the planar ball of radius 9/8, giving the area ratio 81. For a real symmetric 2 by 2 matrix the factor (1−2ε)⁻¹ equals (1−1/2)⁻¹=2. Thus the operator norm is at most twice max_v|vᵀAv| over those net vectors. Each vector is unit length, so the maximum is itself no larger than the true norm.

  6. Suppose a known-zero-mean sample uses 12 vectors in ℝ²⁰. Give a lower bound on the dimension of the null space and a lower bound on the operator norm error from identity.

    Show the answer and reasoning

    The nullity is at least eight and the covariance operator norm error is at least one.

    The range of S is in the span of the 12 observed vectors. Its rank is at most 12 even if some of the observations are linearly dependent. The ambient dimension is 20, so the nullity is at least 20−12=8. Choose a unit vector u from that nonzero kernel. Since Su=0, (S−I)u=−u. The definition of the operator norm gives ‖S−I‖op≥‖(S−I)u‖=1. The estimate holds for every set of samples of the stated size. It depends only on the rank structure of the known-zero-mean empirical covariance.

  7. For two equally probable feature values and η=1/4 and 3/4, compute Bayes risk, a constant-one rule’s risk, and the excess-risk identity for that rule.

    Show the answer and reasoning

    Bayes risk 1/4, constant-one risk 1/2 and excess 1/4.

    At the feature with η=1/4, Bayes predicts 0 with conditional error 1/4. At the feature with η=3/4 it predicts 1 with conditional error also 1/4. Thus the equally weighted Bayes population risk is R*=1/4. A rule predicting 1 always has conditional errors 3/4 and 1/4, giving population risk 1/2. The constant-one rule disagrees with Bayes only at the first feature, which has probability 1/2. There the conditional margin |2η−1|=1/2. The identity gives excess (1/2)(1/2)=1/4, equal to the direct difference 1/2−1/4. Both labels have a distinct optimal decision in this example.

  8. If the simultaneous uniform error bound is 0.04 and an algorithm minimizes empirical risk within 0.015, derive the comparator excess bound and state the hypotheses it uses.

    Show the answer and reasoning

    The rigorously bounded comparator excess on the uniform event is 0.095.

    The uniform event gives |R̂(h)−R(h)|≤0.04 for every h in the comparison class, including the selected rule. The approximate optimizer has α=0.015 in empirical risk. Insert the selected and comparator empirical risks as intermediate terms between their population risks. The two deviations cost at most 0.04 each and the optimization term at most 0.015. The excess relative to any comparator in the class is therefore bounded by 2·0.04+0.015=0.095. The guarantee is deterministic on the uniform event and requires both the fitted rule and comparator to belong to that class. Any stated probability for the claim comes from the evidence for that event.

  9. With N=10000 finite feature values, n=50 and independent fair labels, give a lower bound on the probability of a sample with distinct features and training error zero for some full-class rule. State the fitted population error.

    Show the answer and reasoning

    The distinct-feature, zero-empirical-error event has probability at least 0.8775. Conditional population classification error is 1/2.

    For each pair among 50 independent uniform feature draws, the coincidence probability is 1/10000. There are C(50,2)=1225 such pairs. The union bound gives P(at least one coincidence)≤1225/10000=0.1225, so P(all features distinct)≥0.8775. Distinct sampled feature values allow the full class of binary tables to assign each observed label to its own feature. This produces at least one zero-training-error rule, regardless of the realized labels. A fresh label is still an independent fair bit, conditional on any fitted table and test feature. The fitted population classification error is therefore exactly 1/2.

  10. For a class with VC dimension 2 on five sample points, compute the growth upper bound. Compare it with the actual number of patterns realized by intervals on five distinct ordered real points.

    Show the answer and reasoning

    Both counts are 16.

    For n=5 and VC dimension two, Sauer gives ∑_{j=0}²C(5,j)=1+5+10=16. An interval on ordered points realizes either the empty set or a contiguous block with first and last indices i≤j. Any such block can be selected by positioning the endpoints around those indices. The block count is 5+4+3+2+1=15, plus one for the empty set. These distinct subsets exhaust the possible interval patterns. Thus the bound of 16 is attained by the interval class on these distinct points. A different class of the same VC dimension may realize fewer patterns on a particular sample.

  11. For L=2, λ=1/2 and n=100, compute the parameter sensitivity and the loss stability bound. Distinguish an expected signed generalization claim from a tail claim.

    Show the answer and reasoning

    Parameter sensitivity is at most 0.08 and uniform loss stability at most 0.16, which controls the absolute expected signed gap.

    The parameter bound is 2L/(λn) for empirical minimizers paired on samples differing one place. Substitute L=2, λ=1/2 and n=100 to get 4/50=0.08. The Lipschitz bound for a test loss multiplies the parameter difference by L=2, giving uniform loss stability at most 0.16. The corresponding expected signed generalization gap has absolute value at most 0.16 under independent sampling and the stated replacement coupling. This last inequality concerns the expectation of the gap over training data. A tail bound for a single fit would require an additional concentration argument.

  12. Take p=(1/2,1/2) and scores (0,log 3). Compute the tilted q, log moment, linear score expectation and KL. Verify equality in the variational formula.

    Show the answer and reasoning

    The tilted law is (1/4,3/4), log moment log 2, score expectation (3/4)log 3 and divergence (3/4)log 3−log 2.

    The moment sum is Z=(1/2)e⁰+(1/2)e^{log 3}=(1+3)/2=2. The tilted law assigns q=(1/4,3/4). The q-expectation of the score is (3/4)log 3, since the first score is zero. The log moment is log 2. Relative entropy is D(q‖p)=(1/4)log(1/2)+(3/4)log(3/2)=(3/4)log 3−log 2. The sum D(q‖p)+log Z equals (3/4)log 3 exactly, matching the score expectation. This is the equality distribution of the finite change-of-measure inequality.

  13. Let XᵀX=diag(4,9) and σ²=9. Give the covariance and expected squared parameter error. Identify the larger uncertainty direction.

    Show the answer and reasoning

    Covariance diag(9/4,1) and expected squared error 13/4. The first coefficient has larger uncertainty.

    For centered noise of covariance 9I and the fixed full-rank design, Cov(β̂|X)=9(XᵀX)⁻¹. The inverse diagonal entries are 1/4 and 1/9. Thus Cov(β̂|X)=diag(9/4,1), with zero covariance between the two indicated coordinate errors. The conditional estimator is unbiased. Its expected squared Euclidean error is the trace, 9/4+1=13/4. The coordinate corresponding to Gram eigenvalue four has the larger variance. Its smaller singular value amplifies the relevant projected noise more strongly.

  14. For X with the single row (1,2) and y=3, find every exact fitted coefficient and derive the minimum-norm one by the pseudoinverse or orthogonality.

    Show the answer and reasoning

    All solutions have form (3−2t,t). The minimum-norm point is (3/5,6/5).

    With one row (1,2), fitting y=3 exactly requires w₁+2w₂=3. The complete solution set is (3−2t,t) for real t. The row vector has squared length 1²+2²=5. The particular solution parallel to the row is (3/5)(1,2)=(3/5,6/5), which indeed gives fitted value three. Every other solution differs by a null vector, a multiple of (−2,1), which is perpendicular to this particular solution. Its squared norm adds the squared length of that null component. Hence the parallel solution uniquely minimizes Euclidean norm. Its null coordinate is zero, matching the pseudoinverse construction in this one-row case.

  15. For p=1/4 and q=1/2, compute the excess log loss in terms of ordinary logarithms and approximate it. Explain why q=0 yields divergence.

    Show the answer and reasoning

    The excess is (3/4)log 3−log 2≈0.13081. At q=0 the excess is infinite.

    For p=1/4 and q=1/2, the excess expected log loss is p log(p/q)+(1−p)log((1−p)/(1−q)). Substituting gives (1/4)log(1/2)+(3/4)log(3/2)=(3/4)log 3−log 2. Numerically it is about 0.13081 in natural-log units. The excess is positive because the reported probability differs from the true conditional probability. At q=0 the report assigns zero probability to the outcome one, which still has probability 1/4. Its −log q loss is infinite, making the expected loss and the excess diverge.

  16. For f(x,y)=(x²+4y²)/2 start from (2,1) and use step 1/4. Compute the first two iterates and compare their objective errors with the general upper bound.

    Show the answer and reasoning

    The iterates are (3/2,0) and (9/8,0), with errors 9/8 and 81/128, bounded by 3 and 9/4 respectively.

    The gradient is (x,4y) and the Hessian diag(1,4) gives μ=1 and L=4. A step of size 1/4 maps (x,y) to ((3/4)x,0). Starting at (2,1), the first two iterates are (3/2,0) and (9/8,0). The minimizer is zero with objective zero. The starting objective is 4. The first two errors are (3/2)²/2=9/8 and (9/8)²/2=81/128. The strong-convexity bound gives 4·(3/4)=3 and 4·(3/4)²=9/4 for those errors. The actual y component vanishes after one step and accounts for some of the gap from the general bound.

  17. For 20 frozen candidate rules, suppose the iid holdout observations give losses in [0,1] for every rule. Use the exact simultaneous-deviation inequality with failure probability δ=0.05 and allowed deviation t=0.05 to compute a sufficient holdout sample size.

    Show the answer and reasoning

    The sufficient holdout count is ceil(200 log 800)=1337 independent observations.

    For m independent evaluation observations, the maximum deviation over M=20 fixed rules has probability at most 2M e^(−2m t²) at threshold t=0.05. To make this at most δ=0.05 requires m≥log(2M/δ)/(2t²). Here 2M/δ=800 and 2t²=0.005. The sufficient integer is ceil(200 log 800). Since 200 log 800≈1336.92, select at least 1337 independent evaluation observations. The concentration applies after conditioning on the candidate construction if it used only independent training data. The count must be of independent observations under this calculation.

  18. Under the finite deterministic table prior with N=100 and n=50, compute the probability a fresh uniform feature was unseen and the implied numerical lower bound on prior-averaged error.

    Show the answer and reasoning

    The unseen probability is (99/100)⁵⁰≈0.60501 and the prior-averaged error lower bound is about 0.30250.

    For N=100, each of the n=50 training features independently misses a fixed test feature with probability 99/100. The probability of its being unseen throughout training is (99/100)⁵⁰, about 0.60501. It has the same value after averaging over the test feature. Under the table prior the unseen label is fair conditional on the training information and test location. The expected conditional error there is one half. Multiplying gives the prior-averaged lower bound (99/100)⁵⁰/2≈0.30250. It establishes at least one deterministic table with risk at least this value for each learner.

What to carry forward

  • Squared Gaussian length has relative standard deviation √(2/d), while a coordinate maximum involves a logarithmic factor.
  • A finite spherical net can control a symmetric operator, and an undersampled covariance still has a deterministic null direction.
  • Uniform loss bounds cover a fitted rule selected from the indicated class after observing its data.
  • VC growth counts binary patterns, and random-sign complexity controls a supremum of centered sample sums.
  • Stability controls an expected signed generalization gap under the stated replacement coupling.
  • Ridge shrinkage and minimum-norm fitting use singular directions, while Lasso prediction uses a declared restricted design condition.
  • Independent validation guarantees apply to the actual independent observations or groups in the sampling model.
  • Covariate-shift weighting requires overlap and a common response law, and clipping trades variance control for a downward bias.

References

Sources for the concepts and teaching approaches in this article.

  1. Concentration of length in high dimensionsRoman VershyninTextbook · PDFmath.uci.eduRead source
  2. Exponential chi-square tailsBéatrice Laurent and Pascal MassartResearch paper · PDFprojecteuclid.orgRead source
  3. The independent bounded-differences inequalityColin McDiarmidResearch chapter · PDFmath.cmu.eduRead source
  4. The expected squared-test-error decompositionUniversity of Toronto, CSC311University courseteach.cs.toronto.eduRead source
  5. The Bayes optimal binary decisionShai Shalev-Shwartz and Shai Ben-DavidTextbook · PDFcs.huji.ac.ilRead source
  6. Affine halfspaces and VC dimensionAurélien GarivierUniversity course · PDFperso.ens-lyon.frRead source
  7. Signed complexity and finite evaluation setsETH Zürich, Statistical Machine LearningUniversity course · PDFsml.inf.ethz.chRead source
  8. Stability of a regularized empirical minimizerOlivier Bousquet and André ElisseeffResearch paper · PDFjmlr.orgRead source
  9. PAC–Bayes change of measureDavid McAllesterResearch paperarxiv.orgRead source
  10. Sébastien Bubeck2 sources
    1. Linear convergence of gradient descentSébastien BubeckResearch monographarxiv.orgRead source
    2. Averaged stochastic-gradient guaranteesSébastien BubeckResearch monographarxiv.orgRead source
  11. Logarithmic scoring and relative entropyTilmann Gneiting and Adrian E. RafteryResearch paper · PDFsites.stat.washington.eduRead source
  12. Restricted geometry in Lasso predictionPeter J. Bickel, Ya’acov Ritov and Alexandre B. TsybakovResearch paper · PDFstat.berkeley.eduRead source
  13. Independent bounded-variable concentrationWassily HoeffdingResearch paper · PDFcs.rpi.eduRead source
  14. Ridge’s estimator and variance decompositionArthur E. Hoerl and Robert W. KennardResearch paper · PDFhomepages.math.uic.eduRead source
  15. Importance weighting under covariate shiftMasashi Sugiyama, Matthias Krauledat and Klaus-Robert MüllerResearch paper · PDFjmlr.orgRead source
  16. Row space, nullspace and singular directionsGilbert StrangAuthor essay · PDFweb.mit.eduRead source