High-Dimensional Probability

Nine modules, one per chapter: tail bounds, concentration of sums, random vectors and matrices, Johnson–Lindenstrauss, quadratic forms, Gaussian width, VC dimension and sparse recovery. Run a simulation, move a slider, place points, work through an example one step at a time, then check yourself with concept questions and practice problems.

Follows the chapter order of R. Vershynin, High-Dimensional Probability: An Introduction with Applications in Data Science, 2nd ed. (Cambridge University Press; pre-publication version of November 2025). Chapters 1–9 are covered, one module each; the short opening "Appetizer" is not. A final shared module, on minimax lower bounds, shows how to prove that a rate (such as the covariance-estimation rate of Chapter 4) cannot be improved. Chapter and exercise numbers refer to that edition; the questions and examples here are written for this page. Exercises from the book appear at the end of each module, with their numbers from the book and their statements restated in our own words.

InteractiveVershynin, Ch. 1: A Quick Refresher on Analysis and Probability

Tail bounds from moments

Almost every estimate in high-dimensional probability starts from a few blunt tools: Jensen, Markov, Chebyshev and the union bound. They are crude, but in a way you can control. Here you can see how much each one gives away, and why the next chapter wants exponential moments.

The idea

Lp norms. For a random variable X and p≥1, ‖X‖Lp=(E|X|p)1/p, and ‖X‖L∞ is the essential supremum of |X|. These norms increase with p.
Jensen. If φ is convex, then φ(EX)≤Eφ(X).
Markov and its relatives. If X≥0 and t>0, then P(X≥t)≤EX/t. Applying this to |X|p or to (X−EX)2 gives
P(|X|≥t)≤E|X|ptp,P(|X−EX|≥t)≤Var⁡Xt2  (Chebyshev).
Union bound. P(A1∪⋯∪AN)≤∑iP(Ai). It needs no independence, and it costs a factor N, which is cheap whenever each P(Ai) is exponentially small.
Limit theorems. For i.i.d. Xi with mean μ and variance σ2, the sample mean X¯N→μ (law of large numbers) and N(X¯N−μ)/σ→N(0,1) in distribution (central limit theorem).
Asymptotic is not a bound. The CLT says nothing about a fixed N. Its error at finite N (Berry–Esseen) is of order 1/N, which is far larger than the tiny tail probabilities we usually care about.

Explore

true tail Markov Chebyshev p-th moment bound
Distribution of X

Worked example

You average N i.i.d. measurements with unknown mean μ and variance σ2=1. How large must N be for |X¯N−μ|<0.1 with probability at least 0.99? And what if you run 1000 such experiments and want all of them to succeed at once?

  1. What does Chebyshev guarantee for one experiment?

    Var⁡X¯N=1/N, so P(|X¯N−μ|≥0.1)≤1/(0.01N). This is at most 0.01 once N≥10000.

  2. What does the CLT suggest instead?

    Treat N(X¯N−μ) as standard normal. A two-sided normal tail of 0.01 needs z≈2.576, so 0.1N≥2.576, i.e. N≥664. That is 15 times fewer, but it is a heuristic, not a guarantee.

  3. Now 1000 experiments must all succeed with total failure probability 0.01. Use the union bound. What failure probability can each experiment have, and what N does each method ask for?

    Each may fail with probability 10−5. Chebyshev needs 1/(0.01N)≤10−5, so N≥107: a thousand times more. The normal heuristic needs z≈4.417, so N≥(44.17)2≈1952: only three times more.

  4. Can you trust the 1952?

    Not from the CLT alone. The normal approximation to the distribution function has error of order 1/N≈0.02 here, two thousand times bigger than the 10−5 we are estimating. Chebyshev is rigorous but only polynomial in 1/δ. What we want is a rigorous bound with Gaussian-like decay at every finite N. That is the next module.

Check your understanding

All you know about X is that X≥0 and EX=1. What is the best upper bound on P(X≥10) that holds for every such X?

  1. 1/10
  2. 1/100A 1/t2 bound needs a second moment, and you don't know EX2. It could be huge.
  3. e−10Exponential decay needs exponential moments. A nonnegative variable with mean 1 can have a heavy tail.
  4. There is no bound without more information.Markov's inequality uses exactly these two facts.
Markov gives 1/10, and nothing better is possible: X=10 with probability 1/10 and X=0 otherwise has mean 1 and P(X≥10)=1/10.

Which inequality holds for every random variable (with the expectations finite)?

  1. E|X|≤(EX2)1/2
  2. EeX≤eEXex is convex, so Jensen goes the other way.
  3. Elog⁡X≥log⁡EX for X>0log is concave, so Jensen gives ≤.
  4. EX≥EX for X≥0x is concave; try X∈{0,4} with equal probability.
Apply Jensen to the convex function x↦x2 and the variable |X|: (E|X|)2≤EX2. It is the case p=1≤q=2 of the monotonicity of Lp norms.

You have 106 events, each of probability at most e−t2/2. Roughly how large must t be for the union bound to give P(any event)≤0.01?

  1. t≈6.1
  2. t≈2.6That makes a single event unlikely. With a million of them you need each to have probability 10−8.
  3. t≈1000The number of events enters only through a logarithm, not through t itself.
  4. The union bound is useless for a million events.It loses a factor 106, but a Gaussian tail absorbs that easily.
Need 106e−t2/2≤10−2, i.e. t2≥2ln⁡108≈36.8, so t≈6.07. With Gaussian tails, a union bound over N events costs only a factor 2ln⁡N in the threshold. This is used again and again in the later chapters.

Practice

Markov is sharp at every thresholdExtremal examples

Fix 0<a≤t. Find a nonnegative X with EX=a and P(X≥t)=a/t. Then show that if equality holds in Markov's inequality, X must take only the values 0 and t.

Hint

Write X≥t⋅1{X≥t} and ask when this is an equality.

Solution

Take X=t with probability a/t and X=0 otherwise. In general X≥t1{X≥t} pointwise, so EX≥tP(X≥t). Equality forces X=t1{X≥t} almost surely, so X∈{0,t}.

When is the union bound nearly exact?Independent rare events

Let A1,…,AN be independent with P(Ai)=δ. Show that Nδ(1−Nδ2)≤P(⋃Ai)≤Nδ. What does this say when Nδ=0.01?

Hint

P(⋃Ai)=1−(1−δ)N. Use 1−x≤e−x and e−y≤1−y+y2/2 for y≥0.

Solution

The upper bound is the union bound. For the lower, (1−δ)N≤e−Nδ≤1−Nδ+(Nδ)2/2, so 1−(1−δ)N≥Nδ−(Nδ)2/2. With Nδ=0.01, the union bound is off by at most half a percent of its value. It is wasteful only when the events overlap heavily.

From Vershynin, High-Dimensional Probability (2nd ed., Cambridge, pre-publication version, 2025)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 1.11Lp norms increase with p

(a) Show that ‖X‖Lp≤‖X‖Lq whenever 0<p≤q≤∞. (b) Show this cannot be reversed: for any p<q, find X with ‖X‖Lp<∞ but ‖X‖Lq=∞.

Hint

(a) Jensen with the convex function x↦xq/p. (b) A polynomial tail P{X>t}=t−q sits right on the edge.

Solution

(a) For q<∞, φ(x)=xq/p is convex on [0,∞), so (E|X|p)q/p≤E(|X|p)q/p=E|X|q. Take q-th roots. For q=∞, |X|≤‖X‖L∞ a.s., so E|X|p≤‖X‖L∞p.

(b) If q<∞, let X≥1 have P{X>t}=t−q for t≥1 (Pareto). Then EXr=1+∫1∞rtr−1t−qdt, finite iff r<q. So ‖X‖Lp<∞=‖X‖Lq. If q=∞, any unbounded variable with all moments works, e.g. X∼Exp(1).

Exercise 1.16Paley–Zygmund

For a nonnegative X with finite variance and ε∈[0,1], show P{X>εEX}≥(1−ε)2(EX)2EX2.

Hint

Split EX over the event E={X>εEX} and its complement, and apply Cauchy–Schwarz to the part on E.

Solution
EX=E[X1Ec]+E[X1E]≤εEX+EX2P(E).

So (1−ε)EX≤EX2P(E); square and divide by EX2. (Example of why a second-moment condition is needed: X=n with probability 1/n, else 0, has EX=1 but is 0 with probability 1−1/n.)

SimulationVershynin, Ch. 2: Concentration of Sums of Independent Random Variables

Concentration of sums

A sum of n independent terms with values in [0,1] exceeds its mean by s with probability at most e−2s2/n, for every n, not just in the limit. Hoeffding, Chernoff and Bernstein are three versions of this, and the differences between them matter exactly when some terms are rare.

The idea

Hoeffding. If ε1,…,εN are independent random signs and a∈RN, then P(∑aiεi≥t)≤exp(−t2/2‖a‖22). If instead Xi∈[mi,Mi] are independent,
P(∑i=1N(Xi−EXi)≥t)≤exp⁡(−2t2∑i(Mi−mi)2).
Chernoff. If Xi are independent Bernoulli(pi), S=∑Xi and μ=ES, then for t>μ,  P(S≥t)≤e−μ(eμ/t)t. For small μ this behaves like a Poisson tail and is far smaller than Hoeffding's bound.

All of these come from one move: apply Markov to eλS, factor EeλS using independence, and optimise over λ.

Subgaussian. ‖X‖ψ2=inf{K>0:Eexp⁡(X2/K2)≤2}. Finite ψ2 norm is equivalent, up to absolute constants, to tails P(|X|≥t)≤2e−t2/K2, to moments ‖X‖Lp≲Kp, and (for mean zero) to EeλX≤eCK2λ2.
General Hoeffding. For independent mean-zero subgaussian Xi,  P(|∑Xi|≥t)≤2exp⁡(−ct2/∑‖Xi‖ψ22).
Bernstein. For independent mean-zero subexponential Xi (‖X‖ψ1=inf{K:Ee|X|/K≤2} finite), with K=max‖Xi‖ψ1,
P(|∑i=1NXi|≥t)≤2exp⁡(−cmin(t2∑i‖Xi‖ψ12, tK)):

a Gaussian tail for moderate t, an exponential one far out.

Key terms in plain words

The ideas above without the symbols. Switch to Quiz me to test yourself: you see an explanation and pick the term it describes.

Hoeffding's inequality
A sum of independent bounded variables rarely strays far from its mean: the chance of straying by t falls off like e−t2, scaled by the ranges of the variables.
Chernoff bound
A sharper tail bound for sums of independent yes-or-no variables, especially when successes are rare: it behaves like a Poisson tail.
Subgaussian
Describes a random variable whose tails die off at least as fast as a normal distribution's. Bounded variables and normal ones are examples.
ψ₂ norm
A single number measuring the spread of a variable with normal-like tails: the scale at which its tails look like a normal's.
Subexponential
Describes a variable whose tails may be heavier than a normal's but still fall off exponentially, like the square of a normal variable.
Bernstein's inequality
A tail bound for sums of independent variables with exponential tails: it looks like a normal tail for moderate deviations and only exponential far out.

Explore

exact P(S≥k), S∼Bin(n,p) simulated Chebyshev Hoeffding Chernoff

Worked example

An A/B test estimates a click rate p by the fraction p^ of N independent users who click. We want |p^−p|<0.01 with probability at least 0.999. How many users are needed?

  1. Use Chebyshev, knowing only p(1−p)≤1/4.

    P(|p^−p|≥0.01)≤p(1−p)N⋅10−4≤14N⋅10−4. Setting this to 10−3 gives N≥2500000.

  2. Use Hoeffding (each click indicator lies in [0,1]).

    Two-sided: P(|p^−p|≥ε)≤2e−2Nε2. We need 2e−2N⋅10−4≤10−3, i.e. N≥ln⁡(2000)/(2⋅10−4)≈38005. Sixty-five times fewer users.

  3. Suppose you also know p≤0.02. Bernstein's inequality for variables with |Xi−p|≤1 reads P(|∑(Xi−p)|≥t)≤2exp⁡(−t2/2Nσ2+t/3). What N does it give?

    Here σ2=p(1−p)≤0.02⋅0.98=0.0196 and t=Nε, so the exponent is Nε2/(2(σ2+ε/3)). We need it to be at least ln⁡2000≈7.60:

    N ≥ 2(0.0196+0.00333)⋅7.6010−4 ≈ 3487.

    Another factor of 11. Hoeffding pays for the worst-case variance 1/4; Bernstein pays only for the actual variance.

  4. How does each answer scale with the failure probability δ?

    Chebyshev needs N∝1/δ; Hoeffding and Bernstein need N∝log⁡(1/δ). Asking for δ=10−6 instead of 10−3 multiplies the Chebyshev answer by 1000, but the Hoeffding answer by less than 2.

Check your understanding

Which of these random variables is not subgaussian?

  1. A random variable with |X|≤5 almost surelyBounded variables are subgaussian: EeX2/K2≤e25/K2, which is at most 2 for large K.
  2. N(0,σ2)The Gaussian is the model subgaussian variable, with ‖X‖ψ2 a constant times σ.
  3. An exponential random variable
  4. A sum of 100 independent random signsThat sum is bounded by 100, and better, it has ψ2 norm of order 100.
P(X≥t)=e−t decays only exponentially, so EeX2/K2=∞ for every K. The exponential is the model subexponential variable, which is where Bernstein's inequality takes over.

S∼Bin(104,10−4), so ES=1. Hoeffding bounds P(S≥10) by about 0.98; Chernoff by about 8×10−7. Why is Hoeffding so weak here?

  1. It only uses that each term lies in [0,1], not that each term is almost always 0.
  2. Hoeffding needs identically distributed terms.It doesn't, and these terms are identically distributed anyway.
  3. Hoeffding needs symmetric terms.The version for bounded variables needs only independence and the ranges.
  4. Hoeffding only holds for large n.It holds for every n. It is a true bound here, just a useless one.
Hoeffding's exponent 2t2/n is what you'd get if every term had the largest variance a [0,1] variable can have, namely 1/4. Here the variance is 10−4. Chernoff (or Bernstein) sees the true variance. Try p=0.005 in the explorer.

Let Xi=gi2−1 with gi i.i.d. standard normal, so the Xi are mean-zero subexponential. For which deviations t does Bernstein give a Gaussian-type bound e−ct2/N for P(|∑i≤NXi|≥t)?

  1. For t≲N
  2. For t≳NCompare t2/N with t: which is smaller when t is large?
  3. For all tThen ∑Xi would be subgaussian, but P(X1≥t) alone already decays like e−t/2.
  4. Only for t≲NN is the typical size of the sum, but the Gaussian regime extends much further.
The minimum of t2/N and t is t2/N exactly when t≤N. So the sum looks Gaussian (scale N) well into its tail, and only beyond t≈N does the exponential tail of a single term take over.

Practice

Two subgaussian normsComputing ψ₂ from the definition

(a) Show that if |X|≤M, then ‖X‖ψ2≤M/ln⁡2, with equality for X=±M with equal probability. (b) Compute ‖g‖ψ2 for g∼N(0,1).

Hint

For (b), Eesg2=(1−2s)−1/2 for s<1/2.

Solution

(a) EeX2/K2≤eM2/K2≤2 once K2≥M2/ln⁡2; for X=±M the first inequality is an equality, so this K is the smallest. (b) Set (1−2/K2)−1/2=2: then 1−2/K2=1/4, K2=8/3, ‖g‖ψ2=8/3≈1.633.

From MGFs to a tail boundThe exponential moment method

Suppose X1,…,XN are independent and EeλXi≤eλ2σi2/2 for all λ∈R. Prove P(∑Xi≥t)≤exp⁡(−t2/2∑σi2) for t≥0.

Solution

For λ>0, Markov and independence give P(S≥t)≤e−λt∏EeλXi≤exp⁡(−λt+λ2V/2) with V=∑σi2. The exponent is smallest at λ=t/V, where it equals −t2/2V. Random signs satisfy the hypothesis with σi=|ai|, because cosh⁡x≤ex2/2; this recovers Hoeffding.

From Vershynin, High-Dimensional Probability (2nd ed., Cambridge, pre-publication version, 2025)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 2.13Chernoff for Poisson

Let X∼Pois(μ). Prove: (a) P{X≥t}≤e−μ(eμ/t)t for t≥μ; (b) P{X≤t}≤e−μ(eμ/t)t for 0<t≤μ; (c) P{|X−μ|≥δμ}≤2e−δ2μ/3 for δ∈[0,1]; (d) P{X=t}≥e−μ(μ/t)t for integers t>0.

Hint

EeλX=exp⁡(μ(eλ−1)). Optimise Markov's inequality over λ; the optimum is eλ=t/μ.

Solution

(a) For λ≥0, P{X≥t}≤e−λteμ(eλ−1). With eλ=t/μ≥1 this is (μ/t)tet−μ=e−μ(eμ/t)t.

(b) For λ≥0, P{X≤t}=P{e−λX≥e−λt}≤eλteμ(e−λ−1). With e−λ=t/μ≤1 we get the same expression.

(c) At t=(1±δ)μ the bounds read exp⁡(−μh(±δ)) with h(u)=(1+u)ln⁡(1+u)−u. Elementary calculus gives h(δ)≥δ2/3 and h(−δ)≥δ2/2 on [0,1] (compare derivatives: h′(u)=ln⁡(1+u), h″(u)=1/(1+u)≥1/2). Add the two tails.

(d) P{X=t}=e−μμt/t!≥e−μ(μ/t)t, since t!≤tt.

Exercise 2.25Distributions that aren't subgaussian

Explain why the exponential, Poisson, geometric, chi-squared, Gamma, Cauchy and Pareto distributions are not subgaussian.

Hint

Subgaussian means P{|X|≥t}≤2e−t2/K2 for some K. Compare each tail with e−ct2.

Solution

For each, find a lower bound on the tail that decays slower than any e−ct2:

  • Exponential: P{X>t}=e−t.
  • Geometric: P{X>k}=(1−p)k, again exponential.
  • Poisson: P{X≥t}≥P{X=t}≥e−μ(μ/t)t=e−tln⁡(t/μ)−μ, which is e−O(tlog⁡t).
  • Chi-squared with k degrees of freedom: X≥g12, and P{g12>t}≈e−t/2.
  • Gamma(k,θ): density ∝xk−1e−x/θ, tail of order tk−1e−t/θ.
  • Cauchy: P{X>t}∼1/(πt); it doesn't even have a mean.
  • Pareto: polynomial tail t−α.

Since e−ct/e−c′t2→∞, none of these can satisfy a subgaussian tail bound. (The first five are subexponential; Cauchy and Pareto are heavier still.)

SimulationVershynin, Ch. 3: Random Vectors in High Dimensions

Random vectors in high dimensions

A standard Gaussian vector in Rn has length n±O(1), and two independent ones are almost perpendicular. Both facts are concentration of a sum, and together they make high-dimensional space behave very differently from the plane.

The idea

Concentration of the norm. If X=(X1,…,Xn) has independent coordinates with EXi2=1 and ‖Xi‖ψ2≤K, then ‖‖X‖2−n‖ψ2≤CK2. The length is n up to a fluctuation that does not grow with n.
Isotropic. A random vector is isotropic if EXXT=In, i.e. E⟨X,x⟩2=‖x‖22 for every x. Then E‖X‖22=n, and for an independent isotropic Y, E⟨X,Y⟩2=n.

So cos⁡∠(X,Y)≈⟨X,Y⟩/n is typically of size 1/n: independent random directions are nearly orthogonal. Examples of isotropic distributions: N(0,In), the uniform distribution on the sphere of radius n, random sign vectors, and the coordinate distribution nei with i uniform.

Covariance and PCA. Σ=E(X−μ)(X−μ)T. The top eigenvector of Σ is the direction u that maximises Var⁡⟨X,u⟩; the next ones maximise it orthogonally to the previous.
Grothendieck and max-cut. Relaxing ±1 labels to unit vectors turns hard quadratic optimisation into a semidefinite program. Grothendieck's inequality says the relaxation loses only a constant factor. For max-cut, rounding the SDP vectors with a random hyperplane (Goemans–Williamson) gives, in expectation, at least 0.878 times the SDP value, hence at least 0.878 times the maximum cut.

Explore

Coordinates
Left plot shows
Lengths of 1000 random vectors with independent unit-variance coordinates. normal approximation
Angles between 500 independent pairs. normal with sd 57.3°/√n

Worked example

Run Goemans–Williamson by hand on the 5-cycle C5 (vertices 0,…,4, edges {k,k+1} mod 5). The SDP is: maximise ∑{i,j}∈E12(1−⟨ui,uj⟩) over unit vectors ui.

  1. What is the maximum cut of C5?

    4. A cut of all 5 edges would 2-colour an odd cycle, which is impossible; alternating labels around the cycle cut 4 edges.

  2. Try planar vectors uk=(cos⁡4πk5,sin⁡4πk5). What SDP value do they give?

    Neighbours are at angle 4π/5, so each edge contributes 12(1−cos⁡4π5)=12(1+cos⁡π5)≈0.9045, and the total is 52(1+cos⁡π5)≈4.523. The relaxation beats every actual cut.

  3. Show no unit vectors do better. (Write the objective with the graph Laplacian L and the Gram matrix G=(⟨ui,uj⟩).)

    ∑E12(1−⟨ui,uj⟩)=14∑E‖ui−uj‖2=14tr⁡(LG)≤14λmax(L)tr⁡G=n4λmax(L), since G⪰0 with unit diagonal. For C5, λmax(L)=2−2cos⁡4π5, so the bound is 54(2+2cos⁡π5)≈4.523. The planar vectors are optimal.

  4. Round with a random hyperplane through the origin: vertex i goes to the side given by the sign of ⟨g,ui⟩. What is the expected cut, and how does it compare with the guarantee?

    An edge is cut when the hyperplane separates its two vectors, which happens with probability (angle)/π=4/5. So the expected cut is 5⋅45=4: the rounding finds a maximum cut on average. The ratio to the SDP value is 4/4.523≈0.884, just above the 0.878 guarantee; C5 is close to the worst case.

Check your understanding

X∼N(0,In) with n=104. Which description of ‖X‖2 is right?

  1. About 100, give or take about 1
  2. About 100, give or take about 10‖X‖2 fluctuates by about 2n≈141 around 104, but taking a square root divides that by 2n=200.
  3. About 104, give or take about 100That describes ‖X‖22, not ‖X‖2.
  4. Anywhere between 0 and 200 with comparable probabilityThe density of X peaks at the origin, but the volume near the origin is tiny. Look at the left histogram.
‖X‖=n+(‖X‖2−n)≈n+‖X‖2−n2n, and ‖X‖2−n has standard deviation 2n. So the fluctuation is about 2n/(2n)=1/2, whatever n is.

u,v are independent and uniform on the unit sphere Sn−1. What is the typical size of ⟨u,v⟩?

  1. Of order 1/n
  2. Of order 1/nThat is the size of E⟨u,v⟩2, not of |⟨u,v⟩|.
  3. Of order 1In the plane, yes. In high dimension, almost all of the sphere is near the "equator" orthogonal to u.
  4. Exactly 0Orthogonality is approximate; ⟨u,v⟩ has a continuous distribution.
Condition on u; by rotation invariance ⟨u,v⟩ has the law of one coordinate of v, and Ev12=1/n. In the explorer this is the shrinking spread of the angle histogram around 90°.

In Rn you want unit vectors that are pairwise almost orthogonal: |⟨ui,uj⟩|≤0.1 for i≠j. How many can you have?

  1. Exponentially many in n
  2. At most nThat is the limit for exactly orthogonal vectors. A little slack changes everything.
  3. At most n2Count with random vectors and the union bound: the failure probability per pair is exponentially small.
  4. At most 10nTry the union bound on N random vectors: for which N does it still work?
For random unit vectors, P(|⟨ui,uj⟩|>0.1)≤2e−cn. A union bound over N2 pairs succeeds as long as N2e−cn<1, so N=ecn/2 vectors work. This is one reason high-dimensional data can hold so many "independent" directions.

Practice

Volume lives near the surfaceThe uniform distribution on a ball

X is uniform in the unit ball of Rn. Show P(‖X‖2≤1−ε)≤e−εn. For n=1000, how thin is the outer shell that holds 99% of the volume?

Solution

By scaling, P(‖X‖≤r)=rn, so P(‖X‖≤1−ε)=(1−ε)n≤e−εn. For 99% in the shell, solve (1−ε)1000=0.01: ε=1−0.011/1000≈0.0046.

Norm concentration with only two momentsA Chebyshev version

For X∼N(0,In), use Var⁡‖X‖2=2n and the inequality |a−b|≤|a2−b2|/b (for a≥0, b>0) to show P(|‖X‖2−n|≥t)≤2/t2. What does the theorem above add?

Solution

|‖X‖−n|≤|‖X‖2−n|/n, so P(|‖X‖−n|≥t)≤P(|‖X‖2−n|≥tn)≤2n/(t2n)=2/t2. This already shows fluctuations are O(1). The theorem upgrades the 1/t2 tail to a subgaussian 2e−ct2, which is what union bounds over many vectors need.

From Vershynin, High-Dimensional Probability (2nd ed., Cambridge, pre-publication version, 2025)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 3.12Distance between isotropic vectors

Let X,Y be independent, mean-zero, isotropic random vectors in Rn. Show E‖X−Y‖22=2n.

Hint

Expand the square, and use E‖X‖22=trEXXT.

Solution

E‖X−Y‖22=E‖X‖22+E‖Y‖22−2E⟨X,Y⟩. Isotropy gives E‖X‖22=tr(In)=n, same for Y. By independence E⟨X,Y⟩=⟨EX,EY⟩=0. Total 2n. (Combined with concentration of the norm, independent isotropic vectors are typically about 2n apart, so nearly orthogonal.)

Exercise 3.41Exponentially many almost orthogonal vectors

Show there are N points X1,…,XN∈Sn−1 with |⟨Xi,Xj⟩|≤0.01 for all i≠j, as long as N≤ecn. (a) Show that independent X,Y∼Unif(Sn−1) have |⟨X,Y⟩|≤0.01 with probability at least 1−4e−c0n. (b) Use a union bound.

Hint

Condition on Y. Then ⟨X,Y⟩ is a one-dimensional marginal of the uniform distribution on the sphere, which is subgaussian at scale 1/n.

Solution

(a) Fix Y=y. The vector nX is subgaussian with ‖⟨nX,y⟩‖ψ2≤C (uniform distribution on the sphere, Theorem 3.4.5). So P{|⟨X,y⟩|>0.01}≤2exp⁡(−c(0.01)2n). This bound doesn't depend on y, so it holds unconditionally; call the exponent c0n.

(b) Draw X1,…,XN independently uniform on the sphere. By the union bound over fewer than N2 pairs, the probability that some pair fails is at most N2⋅4e−c0n. If N≤ec0n/3 this is at most 4e−c0n/3<1 once n≥n0. For n<n0 choose c≤c0/3 small enough that ecn<2, so N=1 and there is nothing to prove. With positive probability all pairs are fine, so such points exist.

SimulationVershynin, Ch. 4: Random Matrices

Singular values of random matrices

A tall m×n random matrix stretches every direction by almost the same factor m: its singular values all lie in [m−Cn, m+Cn]. The proof combines one-direction concentration with a union bound over an ε-net of the sphere.

The idea

Singular values. s1(A)≥⋯≥sn(A)≥0 are the square roots of the eigenvalues of ATA.  s1=‖A‖=maxx∈Sn−1‖Ax‖2 and, for m≥n, sn=minx∈Sn−1‖Ax‖2. All singular values lie in [a,b] exactly when a‖x‖≤‖Ax‖≤b‖x‖ for every x.
Nets and covering numbers. N⊆K is an ε-net of K if every point of K is within ε of N. The smallest size is the covering number N(K,ε). By a volume argument, N(Sn−1,ε)≤(1+2/ε)n.
Two-sided bound. If A is m×n with independent, mean-zero, isotropic, subgaussian rows, ‖Ai‖ψ2≤K, then for every t≥0, with probability at least 1−2e−t2,
m−CK2(n+t) ≤ sn(A) ≤ s1(A) ≤ m+CK2(n+t).

For Gaussian entries the constant is sharp: Es1≤m+n and Esn≥m−n (proved in Chapter 7). Equivalently, ‖1mATA−In‖≲n/m+n/m.

Covariance estimation. For m i.i.d. subgaussian samples in Rn with covariance Σ, the sample covariance satisfies E‖Σm−Σ‖≲(n/m+n/m)‖Σ‖. So m≈n/ε2 samples give relative error ε: linear in the dimension.

Explore

Singular values of m×n matrices with i.i.d. N(0,1) entries, divided by m. [m−n, m+n]/m Marchenko–Pastur limit latest draw

Worked example

Bound the number of points needed for an ε-net of the sphere Sn−1, and see why that number decides how many rows a random matrix needs.

  1. Take a maximal ε-separated subset N of Sn−1 (pairwise distances >ε, and no point can be added). Why is it an ε-net?

    If some x∈Sn−1 were at distance >ε from all of N, we could add it and stay separated, contradicting maximality.

  2. Bound |N| by comparing volumes.

    Balls of radius ε/2 around the points of N are disjoint and all lie in the ball of radius 1+ε/2. Comparing volumes,

    |N|(ε2)n≤(1+ε2)n⟹|N|≤(1+2ε)n.

    For ε=1/2, at most 5n points.

  3. For a fixed unit x, ‖Ax‖2=∑i⟨Ai,x⟩2 is a sum of m independent terms with mean 1. What does Bernstein give?

    Each ⟨Ai,x⟩2−1 is mean-zero subexponential with norm ≲K2. Bernstein gives P(|1m‖Ax‖2−1|≥12)≤2e−cm, with c depending only on K.

  4. Union bound over a 12-net. When does it work?

    The probability that some net point fails is at most 2⋅5ne−cm, which is small once m≥Cn. Then ‖Ax‖≈m on the whole net, and an approximation argument (any x is within 12 of a net point) extends the bounds to the whole sphere. The net has exponentially many points, but exponential concentration pays for them. That is why the number of rows needs to be only proportional to n.

Check your understanding

A is a 1000×10 matrix with i.i.d. N(0,1) entries. Where do you expect its singular values?

  1. Roughly in [28.5, 34.8]
  2. Roughly in [0, 31.6]The matrix is very tall, so it is far from singular: s10 is close to m, not to 0.
  3. Roughly in [990, 1010]Those would be eigenvalues of ATA if they concentrated to within ±10; singular values are their square roots.
  4. All within ±0.1 of 31.6The spread is of order n≈3.2, not o(1).
1000≈31.62 and 10≈3.16, so [m−n,m+n]≈[28.5,34.8]. Set m=400, n=4 in the explorer for a similar ratio.

For a square n×n Gaussian matrix, m−n=0. What is true of its smallest singular value?

  1. It is typically of order 1/n: much smaller than the rest, but not zero.
  2. It is typically of order n, like the others.Take n=m in the explorer and look at the left end of the histogram.
  3. It is 0 with positive probability.The set of singular matrices has measure zero, so a Gaussian matrix is invertible almost surely.
The bound sn≥m−Cn becomes trivial when m=n. Finer arguments show sn(A)≈1/n, while s1≈2n, so the condition number is of order n.

To show ‖A‖≤Cm by a union bound over a 12-net of Sn−1, roughly how small must P(‖Ax‖>C′m) be for a single fixed x?

  1. Much smaller than 5−n
  2. Smaller than 1/nThe net has about 5n points, not n.
  3. Smaller than 1/2That controls one direction. The norm is a maximum over all directions at once.
  4. It doesn't matter, the net handles it.The net only makes the set of directions finite. The union bound still costs its size.
The union bound multiplies the single-direction failure probability by |N|≤5n. Exponential tails e−cm beat this once m≳n. Polynomial (Chebyshev) tails would not.

Practice

All 2×2 sign matricesAn exact computation

Let A be a 2×2 matrix with independent ±1 entries. Find the distribution of ‖A‖ and s2(A), and compute E‖A‖ and Es2(A). Compare with m±n.

Hint

The second row is either ± the first row, or orthogonal to it.

Solution

With probability 1/2 the rows are ± each other: A has rank 1, ‖A‖=2, s2=0. Otherwise the rows are orthogonal of length 2, so A/2 is orthogonal and s1=s2=2. Hence E‖A‖=(2+2)/2≈1.71 and Es2=2/2≈0.71, inside [2−2,2+2]=[0,2.83]. For tiny matrices the bounds are true but say little.

Approximate isometriesFrom AᵀA to singular values

Show that if ‖1mATA−In‖≤δ with δ<1, then every singular value of A lies in [m(1−δ), m(1+δ)], and hence in [m(1−δ),m(1+δ)].

Solution

1mATA−I is symmetric with eigenvalues si2/m−1, and its norm is the largest of their absolute values. So |si2/m−1|≤δ, i.e. si2∈[m(1−δ),m(1+δ)]. Finally 1−δ≥1−δ and 1+δ≤1+δ.

From Vershynin, High-Dimensional Probability (2nd ed., Cambridge, pre-publication version, 2025)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 4.35Computing a norm on a net

Let N be an ε-net of Sn−1 (ε<1) and x∈Rn. Show supy∈N⟨x,y⟩≤‖x‖2≤11−εsupy∈N⟨x,y⟩.

Hint

For the right inequality, approximate the direction x/‖x‖2 by a net point.

Solution

Left: Cauchy–Schwarz, since ‖y‖2=1.

Right: assume x≠0 and let u=x/‖x‖2. Pick y∈N with ‖u−y‖2≤ε. Then ⟨x,y⟩=⟨x,u⟩−⟨x,u−y⟩≥‖x‖2−ε‖x‖2. Rearrange.

Exercise 4.47Intermediate singular values

From the two-sided bound m−CK2(n+t)≤sn(A) (Theorem 4.6.1, with probability ≥1−2e−t2) for an m×n matrix with independent, isotropic, subgaussian rows, deduce that for fixed 1≤k≤n, sk(A)≥m−CK2(k+t) with probability at least 1−2e−t2.

Hint

Courant–Fischer: sk(A)=maxdim⁡E=kminx∈E,‖x‖=1‖Ax‖2. Pick a coordinate subspace.

Solution

Let E be the span of the first k coordinate vectors and AE the m×k matrix of the first k columns. By the min–max theorem,

sk(A)≥minx∈E, ‖x‖2=1‖Ax‖2=sk(AE)=smin(AE).

The rows of AE are the restrictions of the rows of A to the first k coordinates. They are still independent and mean zero, they are isotropic in Rk (a principal submatrix of In), and their subgaussian norm is at most K (each marginal ⟨⋅,x⟩ with x∈E is a marginal of the original row). Apply Theorem 4.6.1 to AE with n replaced by k.

SimulationVershynin, Ch. 5: Concentration Without Independence

Lipschitz concentration and Johnson–Lindenstrauss

Any Lipschitz function of a high-dimensional Gaussian (or of a uniform point on the sphere) is nearly constant, whether or not it is a sum. One consequence: N points in any dimension can be projected to about log⁡N/ε2 dimensions with every pairwise distance preserved up to 1±ε.

The idea

Gaussian concentration. If X∼N(0,In) and f:Rn→R is L-Lipschitz, then for all t≥0
P(|f(X)−Ef(X)|≥t)≤2e−t2/2L2.
On the sphere. If X is uniform on nSn−1 and f is L-Lipschitz, then ‖f(X)−Ef(X)‖ψ2≤CL. The coordinates of X are not independent; the concentration comes from the geometry of the sphere (isoperimetry).
Johnson–Lindenstrauss. Let x1,…,xN∈Rn and ε∈(0,1). If k≥Cε−2log⁡N and P is a k×n matrix with i.i.d. N(0,1/k) entries (or a suitably scaled random projection), then with high probability
(1−ε)‖xi−xj‖2≤‖Pxi−Pxj‖2≤(1+ε)‖xi−xj‖2for all i,j.

The target dimension depends on N and ε but not on n, and P is chosen without looking at the data. The proof: for one fixed vector u, ‖Pu‖/‖u‖ concentrates at 1 with subgaussian tails in kε; then union-bound over the (N2) differences.

Matrix Bernstein. For independent mean-zero symmetric n×n random matrices Xi with ‖Xi‖≤K and σ2=‖∑EXi2‖,
P(‖∑iXi‖≥t)≤2nexp⁡(−t2/2σ2+Kt/3).

The dimension enters only as the factor n in front, i.e. as a log⁡n in the deviation. It handles covariance estimation for general (not subgaussian) distributions.

Key terms in plain words

The ideas above without the symbols. Switch to Quiz me to test yourself: you see an explanation and pick the term it describes.

Lipschitz function
A function that can't change faster than a fixed rate: moving the input by a distance d moves the output by at most a fixed multiple of d.
Gaussian concentration
Any gently varying function of many independent normal variables is almost constant: it stays near its average with very high probability.
Concentration on the sphere
For a random point on a high-dimensional sphere, every gently varying function is almost constant, even though the coordinates are not independent. The cause is the sphere's geometry.
Random projection
Multiplying data by a random matrix to get a shorter version of each point. Done right, it keeps distances nearly the same without looking at the data first.
Johnson–Lindenstrauss lemma
Any set of points can be squashed by a random linear map into a number of dimensions that grows only like the logarithm of the number of points, with every distance nearly preserved.
Matrix Bernstein inequality
A tail bound for sums of independent random matrices: the size of the total concentrates, and the dimension costs only a logarithmic factor.

Explore

Data in ℝ³⁰⁰
How each pairwise distance changes. [1−ε,1+ε], ε = worst pair
worst distortion for this projection, every k rough guide 2ln⁡N/k

Worked example

Let g∼N(0,In) and M=maxi≤ngi. How large is M, and how much does it fluctuate?

  1. Bound EM. (Hint: eλEM≤EeλM.)

    By Jensen, eλEM≤EeλM≤∑iEeλgi=neλ2/2. So EM≤ln⁡nλ+λ2, and λ=2ln⁡n gives EM≤2ln⁡n. For n=106 that is about 5.26.

  2. Show that f(x)=maxixi is 1-Lipschitz for the Euclidean norm.

    If the max of x is at i, then f(x)−f(y)≤xi−yi≤‖x−y‖∞≤‖x−y‖2. Swap the roles of x and y for the other direction.

  3. What does Gaussian concentration give?

    P(|M−EM|≥t)≤2e−t2/2 for every n. The maximum of a million Gaussians grows like 2ln⁡n, but it fluctuates by O(1) regardless of n. (Its true fluctuations are even smaller, but the theorem needs no work to give O(1).) Independence was never used in step 3; only the Lipschitz property was.

  4. The same reasoning applies to f(x)=‖Px−Py‖ as a function of the Gaussian entries of P. Compute its Lipschitz constant and explain why JL needs k≳log⁡N/ε2.

    With u=x−y a unit vector and P=G/k, ‖Pu‖=‖Gu‖/k, and G↦‖Gu‖ is 1-Lipschitz in the Frobenius norm of G. So ‖Pu‖ deviates from its mean (which is close to 1) by more than ε with probability ≤2e−kε2/2, roughly. For all (N2) pairs to succeed we need N2e−kε2/2≪1, i.e. k≳4ln⁡N/ε2.

Check your understanding

In the Johnson–Lindenstrauss lemma, what does the target dimension k depend on?

  1. Only on the number of points N and the accuracy ε
  2. On the ambient dimension nThe proof handles one difference vector at a time, and the law of ‖Pu‖/‖u‖ is the same in every dimension.
  3. On how the points are arrangedThe projection is chosen without looking at the data. Switch data sets in the explorer.
  4. Only on εMore points mean more pairs that could fail; the union bound charges log⁡N.
k≈Cε−2log⁡N. A million points can be embedded in a few thousand dimensions with 10% distortion, whether they started in R104 or R109.

X∼N(0,In) and f is 1-Lipschitz. Which statement is guaranteed for every n?

  1. f(X) stays within O(1) of Ef(X) with high probability.
  2. f(X) is approximately Gaussian.Concentration controls the size of fluctuations, not their shape. Think of f(x)=|x1|.
  3. Ef(X) is bounded independently of n.f(x)=‖x‖2 is 1-Lipschitz and E‖X‖≈n.
  4. Var⁡f(X)=1.The variance is at most of order 1 (in fact at most 1), but it can be much smaller, e.g. 0 for a constant f.
The tail bound 2e−t2/2 does not depend on n at all, while Ef(X) can grow with n. So in relative terms, functions like ‖X‖ become nearly deterministic.

Fix the target dimension k and add more and more points. How does the worst distortion over all pairs typically grow with N?

  1. Like log⁡N
  2. It stays the same.Each new pair is another chance for an unlucky ratio.
  3. Like NThat would follow from Chebyshev-type tails. The per-pair tail is Gaussian.
  4. Like N2The number of pairs grows like N2, but the distortion only like the square root of its logarithm.
The worst of M≈N2/2 roughly Gaussian deviations of size 1/2k is about 2ln⁡M/2k≈2ln⁡N/k. Slide N in the explorer: going from 10 to 150 points (fifteen times as many) raises the curve by less than half.

Practice

Sizing a projectionUnion bound arithmetic

Suppose that for each fixed difference vector, a random projection to k dimensions distorts its length by more than ε with probability at most 2e−kε2/8. How large should k be so that N=104 points keep all pairwise distances within 20%, with failure probability at most 1%?

Solution

There are fewer than N2/2 pairs, so the failure probability is below N2e−kε2/8. Require N2e−kε2/8≤0.01: k≥8ln⁡(100N2)/ε2=8ln⁡(1010)/0.04≈4605. The original dimension never entered.

The norm of a Gaussian imageLipschitz constant of x ↦ ‖Ax‖

Let A be a fixed m×n matrix and g∼N(0,In). Show that ‖Ag‖2 fluctuates around its mean by O(‖A‖), while E‖Ag‖2≤‖A‖F. When is the fluctuation small compared with the mean?

Hint

|‖Ax‖−‖Ay‖|≤‖A(x−y)‖. For the mean, use Jensen and E‖Ag‖2=‖A‖F2.

Solution

x↦‖Ax‖ is ‖A‖-Lipschitz, so P(|‖Ag‖−E‖Ag‖|≥t)≤2e−t2/2‖A‖2. Also (E‖Ag‖)2≤E‖Ag‖2=‖A‖F2, and since the variance is O(‖A‖2), E‖Ag‖≥‖A‖F−C‖A‖. The fluctuation is small relative to the mean when ‖A‖F/‖A‖ is large, i.e. when the stable rank ‖A‖F2/‖A‖2 is large.

From Vershynin, High-Dimensional Probability (2nd ed., Cambridge, pre-publication version, 2025)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 5.9The maximum of Gaussians concentrates

(a) For independent Xi∼N(0,1), show ‖maxiXi−EmaxiXi‖ψ2≤C. (b) For jointly normal X1,…,Xn (any covariance), show ‖maxiXi−EmaxiXi‖ψ2≤CmaxiVar(Xi).

Hint

Gaussian concentration for Lipschitz functions. Write jointly normal variables as μi+⟨vi,g⟩ with g∼N(0,I).

Solution

(a) f(x)=maxixi is 1-Lipschitz for ‖⋅‖2: |maxx−maxy|≤maxi|xi−yi|≤‖x−y‖2. Gaussian concentration gives ‖f(g)−Ef(g)‖ψ2≤C.

(b) Write X=μ+Vg with g∼N(0,In) and rows vi of V (e.g. V=Σ1/2). Then maxiXi=f(g) with f(x)=maxi(μi+⟨vi,x⟩), which is Lipschitz with constant maxi‖vi‖2=maxiVarXi. Apply Gaussian concentration again.

Exercise 5.14Johnson–Lindenstrauss with subgaussian matrices

Let A be m×n with independent, mean-zero, isotropic, subgaussian rows, and Q=A/m. Show the Johnson–Lindenstrauss lemma holds for Q: for N points and m≥CK4ε−2log⁡N, all pairwise distances are preserved up to a factor 1±ε with high probability. Why does this cover random ±1 matrices?

Hint

For a fixed unit vector z, Az has independent coordinates with unit variance. Apply concentration of the norm (Theorem 3.1.1), then a union bound over pairs.

Solution

Fix a unit vector z. The coordinates ⟨Ai,z⟩ of Az are independent, mean zero, with E⟨Ai,z⟩2=1 (isotropy) and ‖⟨Ai,z⟩‖ψ2≤K. Concentration of the norm gives ‖‖Az‖2−m‖ψ2≤CK2, so

P{|‖Qz‖2−1|>ε}≤2exp⁡(−cε2m/K4).

Apply this to zij=(xi−xj)/‖xi−xj‖2 for each of the fewer than N2 pairs. The union bound gives failure probability at most 2N2e−cε2m/K4, which is small once m≥CK4ε−2log⁡N. On the good event, (1−ε)‖xi−xj‖≤‖Qxi−Qxj‖≤(1+ε)‖xi−xj‖.

A matrix with i.i.d. ±1 entries has independent rows, mean zero, isotropic (EAijAik=δjk), and bounded hence subgaussian entries, so its rows are subgaussian with K≤C.

SimulationVershynin, Ch. 6: Quadratic Forms, Symmetrization and Contraction

Quadratic forms and symmetrization

A quadratic form XTAX of independent variables is a sum of dependent terms aijXiXj. It still concentrates: its tail is Gaussian at scale ‖A‖F and exponential at scale ‖A‖, and the ratio of the two decides which one you see.

The idea

Decoupling. Let A have zero diagonal, X have independent mean-zero coordinates, and X′ be an independent copy of X. For every convex F,
EF(∑i≠jaijXiXj)≤EF(4∑i,jaijXiXj′).

The right side is linear in X once X′ is fixed, so tools for sums apply.

Hanson–Wright. If X has independent mean-zero coordinates with ‖Xi‖ψ2≤K, then for every n×n matrix A and t≥0,
P(|XTAX−EXTAX|≥t)≤2exp⁡(−cmin(t2K4‖A‖F2, tK2‖A‖)).
Symmetrization. For independent mean-zero random vectors Xi in a normed space and independent random signs εi,
12E‖∑εiXi‖≤E‖∑Xi‖≤2E‖∑εiXi‖.
Contraction. For fixed vectors xi and real ai,  E‖∑aiεixi‖≤‖a‖∞E‖∑εixi‖. Together, these let you replace arbitrary summands by sign-weighted ones and then strip off bounded coefficients. One application in the chapter: completing a low-rank matrix from a few random entries.

Explore

20,000 draws of XTAX, X∼N(0,I200), standardised. N(0,1)
exact tail simulated Laurent–Massart bound Gaussian guess

Worked example

Let X∼N(0,I2) and A=(2110), so XTAX=2X12+2X1X2. Find its mean and variance, and the two scales in Hanson–Wright.

  1. Compute EXTAX for any isotropic X.

    EXTAX=Etr⁡(AXXT)=tr⁡(AEXXT)=tr⁡A=2.

  2. For Gaussian X and symmetric A, show Var⁡XTAX=2‖A‖F2.

    Write A=UΛUT. Then Z=UTX∼N(0,I) by rotation invariance, and XTAX=∑λiZi2, a sum of independent terms with Var⁡(λiZi2)=2λi2. So the variance is 2∑λi2=2‖A‖F2.

  3. Apply it to this A, and check directly.

    The eigenvalues are 1±2, so ‖A‖F2=(1+2)2+(1−2)2=6 (also 4+1+1+0), and the variance is 12. Directly: Var⁡(2X12)=8, Var⁡(2X1X2)=4, and Cov⁡(X12,X1X2)=EX13EX2=0. Total 12.

  4. What are ‖A‖F and ‖A‖, and where does the tail switch from Gaussian to exponential?

    ‖A‖F=6≈2.45 and ‖A‖=1+2≈2.41. The two terms in the minimum cross at t≈‖A‖F2/‖A‖≈2.49, less than one standard deviation (12≈3.46). So this form has essentially no Gaussian regime: it is dominated by the single large eigenvalue, like λ1Z12. In the explorer this is stable rank r≈1.

Check your understanding

X has independent ±1 coordinates and A=In. Then XTAX=n always, but Hanson–Wright allows fluctuations of order ‖A‖F=n. Is something wrong?

  1. No: Hanson–Wright is an upper bound, and here the diagonal terms Xi2=1 don't fluctuate at all.
  2. Yes: Hanson–Wright requires Gaussian coordinates.It holds for any independent mean-zero subgaussian coordinates, signs included.
  3. Yes: the fluctuation must be exactly of order ‖A‖F.The theorem bounds the tail from above. Nothing forces the form to fluctuate that much.
For Gaussian X, ‖X‖2 does fluctuate by 2n, so the bound is sharp in general. For signs the diagonal part is deterministic and only off-diagonal entries contribute: the variance is 2∑i≠jaij2 (for symmetric A).

X∼N(0,In) with n large. For which A is XTAX, after standardising, closest to a normal distribution?

  1. A=In
  2. A=uuT with ‖u‖=1Then XTAX=⟨u,X⟩2 is a single χ12: stable rank 1, the most skewed case.
  3. A=diag⁡(n,1,1,…,1)One eigenvalue dominates: ‖A‖F2≈n2=‖A‖2, so the stable rank is about 1.
The shape is governed by the stable rank ‖A‖F2/‖A‖2. For In it is n, so XTAX=χn2 is a sum of many comparable independent terms and the CLT kicks in. Slide r in the explorer.

The symmetrization inequality E‖∑Xi‖≤2E‖∑εiXi‖ requires the Xi to be:

  1. Independent with mean zero
  2. SymmetricIf they were symmetric, ∑Xi and ∑εiXi would have the same law. Symmetrization is how you avoid assuming that.
  3. BoundedOnly integrability is needed.
  4. Identically distributedThe proof treats each Xi separately; no common distribution is needed.
Mean zero is essential: for Xi≡1 in R, E|∑Xi|=N while E|∑εi|≈2N/π. The proof subtracts an independent copy, which is harmless only when EXi=0.

Practice

Estimating a trace with random signsHutchinson's estimator

You can only access a symmetric matrix A through products x↦Ax. Show that for X with independent ±1 entries, EXTAX=tr⁡A and Var⁡XTAX=2∑i≠jaij2. Why are signs better than Gaussians here?

Solution

XTAX=∑iaii+2∑i<jaijXiXj. The products XiXj, i<j, have mean 0, variance 1 and are pairwise uncorrelated, so the variance is 4∑i<jaij2=2∑i≠jaij2. With Gaussian X it is 2‖A‖F2, which also counts the diagonal. For a nearly diagonal A, signs are far more accurate.

Symmetrization on the lineThe basic argument

Prove E|∑Xi|≤2E|∑εiXi| for independent mean-zero real Xi.

Hint

Let X′ be an independent copy. Write ∑Xi=∑(Xi−EXi′) and use Jensen conditionally on X.

Solution

E|∑Xi|=E|∑(Xi−E′Xi′)|≤E|∑(Xi−Xi′)| by Jensen. Each Xi−Xi′ is symmetric, and they are independent, so (Xi−Xi′)i has the same law as (εi(Xi−Xi′))i. Then the triangle inequality gives E|∑εi(Xi−Xi′)|≤2E|∑εiXi|.

From Vershynin, High-Dimensional Probability (2nd ed., Cambridge, pre-publication version, 2025)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 6.7Hanson–Wright for Gaussians, the short way

Give a proof of the Hanson–Wright inequality for X∼N(0,In) that avoids separating the diagonal and avoids decoupling: show P{|XTAX−EXTAX|≥t}≤2exp⁡(−cmin(t2‖A‖F2,t‖A‖)).

Hint

Replace A by its symmetric part, diagonalise it, and use rotation invariance of the Gaussian.

Solution

XTAX=XTBX with B=(A+AT)/2, and ‖B‖F≤‖A‖F, ‖B‖≤‖A‖. Write B=UTΛU with U orthogonal. Since UX∼N(0,In), XTBX has the same law as ∑iλigi2 with gi i.i.d. standard normal. So

XTAX−EXTAX=d∑iλi(gi2−1).

The gi2−1 are independent, mean zero and subexponential with ‖gi2−1‖ψ1≤C. Bernstein's inequality for weighted sums gives a tail 2exp⁡(−cmin(t2/∑λi2, t/max|λi|)). Finally ∑λi2=‖B‖F2≤‖A‖F2 and max|λi|=‖B‖≤‖A‖.

Exercise 6.20Symmetrization through a convex function

Let X1,…,XN be independent, mean-zero random vectors in a normed space, εi independent random signs, and F:R+→R increasing and convex. Show EF(12‖∑εiXi‖)≤EF(‖∑Xi‖)≤EF(2‖∑εiXi‖).

Hint

Repeat the proof of the symmetrization lemma with an independent copy X′. The two facts you need are that F(‖⋅‖) is convex (so Jensen works) and that Xi−Xi′ is symmetric.

Solution

Let X′ be an independent copy, and note G=F∘‖⋅‖ is convex (increasing convex of convex).

Upper bound. Since EXi′=0, Jensen applied conditionally on X gives EG(∑Xi)≤EG(∑(Xi−Xi′)). Each Xi−Xi′ is symmetric, so this equals EG(∑εi(Xi−Xi′)). By the triangle inequality, monotonicity and convexity of F,

F(‖∑εiXi‖+‖∑εiXi′‖)≤12F(2‖∑εiXi‖)+12F(2‖∑εiXi′‖),

and both terms have the same expectation.

Lower bound. Conditionally on ε and X, Jensen gives G(12∑εiXi)≤EX′G(12∑εi(Xi−Xi′)). By symmetry the right side has the law of G(12∑(Xi−Xi′)), and convexity gives G(12(u−v))≤12G(u)+12G(−v). Taking expectations, EG(12∑εiXi)≤EG(∑Xi).

SimulationVershynin, Ch. 7: Random Processes

Gaussian processes and Gaussian width

How big is a set in Rn? Its Gaussian width, the expected maximum of a random linear function over it, is the answer that matters for random projections and for recovery problems. Some sets that look large, like the ℓ1 ball, turn out to be tiny.

The idea

Canonical Gaussian process. For T⊆Rn and g∼N(0,In), Xt=⟨g,t⟩. Its increments are (E(Xt−Xs)2)1/2=‖t−s‖2, so the geometry of T is the geometry of the process.
Gaussian width. w(T)=Esupt∈T⟨g,t⟩. It is translation invariant, unchanged by taking the convex hull, and w(T)2 behaves like an effective dimension: for a unit ball of a k-dimensional subspace, w≈k.
Sudakov–Fernique. If (Xt) and (Yt) are mean-zero Gaussian processes with E(Xt−Xs)2≤E(Yt−Ys)2 for all t,s, then EsupXt≤EsupYt. Smaller increments mean a smaller supremum. This comparison gives E‖G‖≤m+n for an m×n Gaussian matrix, and Gordon's min–max version gives Esn(G)≥m−n.
Sudakov's minoration. Esupt∈TXt≥cεlog⁡N(T,ε) for every ε>0: a set with many well-separated points has a large supremum.
Random projections of sets. If P is the orthogonal projection onto a random k-dimensional subspace of Rn, then with high probability diam⁡(PT)≲w(T)/n+k/ndiam⁡(T). The first term wins when k≲w(T)2/diam⁡(T)2: below its effective dimension, a set shrinks to a size set by its width, not by k.

Explore

Set T (inside the unit ball)
ball ≈n cube =2n/π 5-sparse unit vectors ℓ1 ball ≈2ln⁡n
Distribution of supt∈T⟨g,t⟩ at the chosen dimension; the dashed line is its mean, w(T).

Worked example

Compute, or bound, the Gaussian width of the cross-polytope B1n={t:∑|ti|≤1}, and compare it with the Euclidean ball.

  1. Express supt∈B1n⟨g,t⟩ in terms of g.

    A linear function on a polytope is maximised at a vertex, and the vertices are ±ei. So the sup is maxi|gi|=‖g‖∞, and w(B1n)=E‖g‖∞.

  2. Bound Emaxi|gi| using the moment generating function.

    The maximum is over the 2n variables ±gi. For λ>0, Jensen gives eλEmax≤∑Ee±λgi=2neλ2/2, so Emax≤ln⁡2nλ+λ2. With λ=2ln⁡2n: w(B1n)≤2ln⁡(2n).

  3. Put in n=1000. How good is the bound?

    The bound is 2ln⁡2000≈3.90. The exact value (an integral of the normal distribution function, which the explorer computes) is about 3.44. For comparison, w(B21000)=E‖g‖2≈31.6.

  4. What does this mean for a random projection of B1n?

    Its effective dimension is w2≈2ln⁡n≈14 for n=1000. A random projection to k dimensions with k well above 14 shrinks it to diameter about k/n times the original, and for smaller k to about w/n≈0.11. The ball, by contrast, has effective dimension n. This gap is what makes sparse recovery possible in Chapter 9.

Check your understanding

T⊆Rn and A is an n×n matrix with ‖A‖≤1. How do w(AT) and w(T) compare?

  1. w(AT)≤w(T)
  2. w(AT)≥w(T)A contraction can only shrink the increments ‖At−As‖.
  3. They are equal.Take A=0: then w(AT)=0.
  4. No general relation.Compare the increments of the two processes and use Sudakov–Fernique.
⟨g,At⟩ is a Gaussian process with increments ‖A(t−s)‖≤‖t−s‖, smaller than those of ⟨g,t⟩. Sudakov–Fernique gives Esupt⟨g,At⟩≤Esupt⟨g,t⟩.

How does the Gaussian width of T compare with that of its convex hull?

  1. They are equal.
  2. w(conv⁡T) can be much larger.For a fixed g, a linear function's sup over the convex hull is attained at a point of T.
  3. w(conv⁡T) is larger by a factor log⁡|T| for finite T.That factor appears when you compare a finite set's width with its diameter, not with its hull.
supconv⁡T⟨g,⋅⟩=supT⟨g,⋅⟩ for every g. That is why the 2n vertices ±ei and the whole ℓ1 ball have the same width.

T is the unit Euclidean ball of a k-dimensional subspace sitting in Rn, k≪n. What is w(T) approximately?

  1. k
  2. nOnly the component of g inside the subspace matters.
  3. 1That is the radius. The width also counts how many directions the set extends in.
  4. kThe width is the expected length of a k-dimensional Gaussian vector, not its squared length.
supt∈T⟨g,t⟩=‖PEg‖2, the length of the projection of g onto the subspace E, which is a standard Gaussian in Rk. Its expected length is about k, so w(T)2≈k: the effective dimension equals the true dimension.

Practice

Width of the cubeAn exact computation

Compute w([−1,1]n) exactly and compare it with the width of the Euclidean ball of the same diameter 2n.

Solution

supt∈[−1,1]n⟨g,t⟩=∑|gi|, so w=nE|g1|=n2/π≈0.80n. The ball of radius n has width nE‖g‖≈n. So the cube is almost as wide as its circumscribed ball: its corners stick out in nearly every direction.

Linear images and widthUsing Sudakov–Fernique

Show w(AT)≤‖A‖w(T) for any m×n matrix A and bounded T⊆Rn. Deduce that if T⊆Rn lies in the unit ball then w(T)≤n.

Solution

Compare Yt=⟨h,At⟩ (h∼N(0,Im)) with Xt=‖A‖⟨g,t⟩: E(Yt−Ys)2=‖A(t−s)‖2≤‖A‖2‖t−s‖2=E(Xt−Xs)2, so Sudakov–Fernique gives the claim. For the second part, w(T)≤w(B2n)=E‖g‖2≤(E‖g‖22)1/2=n.

From Vershynin, High-Dimensional Probability (2nd ed., Cambridge, pre-publication version, 2025)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 7.17Gaussian width of ℓp balls

For 1≤p≤∞ with conjugate p′, show w(Bpn)≍p′n1/p′ if p′≤log⁡n, and w(Bpn)≍log⁡n if p′≥log⁡n.

Hint

By duality, w(Bpn)=Esup‖x‖p≤1⟨g,x⟩=E‖g‖p′. Then estimate E‖g‖q for q=p′.

Solution

Write q=p′, so w(Bpn)=E‖g‖q.

Case q≥log⁡n. ‖g‖∞≤‖g‖q≤n1/q‖g‖∞≤e‖g‖∞, and E‖g‖∞≍log⁡n.

Case q≤log⁡n, upper bound. By Jensen, E‖g‖q≤(E‖g‖qq)1/q=(nE|g1|q)1/q≤Cqn1/q, using ‖g1‖Lq≍q.

Lower bound. Let M be the number of coordinates with |gi|≥q. By the Gaussian tail lower bound, P{|gi|≥q}≥cq−1/2e−q/2, so EM≥cnq−1/2e−q/2≥cn/log⁡n when q≤log⁡n. M is binomial, so M≥EM/2 with probability at least 1/2 (for n larger than a constant; small n is absorbed in the constants). On that event ‖g‖q≥M1/qq≥q(cnq−1/2e−q/2/2)1/q≥c′qn1/q, because (cq−1/2/2)1/q is bounded below for q≥1 and e−1/2 is a constant. Hence E‖g‖q≥12c′qn1/q.

The two regimes agree at q≈log⁡n, where qn1/q≍log⁡n.

Exercise 7.22Effective dimension of a finite set

For a finite set T (with |T|≥2), show its effective dimension d(T)=h(T−T)2/diam(T)2 satisfies d(T)≤Clog⁡|T|.

Hint

h(T−T)2=Esupz∈T−T⟨g,z⟩2 is the expected maximum of at most |T|2 squared Gaussians, each with variance at most diam(T)2.

Solution

Each z∈T−T has ‖z‖2≤diam(T), so ⟨g,z⟩∼N(0,‖z‖22) and ⟨g,z⟩2/diam(T)2 is dominated by γ2, γ∼N(0,1). For M such variables (not necessarily independent), Emaxγj2≤Clog⁡M for M≥2. With M≤|T|2,

h(T−T)2≤Cdiam(T)2log⁡(|T|2)=2Cdiam(T)2log⁡|T|.

Divide by diam(T)2.

Draw it yourselfVershynin, Ch. 8: Chaining

Chaining and VC dimension

To bound the supremum of a process, chaining runs a union bound at every scale and adds up the costs. For classes of sets the relevant size is combinatorial: how many points the class can label in every possible way. Place points below and try to beat the VC dimension.

The idea

Dudley's inequality. If (Xt)t∈T is mean-zero with subgaussian increments, ‖Xt−Xs‖ψ2≤Kd(t,s), then
Esupt∈TXt≤CK∫0∞log⁡N(T,d,ε)dε.

Chaining: approximate each t by points πk(t) of a 2−k-net, write Xt−Xt0=∑k(Xπk(t)−Xπk−1(t)), and union-bound each level separately. A link at level k has length about 2−k, and there are about N(T,2−k)2 of them; summing 2−klog⁡N(T,2−k) over k gives the integral.

VC dimension. A class F of subsets shatters a finite set Λ if every subset of Λ equals F∩Λ for some F∈F. The VC dimension is the largest size of a shattered set.
Sauer–Shelah. If vc⁡(F)=d, then on any k points F cuts out at most ∑i=0d(ki)≤(ek/d)d subsets: polynomially many, instead of 2k.
Uniform law of large numbers. For a class of Boolean functions of VC dimension d and i.i.d. samples X1,…,XN,
Esupf∈F|1N∑i=1Nf(Xi)−Ef(X)|≤CdN.

The proof symmetrizes, bounds covering numbers of F in terms of d, and applies Dudley. In learning theory this says empirical risk minimisation over such a class has excess risk of order d/N.

Explore

Click to add a point (up to 6), drag to move it. Filled points are labelled "in". a set from the class that cuts out exactly the filled points
Class of sets
Start from
All labellings (click one; red ones are impossible)

Worked example

Find the VC dimension of the class of closed intervals [a,b]⊆R, and count exactly how many subsets it cuts out of k points.

  1. Show that two points x1<x2 are shattered.

    ∅: an interval far away. {x1}, {x2}: tiny intervals around each. {x1,x2}: [x1,x2]. All four subsets are cut out.

  2. Why can no three points x1<x2<x3 be shattered?

    An interval containing x1 and x3 contains everything between them, including x2. So {x1,x3} is never cut out. Hence vc=2.

  3. How many subsets of k points on the line do intervals cut out?

    Exactly the empty set and the runs of consecutive points: 1+(k+12)=1+k+(k2). (A run is determined by its first and last point, possibly equal.)

  4. Compare with the Sauer–Shelah bound for d=2.

    ∑i=02(ki)=1+k+(k2): exactly equal. So the lemma cannot be improved in general. For k=10, intervals realise 56 of the 1024 subsets.

Check your understanding

What is the VC dimension of half-planes in R2?

  1. 2Three points in a triangle are shattered: check it in the explorer.
  2. 3
  3. 4Try four points. In convex position, the two diagonals can't be separated; otherwise one point is inside the triangle of the others.
  4. InfiniteHalf-planes are described by 3 parameters, and indeed no 4 points can be shattered.
Any three non-collinear points are shattered. For four points, either they are in convex position, and the labelling "opposite corners in" fails, or one lies in the triangle of the other three, and "the three outer points in, the inner one out" fails, since half-planes are convex.

A class has VC dimension 3. At most how many different subsets can it cut out of 10 points?

  1. 176
  2. 1024That is every subset, which would mean 10 points are shattered.
  3. 120That is (103) alone. Add the subsets of size 0, 1 and 2 in the Sauer–Shelah sum.
  4. 103=1000The (ek/d)d style bound is of this order, but the exact Sauer–Shelah sum is much smaller here.
(100)+(101)+(102)+(103)=1+10+45+120=176. Half-planes on 10 points in general position realise even fewer.

Empirical risk minimisation over a class of VC dimension d, from N samples. With no further assumptions, how does the guaranteed excess risk scale?

  1. d/N
  2. d/NThat faster rate needs extra assumptions (for example, a target in the class with no noise).
  3. log⁡N/N, independent of dThe complexity of the class must enter: with infinite VC dimension, no rate is possible.
  4. 2d/NSauer–Shelah replaces the exponential count by a polynomial, so only d appears, not 2d.
The excess risk is controlled by the uniform deviation supf|1N∑f(Xi)−Ef|, which is ≲d/N by the uniform law of large numbers. To halve the error you need four times the data.

Practice

Discs centred at the originA one-parameter class

Find the VC dimension of the class {{x∈R2:‖x‖≤r}:r≥0}.

Solution

One point x≠0 is shattered (take r<‖x‖ or r≥‖x‖). For two points with ‖x1‖≤‖x2‖, any disc containing x2 contains x1, so {x2} is never cut out. The VC dimension is 1. Notice the class is a nested chain of sets; any such chain has VC dimension at most 1.

Finite classesA simple bound

Show that a finite class F has vc⁡(F)≤log2⁡|F|. Give a class with |F|=2d and VC dimension exactly d.

Solution

Shattering k points needs 2k different sets, so 2k≤|F|. For equality, take a d-point set Λ and let F be all its subsets.

From Vershynin, High-Dimensional Probability (2nd ed., Cambridge, pre-publication version, 2025)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 8.12VC dimension of pairs of intervals

Let F be the indicators of sets [a,b]∪[c,d]⊂R. Show vc(F)=4.

Hint

A subset of points on a line can be cut out by two intervals iff it consists of at most two runs of consecutive points.

Solution

Four points are shattered. Take x1<x2<x3<x4. Any subset of them splits into at most two maximal runs of consecutive points (three runs would need at least five points, alternating in/out/in/out/in). Cover each run by a small interval, and put an unused interval far away if needed; the empty set uses two far-away intervals.

No five points are shattered. For x1<⋯<x5, the subset {x1,x3,x5} has three runs. Two intervals covering all three points must have one interval covering two of them, hence also the point between, which is excluded. So vc=4.

Exercise 8.14VC dimension of rectangles

Let F be the indicators of closed axis-aligned rectangles [a,b]×[c,d]⊂R2. Show vc(F)=4.

Hint

For shattering, use four points in a diamond. For the upper bound, look at the leftmost, rightmost, highest and lowest of five points.

Solution

Four points are shattered. Take (±1,0),(0,±1). For any subset S, its bounding box contains S and no other point of the four: each excluded point is extreme in some direction (strictly furthest left, right, up or down), and the box of the remaining points stays strictly on the other side. The empty set is cut out by a tiny far-away rectangle.

No five points are shattered. Among five points pick one with smallest x, one with largest x, one with smallest y, one with largest y: at most four points. Some fifth point p is not chosen, and it lies inside the bounding box of the chosen points. Any rectangle containing the chosen points contains that box, hence p. So the labelling "chosen points in, p out" is impossible.

SimulationVershynin, Ch. 9: Deviations of Random Matrices on Sets

Random matrices on sets and sparse recovery

A random m×n matrix with m<n has a big kernel, so it cannot be injective. But it behaves like a scaled isometry on any set of small Gaussian width, and that is enough to recover an s-sparse vector exactly from about slog⁡(n/s) random measurements.

The idea

Matrix deviation inequality. Let A be m×n with independent, mean-zero, isotropic, subgaussian rows, ‖Ai‖ψ2≤K. For every bounded T⊆Rn,
Esupx∈T|‖Ax‖2−m‖x‖2|≤CK2γ(T),γ(T)=Esupx∈T|⟨g,x⟩|.

Taking T to be the sphere gives the singular value bounds of Chapter 4; taking normalised differences of N points gives Johnson–Lindenstrauss.

M∗ bound and escape. ker⁡A is a random subspace of codimension m. It meets T in a set of diameter Ediam⁡(T∩ker⁡A)≤CK2w(T)/m. And if T⊆Sn−1 and m≥CK4w(T)2, then T∩ker⁡A=∅ with high probability: the kernel escapes through the mesh.
Exact sparse recovery. Let x0 have at most s nonzero entries and y=Ax0. If m≥CK4slog⁡n, then with high probability x0 is the unique solution of
min‖x‖1subject toAx=y.

Why: x0+h is a competing solution exactly when h∈ker⁡A and ‖x0+h‖1≤‖x0‖1, i.e. h lies in the descent cone D of the ℓ1 norm at x0. The cone D∩Sn−1 has w2≲slog⁡(n/s), so by the escape theorem the kernel misses it.

Explore

n=40 unknowns, A Gaussian. hidden x0 ℓ1 solution minimum ℓ2-norm solution
Success rate of ℓ1 recovery; click a cell to try it. success failure m=δ(s)

Worked example

The smallest case: n=2, one measurement y=a1x1+a2x2, and the 1-sparse vector x0=(1,0). When does ℓ1 minimisation find x0?

  1. Take a=(2,1), so y=2. Find the minimum ℓ2-norm solution.

    It is the point of the line 2x1+x2=2 closest to the origin, x=ay/‖a‖2=(0.8,0.4). Not sparse, and not x0.

  2. Now minimise |x1|+|x2| on the same line.

    On the line x2=2−2x1, so minimise |x1|+|2−2x1|. This is piecewise linear with value 2 at x1=0 and 1 at x1=1, and grows outside [0,1]. The minimum is at x=(1,0)=x0: recovered. Geometrically, the smallest ℓ1 diamond that touches the line touches it at a corner.

  3. Repeat with a=(1,2), so y=1.

    On x1+2x2=1, minimise |x1|+|(1−x1)/2|: value 1 at x1=1 but 1/2 at x1=0. The minimiser is (0,12): sparse, but the wrong vector.

  4. Explain both outcomes with the kernel and the descent cone D={h:‖x0+h‖1≤‖x0‖1}.

    Near x0=(1,0), ‖x0+h‖1=1+h1+|h2|, so D={h:h1≤−|h2|}, a cone of half-angle 45° around −e1. For a=(2,1) the kernel is spanned by (1,−2), which is steeper than 45° and misses D∖{0}: success. For a=(1,2) it is spanned by (2,−1), and −(2,−1)∈D: failure. In high dimension the descent cone is a small fraction of directions, and the escape theorem says a random kernel misses it once m≳w(D∩Sn−1)2.

Check your understanding

E is a random subspace of Rn of codimension m. By the M∗ bound, the Euclidean diameter of B1n∩E is at most about:

  1. log⁡n/m
  2. 1B1n has points of length 1 (the vertices), but a random subspace avoids those directions.
  3. n/mThat is what the bound gives for the Euclidean ball, whose width is about n. Use w(B1n) instead.
  4. 0E is a subspace of dimension n−m≥1, so B1n∩E contains nonzero points.
diam≲w(B1n)/m≈2ln⁡n/m (meaningful once this is below 2, the diameter of B1n). Points of a random subspace have small ℓ2 norm relative to their ℓ1 norm, i.e. they are spread out, never sparse. That is the reason ℓ1 minimisation picks out sparse vectors.

How many Gaussian measurements suffice for ℓ1 minimisation to recover a given s-sparse x0∈Rn with high probability?

  1. On the order of slog⁡n
  2. On the order of nn measurements would let you invert A, sparse or not. Sparsity is what saves you.
  3. Exactly sEven knowing the support you need s; not knowing it costs a logarithmic factor for ℓ1.
  4. On the order of s2Some deterministic constructions need that many; random matrices do much better.
The squared width of the descent cone is ≲slog⁡(n/s), and the escape theorem needs m of that order. In the phase diagram the dashed boundary grows roughly linearly in s, with a slope set by the logarithm.

In the matrix deviation inequality, take T=Sn−1, for which γ(T)≈n. What does it say?

  1. All singular values of A lie in m±Cn, on average.
  2. ‖Ax‖2=m for every unit vector x.The inequality allows a deviation of order γ(T), not zero.
  3. A is invertible.If m<n, A has a kernel, and the bound m−Cn becomes negative, so it says nothing about sn.
  4. ‖A‖≤Cn.The scale m of ‖Ax‖ must appear; only the deviation is of order n.
supx∈Sn−1|‖Ax‖−m|≲n is the two-sided bound of Chapter 4. Other sets T give other theorems: that is the point of stating it for every T.

Practice

ℓ₁ minimisation is a linear programWhat the explorer solves

Show that min‖x‖1 subject to Ax=y has the same optimal value as the linear program min∑i(ui+vi) subject to A(u−v)=y, u,v≥0, and that at any optimum uivi=0 for each i (so x=u−v is optimal for the original problem).

Solution

Given feasible x, u=max(x,0), v=max(−x,0) is feasible with ∑(ui+vi)=‖x‖1. Conversely, feasible (u,v) gives a feasible x=u−v with ‖x‖1≤∑(ui+vi). So the optimal values agree. If ui,vi>0 at an optimum, lowering both by min(ui,vi) keeps u−v and feasibility but lowers the objective, a contradiction.

Too few measurementsA lower bound for any method

Show that if m<2s, no method at all can recover every s-sparse x∈Rn (with n≥2s) from Ax.

Hint

Look for two different s-sparse vectors with the same image.

Solution

Any 2s columns of A are 2s vectors in Rm with m<2s, so they are linearly dependent: there is h≠0 supported on those 2s coordinates with Ah=0. Split h=u−v with u,v each supported on s of the coordinates. Then u≠v are both s-sparse and Au=Av. So m≥2s is necessary, and the log factor in the theorem is the price of a computationally easy method.

From Vershynin, High-Dimensional Probability (2nd ed., Cambridge, pre-publication version, 2025)

Numbers match the book. Each question is restated in our own words; the hints and solutions are written for this page.

Exercise 9.30The geometry of exact sparse recovery

Give a geometric reading of the proof of exact recovery by ℓ1 minimisation (Theorem 9.5.1). What does it say about the tangent cone T(x) of the ℓ1 ball at an s-sparse x, and about its spherical part S(x)?

Hint

The error h=x^−x is a direction from x that doesn't increase the ℓ1 norm, and it lies in ker⁡A. The two lemmas in the proof constrain such directions.

Solution

The feasible set is the affine subspace Ex=x+ker⁡A, and x^ is where Ex first touches the smallest ℓ1 ball, which is ‖x‖1B1n. Recovery is exact iff Ex touches that ball only at x, iff ker⁡A∩T(x)={0}, where T(x) is the cone of directions h with ‖x+th‖1≤‖x‖1 for small t>0.

The first lemma (‖hSc‖1≤‖hS‖1) is exactly the statement that h∈T(x). The second (‖h‖1≤2s‖h‖2) says the spherical part S(x)=T(x)∩Sn−1 lies inside the set Ts of approximately s-sparse unit vectors. So the tangent cone at a sparse point is narrow: its spherical part has Gaussian width w(S(x))≤w(Ts)≲slog⁡n, far less than n.

The escape theorem then says a random subspace of codimension m≳w(S(x))2, here ker⁡A, misses S(x) with high probability. That's the picture in the figure: a random subspace through a sharp corner of the polytope generically avoids the corner's narrow cone.

Exercise 9.32The nullspace property

A has the nullspace property of order s if ‖hS‖1<‖hSc‖1 for every nonzero h∈ker⁡A and every S with |S|=s. (a) Show this holds iff every s-sparse x is the unique minimiser of ‖x′‖1 subject to Ax′=Ax. (b) Show a random A with m≳slog⁡(en/s) has this property with high probability.

Hint

(a) For one direction expand ‖x+h‖1 on and off the support; for the other, test with x=hS. (b) If the property fails, a normalised kernel vector lands in the set of approximately sparse unit vectors.

Solution

(a) NSP ⇒ recovery. Let x be supported in S, |S|≤s (enlarge S to size s), and x′=x+h feasible with h≠0, so h∈ker⁡A. Then ‖x′‖1=‖xS+hS‖1+‖hSc‖1≥‖x‖1−‖hS‖1+‖hSc‖1>‖x‖1.

Recovery ⇒ NSP. Take h∈ker⁡A∖{0} and |S|=s. Set x=hS, which is s-sparse. Since Ah=0, A(−hSc)=AhS, so −hSc is feasible, and it differs from hS because h≠0. Uniqueness of the minimiser forces ‖hS‖1<‖hSc‖1.

(b) If the property fails, some nonzero h∈ker⁡A has ‖hSc‖1≤‖hS‖1 for an S of size s. Then ‖h‖1≤2‖hS‖1≤2s‖h‖2, so h/‖h‖2∈Ts∩ker⁡A with Ts={z∈Sn−1:‖z‖1≤2s}. By the escape theorem, for A with independent, isotropic, subgaussian rows (K=max‖Ai‖ψ2), Ts∩ker⁡A=∅ with probability at least 1−2exp⁡(−cm/K4) as soon as m≥CK4w(Ts)2. The refined width bound w(Ts)≲slog⁡(en/s) (as in the remark after Theorem 9.5.1) gives: if m≥CK4slog⁡(en/s), then A has the nullspace property of order s with probability at least 1−2exp⁡(−cm/K4).

InteractiveTsybakov, Introduction to Nonparametric Estimation, Ch. 2; Yu, “Assouad, Fano, and Le Cam” (1997); Wainwright, High-Dimensional Statistics, Ch. 15

Minimax lower bounds: how well can anyone estimate?

Proving that an estimator's error is at most something is an upper bound: it describes one method. To know whether a better method could exist, you need a lower bound that holds for every method at once. The standard way to get one is to turn estimation into a guessing game between a few candidate truths and then show, with KL divergence, that the data can't tell them apart.

The idea

Minimax risk. Data Y come from a distribution Pθ with unknown θ in a set Θ, and an estimator θ^=θ^(Y) is scored by a loss d(θ^,θ)2. The minimax risk is
M=infθ^ supθ∈Θ Eθd(θ^,θ)2.
The supremum judges each estimator by its worst case: without it, the estimator that always answers θ0 would be perfect at θ0. The infimum asks how good the best possible estimator is.

A rate is optimal when an upper bound for some estimator matches a lower bound on M up to constants. Changing the parameter set Θ, the loss d or the data-generating experiment changes the question, so all three must be fixed before claiming optimality. An error bound "in probability" (OP) and a bound on the expected squared error are also different statements.

From estimating to testing. Pick parameters θ1,…,θM∈Θ with d(θj,θk)≥2s for j≠k. Any estimator gives a test ψ=arg⁡minjd(θ^,θj). If ψ≠j when the truth is θj, then d(θ^,θj)≥s by the triangle inequality. Hence
M ≥ s2⋅infψmaxjPθj(ψ≠j).
Estimating well is at least as hard as telling the θj apart.

The art is in the choice of the θj. They must be far apart in the loss, so that s is large, but close in distribution, so that no test can tell them apart. These two requirements pull in opposite directions, and balancing them gives the rate.

Two points (Le Cam). For two hypotheses, the best test's average error is exactly 12(1−TV(P1,P2)), so
M ≥ s22(1−TV(Pθ1,Pθ2)) ≥ s22(1−12KL(Pθ1‖Pθ2)),
the second step by Pinsker's inequality.
KL adds up over independent data. For n independent observations, KL(P⊗n‖Q⊗n)=nKL(P‖Q). This is why KL, not TV, is the convenient currency: the divergence after n samples is just n times the divergence of one. For Gaussians with a common covariance,
KL(N(μ0,Σ)‖N(μ1,Σ))=12(μ0−μ1)⊤Σ−1(μ0−μ1),
and with a common mean and different covariances,
KL(N(0,Σ0)‖N(0,Σ1))=12[tr⁡(Σ1−1Σ0)−d−ln⁡det(Σ1−1Σ0)].

Two points give the right dependence on the sample size. They can't see dimension, because a two-point problem is one-dimensional. To capture dimension you need many hypotheses.

Many points (Fano). For M≥2 hypotheses and any test ψ,
maxjPθj(ψ≠j) ≥ 1−maxj≠kKL(Pθj‖Pθk)+ln⁡2ln⁡M.
If the pairwise divergences are at most a quarter of ln⁡M, every test errs with probability close to 3/4. A guess among M options needs about ln⁡M nats of information, and the data supply at most the KL.
Packing (Gilbert–Varshamov). For m≥8 there are at least 2m/8 vectors in {0,1}m that pairwise differ in at least m/8 coordinates. So exponentially many hypotheses can be kept pairwise far apart, which makes ln⁡M proportional to the dimension m.

The recipe. (1) Choose a packing θv=θ0+a(pattern v) from Gilbert–Varshamov. (2) Compute the separation s (it grows with a) and bound the pairwise KL (it grows like a2 times the sample size). (3) Choose a as large as possible subject to KL ≤14ln⁡M, and apply Fano. The worked example runs the recipe for a Gaussian mean.

More informative experiments have smaller minimax risk. Suppose that from data YA you can simulate data with exactly the law of YB, using only randomness and known quantities and without knowing θ (say, by adding noise or applying a known projection). Then any estimator based on YB can be run on simulated data, so MA≤MB. A lower bound proved in the easier experiment A therefore holds in B. An upper bound does not transfer the other way. This is the data processing inequality seen from the statistician's side.

Explore

Estimate the mean θ of N(θ,1) from n samples. The two candidate truths are θ=0 and θ=δ. Every test only needs the sample mean, which is N(θ,1/n).

Law of the sample mean under θ=0 and θ=δ. The shaded overlap has area 1−TV. The best test splits at δ/2.
the two-point lower bound δ28(1−TV) against δ, for the current n. the risk 1/n of the sample mean.

Worked example

Observe n independent draws from N(θ,σ2Id) with θ∈Rd unknown, and use the loss ‖θ^−θ‖22. The sample mean has risk dσ2/n. Show that no estimator does better by more than a constant factor (take d≥16).

  1. Build the packing. What are M, the separation, and the largest distance?

    Take a Gilbert–Varshamov set V⊂{0,1}d, |V|≥2d/8, and put θv=adv. Then ‖θv−θw‖2=a2ddH(v,w), which lies between a2/8 and a2. So ln⁡M≥d8ln⁡2 and the separation is 2s=a/8.

  2. Bound the KL between the laws of the whole sample under θv and θw.

    One draw gives ‖θv−θw‖22σ2≤a22σ2, and n independent draws give n times that: at most na22σ2.

  3. Choose a so that Fano gives error probability at least 1/2.

    Require na22σ2≤14⋅d8ln⁡2, i.e. a2=dσ2ln⁡216n. Fano gives maxvP(ψ≠v)≥1−14−ln⁡2(d/8)ln⁡2=34−8d≥12 for d≥16.

  4. Conclude.

    M≥s2⋅12=a232⋅12=ln⁡21024⋅dσ2n. The sample mean achieves dσ2/n, so the minimax rate is dσ2/n. The constant is poor, but the dependence on d, σ and n is exactly right. Dimension enters through ln⁡M∝d: there are exponentially many well-separated candidates, and the data carry only enough information to rule out a few.

Check your understanding

In the figure, raise the separation δ well past 3/n. Why does the two-point lower bound fall toward zero even though the hypotheses are far apart?

  1. The two laws barely overlap, so a test tells them apart almost surely and 1−TV≈0.
  2. Because the loss is smaller when δ is large.The separation s=δ/2 grows with δ; what collapses is the chance of a wrong guess.
  3. Because the sample mean is not the best test.Thresholding the sample mean at δ/2 is the optimal test between these two Gaussians.
The bound is (distance)² × (probability of confusion). Too close and the distance is tiny; too far and confusion is impossible. The best δ is of order 1/n, which gives a bound of order 1/n.

Why does the dimension d appear in the Fano bound but not in a two-point bound?

  1. Fano's bound depends on ln⁡M, and a packing can contain ecd well-separated points; two points only probe one direction.
  2. Because Fano uses TV and Le Cam uses KL.Both can be phrased with KL; the difference is the number of hypotheses.
  3. Because the two-point method only applies in one dimension.It applies in any dimension, but it can only capture the difficulty along the single direction joining the two points.
Dimension is a counting phenomenon: many directions, each of which must be estimated. Fano with a packing counts them.

Experiment B is obtained from experiment A by passing the data through a known noisy channel. You prove a lower bound L on the minimax risk in A. What follows?

  1. The minimax risk in B is also at least L.
  2. Nothing: the experiments are different.B can be simulated from A, so any estimator for B is also an estimator for A; B can't be easier.
  3. The minimax risk in B is at most L.That reverses the direction: losing information can only make estimation harder.
So a lower bound for an idealized experiment (for example, observing hidden variables directly) is automatically a lower bound for the realistic one. Upper bounds need separate work.

Why is the supremum over θ needed in the definition of minimax risk?

  1. Otherwise a constant estimator θ^≡θ0 would have zero risk at θ0, and "best estimator" would be meaningless.
  2. To make the risk finite.It can only make the risk larger; it's there to rule out estimators that are lucky at one parameter.
  3. Because the true θ is random.In the minimax framework θ is fixed and unknown; averaging over a prior gives Bayes risk instead.
The supremum asks for guarantees that hold whatever the truth is. A Bayes risk, averaged over a prior, is always at most the minimax risk, which is another way to prove lower bounds.

Practice

How fast can a coin be learned?Two points for a Bernoulli

From n flips of a coin with probability p of heads, show that every estimator has suppE(p^−p)2≥c/n for a constant c>0. Use p0=12, p1=12+δ and the bound KL(Ber(q)‖Ber(12))≤4(q−12)2.

Outline
  1. The KL between the n-flip laws is at most 4nδ2.
    Why?

    KL adds over independent flips. The single-flip bound follows from KL≤χ2, and χ2(Ber(12+δ)‖Ber(12))=δ2/14.

  2. With δ=1/(4n), Pinsker gives TV≤2nδ2=1/8<0.36.
    Why?

    TV≤KL/2≤2nδ2.

  3. Le Cam with s=δ/2 gives δ28(1−0.36)≥1200n.
    Why?

    116n⋅18⋅0.64=1200n.

The empirical frequency has risk p(1−p)/n≤14n, so 1/n is the minimax rate. No amount of cleverness beats the coin-flipping rate.

A KL bound without small perturbationsGaussians with different covariances

For positive definite A,B∈Rd×d, show

KL(N(0,A)‖N(0,B))≤12tr⁡((A−B)B−1(A−B)A−1),
and deduce KL≤‖A−B‖F22λmin(A)λmin(B).

Outline
  1. With λi the eigenvalues of B−1A, KL=12∑i(λi−1−ln⁡λi).
    Why?

    This is the formula in the text: tr⁡(B−1A)=∑λi and ln⁡det(B−1A)=∑ln⁡λi.

  2. λ−1−ln⁡λ≤λ+λ−1−2 for λ>0.
    Why?

    ln⁡λ≥1−1/λ, which is ln⁡u≤u−1 applied to u=1/λ.

  3. ∑i(λi+λi−1−2)=tr⁡((A−B)B−1(A−B)A−1).
    Why?

    Expand (A−B)B−1(A−B)A−1=AB−1−I−I+BA−1, and use tr⁡(AB−1)=tr⁡(B−1A).

  4. tr⁡(EB−1EA−1)≤‖A−1‖‖B−1‖‖E‖F2 for symmetric E.
    Why?

    tr⁡(A−1K)≤‖A−1‖tr⁡K for K=EB−1E⪰0, and tr⁡(EB−1E)≤‖B−1‖tr⁡(E2). Here ‖⋅‖ is the operator norm, and ‖A−1‖=1/λmin(A).

Unlike a second-order Taylor expansion, this holds however far apart A and B are, which makes it convenient in packing arguments.

Estimating a covariance matrixWhy p2/n is unavoidable

Observe z1,…,zn independent N(0,Σ) in Rp, with Σ known to satisfy 12I⪯Σ⪯32I. Show that for p≥9, every estimator has supΣE‖Σ^−Σ‖F2≥cmin{1,p2/n}. The sample covariance 1n∑zizi⊤ achieves order p2/n, so this is the rate. (‖M‖F2=∑ijMij2 is the Frobenius norm.)

Outline
  1. Pack the m=p(p−1)/2 off-diagonal positions: Σv=I+aS(v), where S(v) is symmetric with zero diagonal and entries vij∈{0,1}, and a≤1/(2p).
    Why?

    ‖S(v)‖≤‖S(v)‖F<p, so ‖aS(v)‖<12 and Σv stays in the class. Gilbert–Varshamov gives ln⁡M≥m8ln⁡2 and ‖Σv−Σw‖F2=2a2dH(v,w)≥a2m/4.

  2. The pairwise KL of the n-sample laws is at most 4na2m.
    Why?

    ‖Σv−Σw‖F2=2a2dH(v,w)≤2a2m. The previous problem with λmin≥12 for both matrices bounds one sample's KL by ‖Σv−Σw‖F2/(2⋅14)≤4a2m, and n samples give n times that. (Constants are not optimized.)

  3. Take a2=min{14p2,ln⁡2128n} and apply Fano.
    Why?

    Then KL ≤mln⁡232=14⋅m8ln⁡2, so the error probability is at least 34−8m≥12. The risk is at least a2m16⋅12, which is of order min{1,p2/n} because m≍p2.

In operator norm the rate is different: when n≳p the sample covariance has E‖Σ^−Σ‖2 of order p/n. The Frobenius norm adds up the errors in all p2 entries, while the operator norm only measures the worst direction, and ‖M‖≤‖M‖F≤p‖M‖. Always say which loss a rate refers to.

Simulation gives lower bounds for freeProve the comparison of experiments

Suppose YB=K(YA,U) for a known function K and randomness U independent of YA whose law does not depend on θ. Show that MA≤MB for any loss.

Outline
  1. Every estimator θ^B for experiment B defines an estimator for A: θ^A(YA)=θ^B(K(YA,U)).
    Why?

    It uses only YA, the known K and the auxiliary randomness U (randomized estimators are allowed; if you prefer, average over U and use convexity of the loss).

  2. For every θ, θ^A has the same risk as θ^B.
    Why?

    K(YA,U) has exactly the law of YB under θ, so the two estimates have the same distribution.

  3. Take the supremum over θ, then the infimum over θ^B.
    Why?

    The infimum over all A-estimators is at most the infimum over this subfamily.

Example: noisy linear measurements y=Xβ+ε of a hidden random vector β can be simulated from β itself when X and the noise law are known. So a lower bound for estimating the law of β from direct observations applies to the measured problem too.

Key terms in plain words

The ideas above without the symbols. Switch to Quiz me to test yourself: you see an explanation and pick the term it describes.

Minimax risk
The smallest worst-case error any estimator can guarantee, over every possible truth in the model.
Upper bound
A guarantee about one particular method: this estimator's error is at most so much.
Lower bound
A limit on every method at once: no estimator can have worst-case error below so much.
Optimal rate
An error rate achieved by some method and matched by a lower bound, up to constant factors.
Two-point method
Showing estimation is hard by finding two possible truths that are far apart but whose data look nearly the same.
Fano's inequality
If the data carry little information compared with the logarithm of the number of options, any guess among the options is often wrong.
Packing
A large collection of candidate truths that are all pairwise far apart.
Tensorization of KL
For independent observations, the divergences simply add, so n samples give n times the divergence of one.
More informative experiment
One whose data could be used to fake the data of another; it can never have a larger minimax risk.