Lecture 1

Mathematical basics for statistics

Course edition
Fall 2026
Last updated
October 19, 2026

Part I · Foundations: the language of probability · Lecture 1 of 5

Student PDFReport an issue

A guided route

Lecture map

High and mid topics are both examined. Follow the topic links, and open optional branches when they help.

Original lecture date: September 3, 2025. Course edition: Fall 2026.

These notes support STAT 709 at the University of Wisconsin–Madison. Use them alongside the cited textbooks; corrections and questions are welcome.

Welcome to STAT 709! Mathematical statistics is built from probability, linear algebra, analysis, and optimization.

Do not be discouraged if some of the results below are unfamiliar. You are not expected to know everything before taking this course. Use this lecture to identify gaps and warm up by working through the exercises.

This begins Part I. The part overview connects these lectures and includes a final self-check.

Learning goals

By the end of this lecture, you should be able to:

Sets, topology, and compactness

Mid prioritySupporting language for existence arguments

Throughout the course, the ambient space will usually be the Euclidean space \(\R^d\)ℝd\mathbb{R}^d, equipped with the Euclidean norm \[\|x\|_2=\left(\sum_{j=1}^d x_j^2\right)^{1/2}.\]∥x∥2=(∑j=1dxj2)1/2.\|x\|_2=\left(\sum_{j=1}^d x_j^2\right)^{1/2}. For \(x\in\R^d\)x∈ℝdx\in\mathbb{R}^d and \(\epsilon>0\)ϵ>0\epsilon>0, write \[B_\epsilon(x)=\{y\in\R^d:\|y-x\|_2<\epsilon\}\]Bϵ(x)={y∈ℝd:∥y−x∥2<ϵ}B_\epsilon(x)=\{y\in\mathbb{R}^d:\|y-x\|_2<\epsilon\} for the open ball of radius \(\epsilon\)ϵ\epsilon centered at \(x\)xx.

Definition 1Open and closed sets

A set \(U\subset\R^d\)U⊂ℝdU\subset\mathbb{R}^d is open if, for every \(x\in U\)x∈Ux\in U, there exists \(\epsilon>0\)ϵ>0\epsilon>0 such that \(B_\epsilon(x)\subset U\)Bϵ(x)⊂UB_\epsilon(x)\subset U. A set \(K\subset\R^d\)K⊂ℝdK\subset\mathbb{R}^d is closed if its complement \(K^c\)KcK^c is open.

Arbitrary unions and finite intersections of open sets are open. Dually, arbitrary intersections and finite unions of closed sets are closed. The restriction to finite intersections and unions matters. For example, \[\bigcap_{n=1}^{\infty}(-1/n,1/n)=\{0\},\]⋂n=1∞(−1/n,1/n)={0},\bigcap_{n=1}^{\infty}(-1/n,1/n)=\{0\}, which is not open.

Definition 2Closure, interior, and boundary

For \(S\subset\R^d\)S⊂ℝdS\subset\mathbb{R}^d: \[\begin{aligned} \overline S &=\{x\in\R^d:B_\epsilon(x)\cap S\neq\emptyset \text{ for every }\epsilon>0\},\\ S^\circ &=\{x\in S:B_\epsilon(x)\subset S \text{ for some }\epsilon>0\},\\ \partial S&=\overline S\setminus S^\circ.\end{aligned}\]S¯={x∈ℝd:Bϵ(x)∩S≠∅ for every ϵ>0},S∘={x∈S:Bϵ(x)⊂S for some ϵ>0},∂S=S¯\S∘.\begin{aligned} \overline S &=\{x\in\mathbb{R}^d:B_\epsilon(x)\cap S\neq\emptyset \text{ for every }\epsilon>0\},\\ S^\circ &=\{x\in S:B_\epsilon(x)\subset S \text{ for some }\epsilon>0\},\\ \partial S&=\overline S\setminus S^\circ.\end{aligned} These are called the closure, interior, and boundary of \(S\)SS, respectively.

Equivalently, \(\overline S\)S¯\overline S is the smallest closed set containing \(S\)SS. A point \(x\)xx belongs to \(\overline S\)S¯\overline S if and only if there is a sequence \((x_n)_{n\geq 1}\)(xn)n≥1(x_n)_{n\geq 1} in \(S\)SS such that \(x_n\to x\)xn→xx_n\to x. This sequential characterization is particularly convenient in Euclidean spaces.

Example 1

The rational numbers \(\Q\)ℚ\mathbb{Q} are countable and dense in \(\R\)ℝ\mathbb{R}: \(\overline{\Q}=\R\)ℚ¯=ℝ\overline{\mathbb{Q}}=\mathbb{R}. More generally, \(\Q^d\)ℚd\mathbb{Q}^d is countable and dense in \(\R^d\)ℝd\mathbb{R}^d. Thus, countability is a statement about the number of points, whereas density is a statement about how those points are distributed through the space.

Definition 3Countability

A set is countable if it is finite or can be placed in one-to-one correspondence with a subset of the natural numbers \(\N\)ℕ\mathbb{N}. A countable union of countable sets is countable, and every finite Cartesian product of countable sets is countable.

Definition 4Compactness

A set \(K\subset\R^d\)K⊂ℝdK\subset\mathbb{R}^d is compact if every sequence in \(K\)KK has a subsequence that converges to a point in \(K\)KK.

Theorem 1Heine–Borel and the extreme-value theorem

For \(K\subset\R^d\)K⊂ℝdK\subset\mathbb{R}^d, the following statements are equivalent:

  1. \(K\)KK is compact;

  2. \(K\)KK is closed and bounded.

Moreover, if \(K\)KK is nonempty and compact and \(f:K\to\R\)f:K→ℝf:K\to\mathbb{R} is continuous, then \(f\)ff attains both its minimum and its maximum on \(K\)KK.

Remark 1Why we care

An estimator is often defined as an optimizer, \[\widehat\theta\in\argmin_{\theta\in\Theta} L_n(\theta).\]θ̂∈arg minθ∈ΘLn(θ).\widehat\theta\in\mathop{\mathrm{arg\,min}}\limits_{\theta\in\Theta} L_n(\theta). Before discussing uniqueness or computation, we should ask whether the minimum is attained. Compactness of \(\Theta\)Θ\Theta and continuity of \(L_n\)LnL_n give a simple sufficient condition. If \(\Theta\)Θ\Theta is open or unbounded, additional arguments such as coercivity may be needed.

Example 2A noncompact parameter space

The continuous, strictly convex function \(f(x)=e^x\)f(x)=exf(x)=e^x on \(\R\)ℝ\mathbb{R} has infimum \(0\)00, but it has no minimizer. Strict convexity guarantees at most one minimizer; it does not guarantee that a minimizer exists.

Limits and asymptotic notation

High priorityDefinitions and calculation rules students must use fluently

Asymptotic notation compares deterministic sequences. Stochastic analogues such as \(o_{\PR}(\cdot)\)oℙ(⋅)o_{\mathbb{P}}(\cdot) and \(O_{\PR}(\cdot)\)Oℙ(⋅)O_{\mathbb{P}}(\cdot) will be introduced later. Throughout this section, suppose that \(b_n>0\)bn>0b_n>0 for all sufficiently large \(n\)nn.

Definition 5Small-\(o\)oo, big-\(O\)OO, and asymptotic equivalence

For real sequences \((a_n)\)(an)(a_n) and \((b_n)\)(bn)(b_n): \[\begin{aligned} a_n=o(b_n) &\quad\Longleftrightarrow\quad \frac{a_n}{b_n}\longrightarrow 0,\\ a_n=O(b_n) &\quad\Longleftrightarrow\quad \text{there exist }C<\infty\text{ and }N \text{ such that }|a_n|\leq Cb_n\text{ for }n\geq N,\\ a_n\sim b_n &\quad\Longleftrightarrow\quad \frac{a_n}{b_n}\longrightarrow 1.\end{aligned}\]an=o(bn)⇔anbn→0,an=O(bn)⇔there exist C<∞ and N such that |an|≤Cbn for n≥N,an∼bn⇔anbn→1.\begin{aligned} a_n=o(b_n) &\quad\Longleftrightarrow\quad \frac{a_n}{b_n}\longrightarrow 0,\\ a_n=O(b_n) &\quad\Longleftrightarrow\quad \text{there exist }C<\infty\text{ and }N \text{ such that }|a_n|\leq Cb_n\text{ for }n\geq N,\\ a_n\sim b_n &\quad\Longleftrightarrow\quad \frac{a_n}{b_n}\longrightarrow 1.\end{aligned} We write \(a_n=\Theta(b_n)\)an=Θ(bn)a_n=\Theta(b_n) if both \(a_n=O(b_n)\)an=O(bn)a_n=O(b_n) and \(b_n=O(|a_n|)\)bn=O(|an|)b_n=O(|a_n|).

Thus, \(o(\cdot)\)o(⋅)o(\cdot) is a relative statement of negligibility, \(O(\cdot)\)O(⋅)O(\cdot) is an eventual upper bound up to a constant, and \(\sim\)∼\sim is a relative-error approximation. In particular, \[a_n=(1+o(1))b_n \quad\Longleftrightarrow\quad a_n\sim b_n,\]an=(1+o(1))bn⇔an∼bn,a_n=(1+o(1))b_n \quad\Longleftrightarrow\quad a_n\sim b_n, provided \(b_n\neq 0\)bn≠0b_n\neq 0 eventually.

Example 3

As \(n\to\infty\)n→∞n\to\infty, \[\log n=o(n^\alpha)\quad\text{for every fixed }\alpha>0, \qquad \left(1+\frac{x}{n}\right)^n\longrightarrow e^x\]logn=o(nα)for every fixed α>0,(1+xn)n→ex\log n=o(n^\alpha)\quad\text{for every fixed }\alpha>0, \qquad \left(1+\frac{x}{n}\right)^n\longrightarrow e^x for every fixed \(x\in\R\)x∈ℝx\in\mathbb{R}. Consequently, \[\left(1+\frac{x}{n}\right)^n=e^x(1+o(1)).\](1+xn)n=ex(1+o(1)).\left(1+\frac{x}{n}\right)^n=e^x(1+o(1)). The word “fixed” is important: the conclusion need not remain valid uniformly if \(x=x_n\)x=xnx=x_n is allowed to grow with \(n\)nn.

Useful calculation rules.

If the expressions are well defined and the comparison sequences are eventually positive, then: \[\begin{aligned} a_n=o(b_n),\ c_n=O(d_n) &\quad\Longrightarrow\quad a_nc_n=o(b_nd_n),\\ a_n=O(b_n),\ c_n=O(d_n) &\quad\Longrightarrow\quad a_n+c_n=O(b_n+d_n),\\ a_n=o(1) &\quad\Longrightarrow\quad \frac{1}{1+a_n}=1-a_n+O(a_n^2).\end{aligned}\]an=o(bn),cn=O(dn)⇒ancn=o(bndn),an=O(bn),cn=O(dn)⇒an+cn=O(bn+dn),an=o(1)⇒11+an=1−an+O(an2).\begin{aligned} a_n=o(b_n),\ c_n=O(d_n) &\quad\Longrightarrow\quad a_nc_n=o(b_nd_n),\\ a_n=O(b_n),\ c_n=O(d_n) &\quad\Longrightarrow\quad a_n+c_n=O(b_n+d_n),\\ a_n=o(1) &\quad\Longrightarrow\quad \frac{1}{1+a_n}=1-a_n+O(a_n^2).\end{aligned} The last identity is a first-order Taylor expansion.

Constants and uniformity.

If \(a_n\)ana_n also depends on a parameter \(\theta\)θ\theta, the statement \(a_n(\theta)=O(b_n)\)an(θ)=O(bn)a_n(\theta)=O(b_n) usually means that the constant may depend on \(\theta\)θ\theta. The stronger statement \[\sup_{\theta\in\Theta}|a_n(\theta)|=O(b_n)\]supθ∈Θ|an(θ)|=O(bn)\sup_{\theta\in\Theta}|a_n(\theta)|=O(b_n) uses one constant uniformly over \(\Theta\)Θ\Theta. Statistical arguments involving a supremum over a parameter space generally require the uniform form.

Remark 2A common logical error

The statement \(a_n=O(b_n)\)an=O(bn)a_n=O(b_n) does not imply that \(a_n/b_n\)an/bna_n/b_n converges. For example, \(a_n=(-1)^n\)an=(−1)na_n=(-1)^n is \(O(1)\)O(1)O(1), but it has no limit.

Gaussian calculations

One-dimensional and multivariate Gaussian variables

High priorityGaussian vectors and affine transformations

The Gaussian distribution appears throughout mathematical statistics because it is stable under linear transformations and because normalized sums often approach it.

Definition 6Standard normal distribution

A random variable \(G\)GG has the standard normal distribution, written \(G\sim N(0,1)\)G∼N(0,1)G\sim N(0,1), if it has density \[\phi(x)=\frac{1}{\sqrt{2\pi}}e^{-x^2/2}, \qquad x\in\R.\]ϕ(x)=12πe−x2/2,x∈ℝ.\phi(x)=\frac{1}{\sqrt{2\pi}}e^{-x^2/2}, \qquad x\in\mathbb{R}. Its upper-tail function is \[\overline\Phi(t)=\PR(G>t)=\int_t^\infty\phi(x)\,dx, \qquad t\in\R.\]Φ¯(t)=ℙ(G>t)=∫t∞ϕ(x)dx,t∈ℝ.\overline\Phi(t)=\mathbb{P}(G>t)=\int_t^\infty\phi(x)\,dx, \qquad t\in\mathbb{R}. The identity \(\int_{-\infty}^{\infty}e^{-x^2/2}\,dx=\sqrt{2\pi}\)∫−∞∞e−x2/2dx=2π\int_{-\infty}^{\infty}e^{-x^2/2}\,dx=\sqrt{2\pi} ensures that \(\phi\)ϕ\phi integrates to one.

Definition 7Gaussian vector

A random vector \(X\in\R^d\)X∈ℝdX\in\mathbb{R}^d is Gaussian if every linear combination \(v^\top X\)v⊤Xv^\top X is a one-dimensional Gaussian random variable. We write \(X\sim N(\mu,\Sigma)\)X∼N(μ,Σ)X\sim N(\mu,\Sigma) when \(\E X=\mu\)𝔼X=μ\mathbb{E}X=\mu and \(\operatorname{Cov}(X)=\Sigma\)Cov(X)=Σ\operatorname{Cov}(X)=\Sigma. The covariance matrix \(\Sigma\)Σ\Sigma is symmetric and positive semidefinite; it may be singular.

If \(\Sigma\)Σ\Sigma is positive definite, \(X\)XX has the multivariate Gaussian density \[f_X(x) =\frac{1}{(2\pi)^{d/2}\det(\Sigma)^{1/2}} \exp\left\{-\frac12 (x-\mu)^\top\Sigma^{-1}(x-\mu)\right\}, \qquad x\in\R^d.\]fX(x)=1(2π)d/2det(Σ)1/2exp{−12(x−μ)⊤Σ−1(x−μ)},x∈ℝd.f_X(x) =\frac{1}{(2\pi)^{d/2}\det(\Sigma)^{1/2}} \exp\left\{-\frac12 (x-\mu)^\top\Sigma^{-1}(x-\mu)\right\}, \qquad x\in\mathbb{R}^d. When \(\Sigma\)Σ\Sigma is singular, the same Gaussian-vector definition applies, but the distribution is supported on a lower-dimensional affine subspace and does not have a density with respect to \(d\)dd-dimensional Lebesgue measure.

The defining projection property makes the most useful calculation immediate: for every fixed \(v\in\R^d\)v∈ℝdv\in\mathbb{R}^d, \[v^\top X\sim N(v^\top\mu,v^\top\Sigma v).\]v⊤X∼N(v⊤μ,v⊤Σv).v^\top X\sim N(v^\top\mu,v^\top\Sigma v). More generally, stacking several linear projections gives the following affine-transformation rule.

Proposition 1Affine transformations

If \(X\sim N(\mu,\Sigma)\)X∼N(μ,Σ)X\sim N(\mu,\Sigma), \(A\in\R^{m\times d}\)A∈ℝm×dA\in\mathbb{R}^{m\times d}, and \(b\in\R^m\)b∈ℝmb\in\mathbb{R}^m, then \[AX+b\sim N(A\mu+b,A\Sigma A^\top).\]AX+b∼N(Aμ+b,AΣA⊤).AX+b\sim N(A\mu+b,A\Sigma A^\top). In particular, if \(G\sim N(0,I_d)\)G∼N(0,Id)G\sim N(0,I_d), then \(AG\sim N(0,AA^\top)\)AG∼N(0,AA⊤)AG\sim N(0,AA^\top).

Remark 3

Uncorrelated random variables need not be independent in general. For a jointly Gaussian vector, however, zero covariance does imply independence. Thus, if \(X\sim N(\mu,\Sigma)\)X∼N(μ,Σ)X\sim N(\mu,\Sigma) and \(\Sigma\)Σ\Sigma is diagonal, the coordinates of \(X\)XX are independent.

Predict a projected variance.

Consider the fixed two-dimensional Gaussian model \[\mu=\begin{pmatrix}0.5\\-0.3\end{pmatrix},\qquad \Sigma=\begin{pmatrix}1.6&0.9\\0.9&1.1\end{pmatrix},\qquad u_\theta=\begin{pmatrix}\cos\theta\\\sin\theta\end{pmatrix}.\]μ=(0.5−0.3),Σ=(1.60.90.91.1),uθ=(cosθsinθ).\mu=\begin{pmatrix}0.5\\-0.3\end{pmatrix},\qquad \Sigma=\begin{pmatrix}1.6&0.9\\0.9&1.1\end{pmatrix},\qquad u_\theta=\begin{pmatrix}\cos\theta\\\sin\theta\end{pmatrix}. Before comparing directions, predict \(\var(u_{45^\circ}^\top X)\)Var(u45∘⊤X)\operatorname{Var}(u_{45^\circ}^\top X). Does the positive covariance make it larger than either coordinate variance? Report a decimal value in squared coordinate units (scientific notation is also acceptable); give three decimal places.

The projection rule gives \[\E[u_\theta^\top X]=0.5\cos\theta-0.3\sin\theta,\qquad \var(u_\theta^\top X) =1.6\cos^2\theta+2(0.9)\sin\theta\cos\theta+1.1\sin^2\theta.\]𝔼[uθ⊤X]=0.5cosθ−0.3sinθ,Var(uθ⊤X)=1.6cos2θ+2(0.9)sinθcosθ+1.1sin2θ.\mathbb{E}[u_\theta^\top X]=0.5\cos\theta-0.3\sin\theta,\qquad \operatorname{Var}(u_\theta^\top X) =1.6\cos^2\theta+2(0.9)\sin\theta\cos\theta+1.1\sin^2\theta. At \(45^\circ\)45∘45^\circ, both coordinates of \(u_\theta\)uθu_\theta equal \(1/\sqrt2\)1/21/\sqrt2, so the mean is \(0.2/\sqrt2\)0.2/20.2/\sqrt2 and the variance is \[\frac{1.6+2(0.9)+1.1}{2}=2.25.\]1.6+2(0.9)+1.12=2.25.\frac{1.6+2(0.9)+1.1}{2}=2.25. The two covariance cross terms contribute \(0.9\)0.90.9: omitting them gives \(1.35\)1.351.35. The standard deviation is \(1.5\)1.51.5, whereas the requested variance is \(2.25\)2.252.25. The explanation is available whether or not you try the check.

Static comparison. These exact parameter calculations give the comparison without a simulation: \[\begin{array}{c|ccc} \theta & 0^\circ & 45^\circ & 90^\circ\\ \hline \E[u_\theta^\top X] & 0.5 & 0.2/\sqrt2 & -0.3\\ \var(u_\theta^\top X) & 1.6 & 2.25 & 1.1 \end{array}\]θ0∘45∘90∘𝔼[uθ⊤X]0.50.2/2−0.3Var(uθ⊤X)1.62.251.1\begin{array}{c|ccc} \theta & 0^\circ & 45^\circ & 90^\circ\\ \hline \mathbb{E}[u_\theta^\top X] & 0.5 & 0.2/\sqrt2 & -0.3\\ \operatorname{Var}(u_\theta^\top X) & 1.6 & 2.25 & 1.1 \end{array} Rotating the direction changes the projections of the same observations, not the observations themselves. A finite projected sample illustrates the Gaussian law; its histogram need not match the reference density exactly. Positive semidefiniteness: every covariance satisfies \(u^\top\Sigma u=\var(u^\top X)\geq0\)u⊤Σu=Var(u⊤X)≥0u^\top\Sigma u=\operatorname{Var}(u^\top X)\geq0. If this variance is zero, the projection equals its mean almost surely: it is a point mass, not a density of positive width. The displayed covariance is positive definite, since \(1.6>0\)1.6>01.6>0 and \(\det\Sigma=0.95>0\)detΣ=0.95>0\det\Sigma=0.95>0. For a related variance calculation, see Exercise 6.

Gaussian tails and Mills’ ratio

Mid priorityTwo-sided tail refinement and its proof
Proposition 2Mills’ ratio

For every \(t>0\)t>0t>0, \[\frac{t}{t^2+1}\phi(t) \leq \overline\Phi(t) \leq \frac{\phi(t)}{t}.\]tt2+1ϕ(t)≤Φ¯(t)≤ϕ(t)t.\frac{t}{t^2+1}\phi(t) \leq \overline\Phi(t) \leq \frac{\phi(t)}{t}. Consequently, the logarithm of the Gaussian upper tail has leading term \(-t^2/2\)−t2/2-t^2/2 as \(t\to\infty\)t→∞t\to\infty.

Proof. Since \(\phi'(x)=-x\phi(x)\)ϕ′(x)=−xϕ(x)\phi'(x)=-x\phi(x), \[\overline\Phi(t) =\int_t^\infty\phi(x)\,dx \leq \frac{1}{t}\int_t^\infty x\phi(x)\,dx =\frac{\phi(t)}{t}.\]Φ¯(t)=∫t∞ϕ(x)dx≤1t∫t∞xϕ(x)dx=ϕ(t)t.\overline\Phi(t) =\int_t^\infty\phi(x)\,dx \leq \frac{1}{t}\int_t^\infty x\phi(x)\,dx =\frac{\phi(t)}{t}. Integration by parts also gives \[\overline\Phi(t) =\frac{\phi(t)}{t} -\int_t^\infty\frac{\phi(x)}{x^2}\,dx \geq \frac{\phi(t)}{t}-\frac{\overline\Phi(t)}{t^2}.\]Φ¯(t)=ϕ(t)t−∫t∞ϕ(x)x2dx≥ϕ(t)t−Φ¯(t)t2.\overline\Phi(t) =\frac{\phi(t)}{t} -\int_t^\infty\frac{\phi(x)}{x^2}\,dx \geq \frac{\phi(t)}{t}-\frac{\overline\Phi(t)}{t^2}. Rearranging yields the lower bound. ◻

Mid priorityTail calculations and the \(\sqrt{\log d}\)logd\sqrt{\log d} noise scale

The moment-generating function gives the convenient, slightly looser bound \[\PR(|G|\geq t)\leq 2e^{-t^2/2},\qquad t\geq 0.\]ℙ(|G|≥t)≤2e−t2/2,t≥0.\mathbb{P}(|G|\geq t)\leq 2e^{-t^2/2},\qquad t\geq 0.

Example 4The noise level in many coordinates

Let \(G_1,\ldots,G_d\)G1,…,GdG_1,\ldots,G_d be standard normal random variables; independence is not needed for this bound. By a union bound, \[\PR\left(\max_{1\leq j\leq d}|G_j|\geq t\right) \leq 2d e^{-t^2/2}.\]ℙ(max1≤j≤d|Gj|≥t)≤2de−t2/2.\mathbb{P}\left(\max_{1\leq j\leq d}|G_j|\geq t\right) \leq 2d e^{-t^2/2}. Therefore, with probability at least \(1-\delta\)1−δ1-\delta, \[\max_{1\leq j\leq d}|G_j| \leq \sqrt{2\log(2d/\delta)}.\]max1≤j≤d|Gj|≤2log(2d/δ).\max_{1\leq j\leq d}|G_j| \leq \sqrt{2\log(2d/\delta)}. The scale \(\sqrt{\log d}\)logd\sqrt{\log d} is a recurring high-dimensional noise threshold.

Instructor’s NoteA direct Gaussian tail bound

Moment-generating functions are a powerful, general-purpose method that we will study later. Here we can obtain the tail bound by combining Proposition 2 with a direct calculation using the Gaussian density.

Recall Mills’ ratio: its upper bound is \(\overline\Phi(t)\leq\phi(t)/t\)Φ¯(t)≤ϕ(t)/t\overline\Phi(t)\leq\phi(t)/t for \(t>0\)t>0t>0.

For \(t>1\)t>1t>1, the upper bound in Proposition 2 is tighter than the simpler bound \(2e^{-t^2/2}\)2e−t2/22e^{-t^2/2}: by symmetry, \[\PR(|G|\geq t) =2\overline\Phi(t) \leq\frac{2\phi(t)}{t} =\frac{\sqrt{2/\pi}}{t}e^{-t^2/2} <e^{-t^2/2}\leq 2e^{-t^2/2}.\]ℙ(|G|≥t)=2Φ¯(t)≤2ϕ(t)t=2/πte−t2/2<e−t2/2≤2e−t2/2.\mathbb{P}(|G|\geq t) =2\overline\Phi(t) \leq\frac{2\phi(t)}{t} =\frac{\sqrt{2/\pi}}{t}e^{-t^2/2} <e^{-t^2/2}\leq 2e^{-t^2/2}.

For \(0<t<1\)0<t<10<t<1, a change of variables gives a simple direct argument. In fact, this argument works for every \(t\geq0\)t≥0t\geq0 and improves the constant \(2\)22 to \(1\)11. Substitute \(x=t+u\)x=t+ux=t+u: \[\begin{aligned} \overline\Phi(t) &=\int_0^\infty\phi(t+u)\,du\\ &=e^{-t^2/2}\int_0^\infty e^{-tu}\phi(u)\,du\\ &\leq e^{-t^2/2}\int_0^\infty\phi(u)\,du =\frac12 e^{-t^2/2}. \end{aligned}\]Φ¯(t)=∫0∞ϕ(t+u)du=e−t2/2∫0∞e−tuϕ(u)du≤e−t2/2∫0∞ϕ(u)du=12e−t2/2.\begin{aligned} \overline\Phi(t) &=\int_0^\infty\phi(t+u)\,du\\ &=e^{-t^2/2}\int_0^\infty e^{-tu}\phi(u)\,du\\ &\leq e^{-t^2/2}\int_0^\infty\phi(u)\,du =\frac12 e^{-t^2/2}. \end{aligned} The only inequality is \(e^{-tu}\leq1\)e−tu≤1e^{-tu}\leq1, since \(t,u\geq0\)t,u≥0t,u\geq0; the last equality uses symmetry of the standard normal density. Multiplying by \(2\)22 gives \[\boxed{\PR(|G|\geq t)\leq e^{-t^2/2}\leq 2e^{-t^2/2}, \qquad t\geq0.}\]ℙ(|G|≥t)≤e−t2/2≤2e−t2/2,t≥0.\boxed{\mathbb{P}(|G|\geq t)\leq e^{-t^2/2}\leq 2e^{-t^2/2}, \qquad t\geq0.} This also covers \(t=0\)t=0t=0 and \(t=1\)t=1t=1, and establishes the bound used in the noise-scale calculation without moment-generating functions.

Combinatorics, Stirling’s formula, and entropy

Mid priorityApproximating factorials, binomial masses, and combinatorial growth

For integers \(0\leq k\leq n\)0≤k≤n0\leq k\leq n, \[\binom{n}{k}=\frac{n!}{k!(n-k)!}, \qquad n!=1\cdot 2\cdots n.\](nk)=n!k!(n−k)!,n!=1⋅2⋯n.\binom{n}{k}=\frac{n!}{k!(n-k)!}, \qquad n!=1\cdot 2\cdots n. The binomial coefficient counts subsets of size \(k\)kk selected from \(n\)nn objects. In probability it also describes the mass function of a binomial random variable.

Theorem 2Stirling’s formula

As \(n\to\infty\)n→∞n\to\infty, \[n!=\sqrt{2\pi n}\left(\frac{n}{e}\right)^n(1+o(1)).\]n!=2πn(ne)n(1+o(1)).n!=\sqrt{2\pi n}\left(\frac{n}{e}\right)^n(1+o(1)). Equivalently, \[\log(n!)=n\log n-n+\frac12\log(2\pi n)+o(1).\]log(n!)=nlogn−n+12log(2πn)+o(1).\log(n!)=n\log n-n+\frac12\log(2\pi n)+o(1).

Example 5A local approximation to the binomial distribution

Suppose \(X_1,\ldots,X_n\stackrel{\iid}{\sim}\operatorname{Bernoulli}(1/2)\)X1,…,Xn∼i.i.d.Bernoulli(1/2)X_1,\ldots,X_n\stackrel{\mathrm{i.i.d.}}{\sim}\operatorname{Bernoulli}(1/2), \(n\)nn is even, and \(k=k_n\)k=knk=k_n is an integer satisfying \(|k|=O(\sqrt n)\)|k|=O(n)|k|=O(\sqrt n). Applying Stirling’s formula to the three factorials gives \[\PR\left(\sum_{i=1}^nX_i=\frac n2+k\right) =2^{-n}\binom{n}{n/2+k} =(1+o(1))\sqrt{\frac{2}{\pi n}} \exp\left(-\frac{2k^2}{n}\right).\]ℙ(∑i=1nXi=n2+k)=2−n(nn/2+k)=(1+o(1))2πnexp(−2k2n).\mathbb{P}\left(\sum_{i=1}^nX_i=\frac n2+k\right) =2^{-n}\binom{n}{n/2+k} =(1+o(1))\sqrt{\frac{2}{\pi n}} \exp\left(-\frac{2k^2}{n}\right). This is a local normal approximation to \(\mathrm{Binomial}(n,1/2)\)Binomial(n,1/2)\mathrm{Binomial}(n,1/2) near its mean.

Low priority — not examined: Binary entropy

For \(\gamma\in(0,1)\)γ∈(0,1)\gamma\in(0,1), define the binary entropy function, using natural logarithms, by \[h(\gamma) =-\gamma\log\gamma-(1-\gamma)\log(1-\gamma).\]h(γ)=−γlogγ−(1−γ)log(1−γ).h(\gamma) =-\gamma\log\gamma-(1-\gamma)\log(1-\gamma). If \(m=m_n\)m=mnm=m_n and \(m/n\to\gamma\in(0,1)\)m/n→γ∈(0,1)m/n\to\gamma\in(0,1), then \[\log\binom{n}{m}=n h(m/n)+O(\log n) =(h(\gamma)+o(1))n.\]log(nm)=nh(m/n)+O(logn)=(h(γ)+o(1))n.\log\binom{n}{m}=n h(m/n)+O(\log n) =(h(\gamma)+o(1))n. More precisely, if \(m/n\)m/nm/n remains bounded away from \(0\)00 and \(1\)11, then \[\binom{n}{m} =(1+o(1)) \frac{\exp\{n h(m/n)\}} {\sqrt{2\pi n(m/n)(1-m/n)}}.\](nm)=(1+o(1))exp{nh(m/n)}2πn(m/n)(1−m/n).\binom{n}{m} =(1+o(1)) \frac{\exp\{n h(m/n)\}} {\sqrt{2\pi n(m/n)(1-m/n)}}.

Remark 4Why entropy appears

The quantity \(h(\gamma)\)h(γ)h(\gamma) measures the exponential growth rate of the number of subsets with approximately \(\gamma n\)γn\gamma n selected elements. With base-\(2\)22 logarithms, the same count is approximately \(2^{n h_2(\gamma)}\)2nh2(γ)2^{n h_2(\gamma)}, where \(h_2(\gamma)=h(\gamma)/\log 2\)h2(γ)=h(γ)/log2h_2(\gamma)=h(\gamma)/\log 2. This combinatorial interpretation connects entropy to coding, likelihoods, and large-deviation probabilities.

Linear algebra for statistics

Trace, covariance, and quadratic forms

High priorityTrace identities, covariance matrices, and quadratic-form calculations

For a square matrix \(M\)MM, define \[\tr(M)=\sum_i M_{ii}.\]tr(M)=∑iMii.\operatorname{tr}(M)=\sum_i M_{ii}. If the matrix products are dimensionally compatible, the trace is invariant under cyclic permutations: \[\tr(ABC)=\tr(BCA)=\tr(CAB).\]tr(ABC)=tr(BCA)=tr(CAB).\operatorname{tr}(ABC)=\operatorname{tr}(BCA)=\operatorname{tr}(CAB). It is not generally invariant under an arbitrary reordering of the factors.

Practice: Exercise 6 · high
Proposition 3Expected quadratic form

Let \(X\in\R^d\)X∈ℝdX\in\mathbb{R}^d have mean \(\mu\)μ\mu and covariance matrix \(\Sigma\)Σ\Sigma, and let \(M\in\R^{d\times d}\)M∈ℝd×dM\in\mathbb{R}^{d\times d}. If the relevant second moments are finite, then \[\E[X^\top M X]=\tr(M\Sigma)+\mu^\top M\mu.\]𝔼[X⊤MX]=tr(MΣ)+μ⊤Mμ.\mathbb{E}[X^\top M X]=\operatorname{tr}(M\Sigma)+\mu^\top M\mu. For a centered random vector, this reduces to \(\E[X^\top M X]=\tr(M\Sigma)\)𝔼[X⊤MX]=tr(MΣ)\mathbb{E}[X^\top M X]=\operatorname{tr}(M\Sigma).

Proof. Use \(X^\top M X=\tr(MXX^\top)\)X⊤MX=tr(MXX⊤)X^\top M X=\operatorname{tr}(MXX^\top) and \(\E[XX^\top]=\Sigma+\mu\mu^\top\)𝔼[XX⊤]=Σ+μμ⊤\mathbb{E}[XX^\top]=\Sigma+\mu\mu^\top. ◻

A real symmetric matrix \(A\)AA is positive semidefinite, written \(A\succeq 0\)A≽0A\succeq 0, if \(x^\top A x\geq 0\)x⊤Ax≥0x^\top A x\geq 0 for every \(x\in\R^d\)x∈ℝdx\in\mathbb{R}^d. It is positive definite, written \(A\succ 0\)A≻0A\succ 0, if the inequality is strict for every nonzero \(x\)xx. Every covariance matrix is positive semidefinite because \[v^\top\Sigma v=\var(v^\top X)\geq 0.\]v⊤Σv=Var(v⊤X)≥0.v^\top\Sigma v=\operatorname{Var}(v^\top X)\geq 0.

Eigenvalues and perturbation

High prioritySpectral theorem and Rayleigh-quotient calculations

Let \(A\in\R^{d\times d}\)A∈ℝd×dA\in\mathbb{R}^{d\times d} be symmetric. The spectral theorem gives an orthogonal matrix \(Q\)QQ and real eigenvalues \(\lambda_1(A)\geq\cdots\geq\lambda_d(A)\)λ1(A)≥⋯≥λd(A)\lambda_1(A)\geq\cdots\geq\lambda_d(A) such that \[A=Q\diag\{\lambda_1(A),\ldots,\lambda_d(A)\}Q^\top.\]A=Qdiag{λ1(A),…,λd(A)}Q⊤.A=Q\operatorname{diag}\{\lambda_1(A),\ldots,\lambda_d(A)\}Q^\top. The Rayleigh quotient is \[R_A(x)=\frac{x^\top A x}{x^\top x},\qquad x\neq 0.\]RA(x)=x⊤Axx⊤x,x≠0.R_A(x)=\frac{x^\top A x}{x^\top x},\qquad x\neq 0. It satisfies \[\lambda_{\max}(A) =\max_{\|x\|_2=1}x^\top A x, \qquad \lambda_{\min}(A) =\min_{\|x\|_2=1}x^\top A x.\]λmax(A)=max∥x∥2=1x⊤Ax,λmin(A)=min∥x∥2=1x⊤Ax.\lambda_{\max}(A) =\max_{\|x\|_2=1}x^\top A x, \qquad \lambda_{\min}(A) =\min_{\|x\|_2=1}x^\top A x.

Low priority — not examined: Courant–Fischer min–max characterization
Theorem 3Courant–Fischer min–max theorem

For \(1\leq k\leq d\)1≤k≤d1\leq k\leq d, \[\begin{aligned} \lambda_k(A) &=\max_{\substack{V\subset\R^d\\ \dim(V)=k}} \ \min_{\substack{x\in V\\ \|x\|_2=1}}x^\top A x\\ &=\min_{\substack{V\subset\R^d\\ \dim(V)=d-k+1}} \ \max_{\substack{x\in V\\ \|x\|_2=1}}x^\top A x.\end{aligned}\]λk(A)=maxV⊂ℝddim(V)=kminx∈V∥x∥2=1x⊤Ax=minV⊂ℝddim(V)=d−k+1maxx∈V∥x∥2=1x⊤Ax.\begin{aligned} \lambda_k(A) &=\max_{\substack{V\subset\mathbb{R}^d\\ \dim(V)=k}} \ \min_{\substack{x\in V\\ \|x\|_2=1}}x^\top A x\\ &=\min_{\substack{V\subset\mathbb{R}^d\\ \dim(V)=d-k+1}} \ \max_{\substack{x\in V\\ \|x\|_2=1}}x^\top A x.\end{aligned}

Mid priorityWeyl’s eigenvalue perturbation bound
Practice: Exercise 8 · mid
Theorem 4Weyl’s perturbation bound

If \(A,E\in\R^{d\times d}\)A,E∈ℝd×dA,E\in\mathbb{R}^{d\times d} are symmetric, then for every \(1\leq k\leq d\)1≤k≤d1\leq k\leq d, \[|\lambda_k(A+E)-\lambda_k(A)| \leq \|E\|_{\op},\]|λk(A+E)−λk(A)|≤∥E∥op,|\lambda_k(A+E)-\lambda_k(A)| \leq \|E\|_{\mathrm{op}}, where \[\|E\|_{\op} =\max_{\|x\|_2=1}\|Ex\|_2 =\max_{1\leq j\leq d}|\lambda_j(E)|.\]∥E∥op=max∥x∥2=1∥Ex∥2=max1≤j≤d|λj(E)|.\|E\|_{\mathrm{op}} =\max_{\|x\|_2=1}\|Ex\|_2 =\max_{1\leq j\leq d}|\lambda_j(E)|.

Thus, a small operator-norm perturbation cannot move any eigenvalue very far. This is the basic bridge from concentration of a sample covariance matrix to accuracy of its empirical eigenvalues.

The corresponding complex-valued results hold for Hermitian matrices, which satisfy \(A=A^*\)A=A*A=A^*, where \(A^*=\overline A^\top\)A*=A¯⊤A^*=\overline A^\top is the conjugate transpose.

Singular value decomposition and matrix norms

High prioritySingular value decomposition

Let \(A\in\R^{n\times m}\)A∈ℝn×mA\in\mathbb{R}^{n\times m} be nonzero with rank \(\rho\geq 1\)ρ≥1\rho\geq 1. Its thin singular value decomposition (SVD) is \[A=USV^\top,\]A=USV⊤,A=USV^\top, where \(U\in\R^{n\times\rho}\)U∈ℝn×ρU\in\mathbb{R}^{n\times\rho} and \(V\in\R^{m\times\rho}\)V∈ℝm×ρV\in\mathbb{R}^{m\times\rho} have orthonormal columns and \[S=\diag\{s_1(A),\ldots,s_\rho(A)\}, \qquad s_1(A)\geq\cdots\geq s_\rho(A)>0.\]S=diag{s1(A),…,sρ(A)},s1(A)≥⋯≥sρ(A)>0.S=\operatorname{diag}\{s_1(A),\ldots,s_\rho(A)\}, \qquad s_1(A)\geq\cdots\geq s_\rho(A)>0. The nonzero eigenvalues of \(A^\top A\)A⊤AA^\top A and \(AA^\top\)AA⊤AA^\top are \(s_1(A)^2,\ldots,s_\rho(A)^2\)s1(A)2,…,sρ(A)2s_1(A)^2,\ldots,s_\rho(A)^2.

Mid priorityVariational characterization and operator/Frobenius norms

The largest singular value has the variational representations \[s_1(A) =\max_{\|y\|_2=1}\|Ay\|_2 =\max_{\substack{\|x\|_2=1\\\|y\|_2=1}}x^\top Ay.\]s1(A)=max∥y∥2=1∥Ay∥2=max∥x∥2=1∥y∥2=1x⊤Ay.s_1(A) =\max_{\|y\|_2=1}\|Ay\|_2 =\max_{\substack{\|x\|_2=1\\\|y\|_2=1}}x^\top Ay.

Two matrix norms used throughout the course are \[\|A\|_{\op}=s_1(A), \qquad \|A\|_{\mathrm F} =\left(\sum_{i,j}A_{ij}^2\right)^{1/2} =\left(\sum_{j=1}^{\rho}s_j(A)^2\right)^{1/2}.\]∥A∥op=s1(A),∥A∥F=(∑i,jAij2)1/2=(∑j=1ρsj(A)2)1/2.\|A\|_{\mathrm{op}}=s_1(A), \qquad \|A\|_{\mathrm F} =\left(\sum_{i,j}A_{ij}^2\right)^{1/2} =\left(\sum_{j=1}^{\rho}s_j(A)^2\right)^{1/2}. They satisfy \[\|A\|_{\op}\leq\|A\|_{\mathrm F} \leq\sqrt{\rho}\,\|A\|_{\op}.\]∥A∥op≤∥A∥F≤ρ∥A∥op.\|A\|_{\mathrm{op}}\leq\|A\|_{\mathrm F} \leq\sqrt{\rho}\,\|A\|_{\mathrm{op}}.

Low priority — not examined: Optimal low-rank approximation
Theorem 5Eckart–Young–Mirsky

For \(1\leq r<\rho\)1≤r<ρ1\leq r<\rho, define \[A_r=\sum_{j=1}^r s_j(A)u_jv_j^\top.\]Ar=∑j=1rsj(A)ujvj⊤.A_r=\sum_{j=1}^r s_j(A)u_jv_j^\top. Then \(A_r\)ArA_r is a best rank-\(r\)rr approximation to \(A\)AA in both operator and Frobenius norm: \[\begin{aligned} \min_{\rank(B)\leq r}\|A-B\|_{\op} &=s_{r+1}(A),\\ \min_{\rank(B)\leq r}\|A-B\|_{\mathrm F} &=\left(\sum_{j=r+1}^{\rho}s_j(A)^2\right)^{1/2}.\end{aligned}\]minrank(B)≤r∥A−B∥op=sr+1(A),minrank(B)≤r∥A−B∥F=(∑j=r+1ρsj(A)2)1/2.\begin{aligned} \min_{\operatorname{rank}(B)\leq r}\|A-B\|_{\mathrm{op}} &=s_{r+1}(A),\\ \min_{\operatorname{rank}(B)\leq r}\|A-B\|_{\mathrm F} &=\left(\sum_{j=r+1}^{\rho}s_j(A)^2\right)^{1/2}.\end{aligned}

PCA as variance maximization and low-rank approximation

Mid priorityEquivalent formulations of PCA

Let \(X\in\R^{n\times d}\)X∈ℝn×dX\in\mathbb{R}^{n\times d} be a nonzero centered data matrix: row \(i\)ii is the feature vector for observation \(i\)ii, after subtracting the sample mean. No assumption that \(n>d\)n>dn>d or that \(X\)XX has full rank is needed. Write \[X=USV^\top, \qquad V=[v_1,\ldots,v_\rho].\]X=USV⊤,V=[v1,…,vρ].X=USV^\top, \qquad V=[v_1,\ldots,v_\rho]. Then:

  • \(v_j\)vjv_j is the \(j\)jjth principal direction or loading vector;

  • \(Xv_j=s_j u_j\)Xvj=sjujXv_j=s_j u_j is the vector of \(j\)jjth principal-component scores;

  • the empirical covariance matrix \(\widehat\Sigma=X^\top X/n\)Σ̂=X⊤X/n\widehat\Sigma=X^\top X/n has eigenvectors \(v_j\)vjv_j and eigenvalues \(s_j^2/n\)sj2/ns_j^2/n; and

  • \(X_r=\sum_{j=1}^r s_j u_jv_j^\top\)Xr=∑j=1rsjujvj⊤X_r=\sum_{j=1}^r s_j u_jv_j^\top is the best rank-\(r\)rr reconstruction of the centered data.

The first principal direction also solves \[v_1\in\argmax_{\|v\|_2=1} \frac{1}{n}\|Xv\|_2^2 =\argmax_{\|v\|_2=1}v^\top\widehat\Sigma v.\]v1∈arg max∥v∥2=11n∥Xv∥22=arg max∥v∥2=1v⊤Σ̂v.v_1\in\mathop{\mathrm{arg\,max}}\limits_{\|v\|_2=1} \frac{1}{n}\|Xv\|_2^2 =\mathop{\mathrm{arg\,max}}\limits_{\|v\|_2=1}v^\top\widehat\Sigma v. Thus, the eigenvalue view, the variance-maximization view, and the low-rank approximation view describe the same procedure.

Vector norms, inequalities, and duality

Mid priorityNorm calculations, inequalities, and duality

A function \(\|\cdot\|:\R^d\to[0,\infty)\)∥⋅∥:ℝd→[0,∞)\|\cdot\|:\mathbb{R}^d\to[0,\infty) is a norm if, for all \(x,y\in\R^d\)x,y∈ℝdx,y\in\mathbb{R}^d and scalars \(a\)aa:

  1. \(\|x\|=0\)∥x∥=0\|x\|=0 if and only if \(x=0\)x=0x=0;

  2. \(\|ax\|=|a|\,\|x\|\)∥ax∥=|a|∥x∥\|ax\|=|a|\,\|x\|;

  3. \(\|x+y\|\leq\|x\|+\|y\|\)∥x+y∥≤∥x∥+∥y∥\|x+y\|\leq\|x\|+\|y\|.

For \(1\leq p<\infty\)1≤p<∞1\leq p<\infty, \[\|x\|_p=\left(\sum_{j=1}^d|x_j|^p\right)^{1/p}, \qquad \|x\|_\infty=\max_{1\leq j\leq d}|x_j|.\]∥x∥p=(∑j=1d|xj|p)1/p,∥x∥∞=max1≤j≤d|xj|.\|x\|_p=\left(\sum_{j=1}^d|x_j|^p\right)^{1/p}, \qquad \|x\|_\infty=\max_{1\leq j\leq d}|x_j|.

The Euclidean inner product is \(\langle x,y\rangle=x^\top y\)⟨x,y⟩=x⊤y\langle x,y\rangle=x^\top y. For nonzero \(x,y\)x,yx,y, the angle between them is defined by \[\cos\theta=\frac{\langle x,y\rangle}{\|x\|_2\|y\|_2}.\]cosθ=⟨x,y⟩∥x∥2∥y∥2.\cos\theta=\frac{\langle x,y\rangle}{\|x\|_2\|y\|_2}.

Theorem 6Cauchy–Schwarz and Hölder

For \(x,y\in\R^d\)x,y∈ℝdx,y\in\mathbb{R}^d, \[|\langle x,y\rangle|\leq\|x\|_2\|y\|_2.\]|⟨x,y⟩|≤∥x∥2∥y∥2.|\langle x,y\rangle|\leq\|x\|_2\|y\|_2. More generally, if \(1\leq p,q\leq\infty\)1≤p,q≤∞1\leq p,q\leq\infty and \(1/p+1/q=1\)1/p+1/q=11/p+1/q=1, then \[|\langle x,y\rangle|\leq\|x\|_p\|y\|_q.\]|⟨x,y⟩|≤∥x∥p∥y∥q.|\langle x,y\rangle|\leq\|x\|_p\|y\|_q.

Cauchy–Schwarz implies the triangle inequality for the Euclidean norm: \[\begin{split} \|x+y\|_2^2 &=\|x\|_2^2+\|y\|_2^2+2\langle x,y\rangle\\ &\leq\|x\|_2^2+\|y\|_2^2+2\|x\|_2\|y\|_2 =(\|x\|_2+\|y\|_2)^2. \end{split}\]∥x+y∥22=∥x∥22+∥y∥22+2⟨x,y⟩≤∥x∥22+∥y∥22+2∥x∥2∥y∥2=(∥x∥2+∥y∥2)2.\begin{split} \|x+y\|_2^2 &=\|x\|_2^2+\|y\|_2^2+2\langle x,y\rangle\\ &\leq\|x\|_2^2+\|y\|_2^2+2\|x\|_2\|y\|_2 =(\|x\|_2+\|y\|_2)^2. \end{split}

Proposition 4Norm comparison

If \(1\leq p\leq q\leq\infty\)1≤p≤q≤∞1\leq p\leq q\leq\infty, then \[\|x\|_q\leq\|x\|_p \leq d^{1/p-1/q}\|x\|_q.\]∥x∥q≤∥x∥p≤d1/p−1/q∥x∥q.\|x\|_q\leq\|x\|_p \leq d^{1/p-1/q}\|x\|_q. Important special cases are \[\|x\|_\infty\leq\|x\|_2\leq\|x\|_1, \qquad \|x\|_1\leq\sqrt d\,\|x\|_2, \qquad \|x\|_2\leq\sqrt d\,\|x\|_\infty.\]∥x∥∞≤∥x∥2≤∥x∥1,∥x∥1≤d∥x∥2,∥x∥2≤d∥x∥∞.\|x\|_\infty\leq\|x\|_2\leq\|x\|_1, \qquad \|x\|_1\leq\sqrt d\,\|x\|_2, \qquad \|x\|_2\leq\sqrt d\,\|x\|_\infty.

The powers of \(d\)dd are not cosmetic. For the all-ones vector, \(\|\mathbf 1\|_1=d\)∥1∥1=d\|\mathbf 1\|_1=d, \(\|\mathbf 1\|_2=\sqrt d\)∥1∥2=d\|\mathbf 1\|_2=\sqrt d, and \(\|\mathbf 1\|_\infty=1\)∥1∥∞=1\|\mathbf 1\|_\infty=1, so the dimension-dependent constants are sharp.

Proposition 5Duality of \(\ell_p\)ℓp\ell_p norms

If \(1/p+1/q=1\)1/p+1/q=11/p+1/q=1, then \[\|x\|_p =\max_{\|y\|_q\leq 1}\langle x,y\rangle.\]∥x∥p=max∥y∥q≤1⟨x,y⟩.\|x\|_p =\max_{\|y\|_q\leq 1}\langle x,y\rangle. Thus, the dual norm of \(\ell_p\)ℓp\ell_p is \(\ell_q\)ℓq\ell_q; in particular, \(\ell_1\)ℓ1\ell_1 and \(\ell_\infty\)ℓ∞\ell_\infty are dual, while \(\ell_2\)ℓ2\ell_2 is self-dual.

Remark 5Statistical interpretation

Norms encode different notions of size. The \(\ell_2\)ℓ2\ell_2 norm is tied to least-squares geometry, \(\ell_1\)ℓ1\ell_1 regularization encourages sparse solutions, and \(\ell_\infty\)ℓ∞\ell_\infty controls the largest coordinatewise error. Duality explains why an \(\ell_1\)ℓ1\ell_1 estimation error is naturally paired with an \(\ell_\infty\)ℓ∞\ell_\infty noise term.

Convexity and optimality

High priorityConvexity checks and first-order optimality calculations
Definition 8Convex sets and functions

A set \(C\subset\R^d\)C⊂ℝdC\subset\mathbb{R}^d is convex if \[tx+(1-t)y\in C \quad\text{for all }x,y\in C,\ t\in[0,1].\]tx+(1−t)y∈Cfor all x,y∈C,t∈[0,1].tx+(1-t)y\in C \quad\text{for all }x,y\in C,\ t\in[0,1]. A function \(f:C\to\R\)f:C→ℝf:C\to\mathbb{R} is convex if \[f(tx+(1-t)y)\leq tf(x)+(1-t)f(y)\]f(tx+(1−t)y)≤tf(x)+(1−t)f(y)f(tx+(1-t)y)\leq tf(x)+(1-t)f(y) for all \(x,y\in C\)x,y∈Cx,y\in C and \(t\in[0,1]\)t∈[0,1]t\in[0,1]. It is strictly convex if the inequality is strict whenever \(x\neq y\)x≠yx\neq y and \(t\in(0,1)\)t∈(0,1)t\in(0,1).

Geometrically, the graph of a convex function lies below every chord joining two points on the graph. Affine subspaces, Euclidean balls, and half-spaces are convex. A union of convex sets need not be convex, but an arbitrary intersection of convex sets is convex.

Predict the chord gap. Fix \(x,y\)x,yx,y and vary \(t\)tt from \(0\)00 to \(1\)11. When does the gap vanish? Here \(t\)tt weights \(y\)yy, replacing \(t\)tt by \(1-t\)1−t1-t in the definition above.

At \(z=(1-t)x+ty\)z=(1−t)x+tyz=(1-t)x+ty, compare A: average then evaluate, \(f(z)\)f(z)f(z), with B: evaluate then average, \((1-t)f(x)+tf(y)\)(1−t)f(x)+tf(y)(1-t)f(x)+tf(y). Convexity gives \(B-A\geq0\)B−A≥0B-A\geq0. The figure illustrates this inequality; it does not prove it for every convex function.

For \(f(z)=\tfrac12(z-\tfrac12)^2+0.35\)f(z)=12(z−12)2+0.35f(z)=\tfrac12(z-\tfrac12)^2+0.35, \(x=-1\)x=−1x=-1, \(y=1.5\)y=1.5y=1.5 and \(t=0.5\)t=0.5t=0.5, we have \(z=0.25\)z=0.25z=0.25, \(A=0.38125\)A=0.38125A=0.38125, \(B=1.1625\)B=1.1625B=1.1625, and gap \(0.78125\)0.781250.78125. At \(t=0.8\)t=0.8t=0.8 the gap is \(0.5\)0.50.5; at either endpoint \(t=0,1\)t=0,1t=0,1, or when \(x=y\)x=yx=y, the gap is zero.

Proposition 6First- and second-order characterizations

Let \(C\subset\R^d\)C⊂ℝdC\subset\mathbb{R}^d be open and convex.

  1. If \(f\)ff is differentiable on \(C\)CC, then \(f\)ff is convex if and only if \[f(y)\geq f(x)+\nabla f(x)^\top(y-x) \quad\text{for all }x,y\in C.\]f(y)≥f(x)+∇f(x)⊤(y−x)for all x,y∈C.f(y)\geq f(x)+\nabla f(x)^\top(y-x) \quad\text{for all }x,y\in C.

  2. If \(f\)ff is twice continuously differentiable on \(C\)CC, then \(f\)ff is convex if and only if \(\nabla^2 f(x)\succeq 0\)∇2f(x)≽0\nabla^2 f(x)\succeq 0 for every \(x\in C\)x∈Cx\in C. If \(\nabla^2 f(x)\succ 0\)∇2f(x)≻0\nabla^2 f(x)\succ 0 everywhere, then \(f\)ff is strictly convex.

Proposition 7Smooth first-order optimality

Let \(f:\R^d\to\R\)f:ℝd→ℝf:\mathbb{R}^d\to\mathbb{R} be differentiable and convex. A point \(x^\star\)x⋆x^\star minimizes \(f\)ff if and only if \[\nabla f(x^\star)=0.\]∇f(x⋆)=0.\nabla f(x^\star)=0.

Proposition 8Existence and uniqueness

If \(C\)CC is nonempty and compact and \(f:C\to\R\)f:C→ℝf:C\to\mathbb{R} is continuous, a minimizer exists. If, in addition, \(C\)CC is convex and \(f\)ff is strictly convex, the minimizer is unique.

Convexity also improves the geometry of optimization: every local minimizer of a convex function over a convex set is global. This structural fact does not by itself prescribe a runtime; computational guarantees also depend on how the problem is represented, the desired accuracy, and the available oracle or algorithm.

Example 6Least squares and regularization

For \(X\in\R^{n\times d}\)X∈ℝn×dX\in\mathbb{R}^{n\times d} and \(y\in\R^n\)y∈ℝny\in\mathbb{R}^n, \[L(\beta)=\|y-X\beta\|_2^2\]L(β)=∥y−Xβ∥22L(\beta)=\|y-X\beta\|_2^2 is convex because \(\nabla^2L(\beta)=2X^\top X\succeq 0\)∇2L(β)=2X⊤X≽0\nabla^2L(\beta)=2X^\top X\succeq 0. It is strictly convex if and only if \(X\)XX has full column rank. For \(\lambda>0\)λ>0\lambda>0, \[L_{\lambda,q}(\beta) =\|y-X\beta\|_2^2+\lambda\|\beta\|_q^q\]Lλ,q(β)=∥y−Xβ∥22+λ∥β∥qqL_{\lambda,q}(\beta) =\|y-X\beta\|_2^2+\lambda\|\beta\|_q^q is strictly convex when \(q>1\)q>1q>1. When \(q=1\)q=1q=1, the objective remains convex but is nonsmooth and need not be strictly convex.

Subgradients and nonsmooth optimality

Low priority — not examined: Subgradients and nonsmooth optimality
Definition 9Subgradient

For a convex function \(f:\R^d\to\R\)f:ℝd→ℝf:\mathbb{R}^d\to\mathbb{R}, a vector \(g\in\R^d\)g∈ℝdg\in\mathbb{R}^d is a subgradient of \(f\)ff at \(x\in\R^d\)x∈ℝdx\in\mathbb{R}^d if \[f(y)\geq f(x)+g^\top(y-x) \quad\text{for every }y\in\R^d.\]f(y)≥f(x)+g⊤(y−x)for every y∈ℝd.f(y)\geq f(x)+g^\top(y-x) \quad\text{for every }y\in\mathbb{R}^d. The set of all subgradients is the subdifferential \(\partial f(x)\)∂f(x)\partial f(x).

If \(f\)ff is differentiable at \(x\)xx, then \(\partial f(x)=\{\nabla f(x)\}\)∂f(x)={∇f(x)}\partial f(x)=\{\nabla f(x)\}. For \(f(x)=|x|\)f(x)=|x|f(x)=|x|, \[\partial |x|= \begin{cases} \{1\}, & x>0,\\ [-1,1], & x=0,\\ \{-1\}, & x<0. \end{cases}\]∂|x|={{1},x>0,[−1,1],x=0,{−1},x<0.\partial |x|= \begin{cases} \{1\}, & x>0,\\ [-1,1], & x=0,\\ \{-1\}, & x<0. \end{cases}

Proposition 9First-order optimality

Let \(f:\R^d\to\R\)f:ℝd→ℝf:\mathbb{R}^d\to\mathbb{R} be convex. A point \(x^\star\)x⋆x^\star minimizes \(f\)ff if and only if \[0\in\partial f(x^\star).\]0∈∂f(x⋆).0\in\partial f(x^\star).

For the LASSO objective \[L_{\lambda,1}(\beta) =\|y-X\beta\|_2^2+\lambda\|\beta\|_1,\]Lλ,1(β)=∥y−Xβ∥22+λ∥β∥1,L_{\lambda,1}(\beta) =\|y-X\beta\|_2^2+\lambda\|\beta\|_1, the optimality condition is \[0\in 2X^\top(X\widehat\beta-y) +\lambda\,\partial\|\widehat\beta\|_1.\]0∈2X⊤(Xβ̂−y)+λ∂∥β̂∥1.0\in 2X^\top(X\widehat\beta-y) +\lambda\,\partial\|\widehat\beta\|_1. Coordinatewise, the nonsmooth interval at zero creates a range of correlations for which \(\widehat\beta_j=0\)β̂j=0\widehat\beta_j=0 is optimal. This is the basic mechanism behind sparsity.

Extensions and further reading

Low priority — not examined: Function spaces and orthogonal expansions

Finite-dimensional vectors suggest an infinite-dimensional analogue. Let \(I\subset\R\)I⊂ℝI\subset\mathbb{R}, and let \(h\)hh be a nonnegative density on \(I\)II satisfying \(\int_I h(x)\,dx=1\)∫Ih(x)dx=1\int_I h(x)\,dx=1. For \(1\leq q<\infty\)1≤q<∞1\leq q<\infty, define \[\|f\|_{L_q(h)} =\left(\int_I|f(x)|^q h(x)\,dx\right)^{1/q}.\]∥f∥Lq(h)=(∫I|f(x)|qh(x)dx)1/q.\|f\|_{L_q(h)} =\left(\int_I|f(x)|^q h(x)\,dx\right)^{1/q}. For square-integrable functions, define \[\langle f,g\rangle_{L_2(h)} =\int_I f(x)g(x)h(x)\,dx.\]⟨f,g⟩L2(h)=∫If(x)g(x)h(x)dx.\langle f,g\rangle_{L_2(h)} =\int_I f(x)g(x)h(x)\,dx. Strictly speaking, two functions that agree except on a set of measure zero represent the same element of \(L_q(h)\)Lq(h)L_q(h). Lecture 2 will supply the measure-theoretic language behind this statement.

An orthonormal sequence \((\psi_j)_{j\geq 0}\)(ψj)j≥0(\psi_j)_{j\geq 0} satisfies \[\langle\psi_j,\psi_k\rangle_{L_2(h)} =\begin{cases}1,&j=k,\\0,&j\neq k.\end{cases}\]⟨ψj,ψk⟩L2(h)={1,j=k,0,j≠k.\langle\psi_j,\psi_k\rangle_{L_2(h)} =\begin{cases}1,&j=k,\\0,&j\neq k.\end{cases} It is an orthonormal basis if its finite linear combinations are dense in \(L_2(h)\)L2(h)L_2(h). Completeness is essential: an arbitrary orthonormal sequence need not span the space.

For an orthonormal basis, every \(f\in L_2(h)\)f∈L2(h)f\in L_2(h) has the expansion \[f=\sum_{j=0}^{\infty} \langle f,\psi_j\rangle_{L_2(h)}\psi_j\]f=∑j=0∞⟨f,ψj⟩L2(h)ψjf=\sum_{j=0}^{\infty} \langle f,\psi_j\rangle_{L_2(h)}\psi_j with convergence in \(L_2(h)\)L2(h)L_2(h), and Parseval’s identity gives \[\|f\|_{L_2(h)}^2 =\sum_{j=0}^{\infty} \langle f,\psi_j\rangle_{L_2(h)}^2.\]∥f∥L2(h)2=∑j=0∞⟨f,ψj⟩L2(h)2.\|f\|_{L_2(h)}^2 =\sum_{j=0}^{\infty} \langle f,\psi_j\rangle_{L_2(h)}^2. Truncating the expansion is an orthogonal projection and gives the best approximation within the span of the retained basis functions. This is the function-space counterpart of least squares and truncated SVD.

Fourier basis.

On \(I=[-\pi,\pi]\)I=[−π,π]I=[-\pi,\pi] with \(h(x)=1/(2\pi)\)h(x)=1/(2π)h(x)=1/(2\pi), the functions \[1,\qquad \{\sqrt2\cos(kx)\}_{k\geq 1},\qquad \{\sqrt2\sin(kx)\}_{k\geq 1}\]1,{2cos(kx)}k≥1,{2sin(kx)}k≥11,\qquad \{\sqrt2\cos(kx)\}_{k\geq 1},\qquad \{\sqrt2\sin(kx)\}_{k\geq 1} form an orthonormal basis of \(L_2(h)\)L2(h)L_2(h).

Hermite basis.

For the standard Gaussian density \(h=\phi\)h=ϕh=\phi, the normalized probabilists’ Hermite polynomials begin with \[H_0(x)=1,\quad H_1(x)=x,\quad H_2(x)=\frac{x^2-1}{\sqrt2},\quad H_3(x)=\frac{x^3-3x}{\sqrt6}.\]H0(x)=1,H1(x)=x,H2(x)=x2−12,H3(x)=x3−3x6.H_0(x)=1,\quad H_1(x)=x,\quad H_2(x)=\frac{x^2-1}{\sqrt2},\quad H_3(x)=\frac{x^3-3x}{\sqrt6}. They form an orthonormal basis of \(L_2(\phi)\)L2(ϕ)L_2(\phi). If \(G\sim N(0,1)\)G∼N(0,1)G\sim N(0,1) and \(f(G)\)f(G)f(G) is square integrable, then \[f(G)=\sum_{j=0}^{\infty}\E[f(G)H_j(G)]H_j(G)\]f(G)=∑j=0∞𝔼[f(G)Hj(G)]Hj(G)f(G)=\sum_{j=0}^{\infty}\mathbb{E}[f(G)H_j(G)]H_j(G) in mean square. This decomposes \(f\)ff into components of increasing polynomial degree and is useful in Gaussian approximation and the analysis of nonlinear statistics.

Low priority — not examined: Proof sketches for selected results

The Gaussian integral.

Let \(I=\int_{-\infty}^{\infty}e^{-x^2/2}\,dx\)I=∫−∞∞e−x2/2dxI=\int_{-\infty}^{\infty}e^{-x^2/2}\,dx. By Tonelli’s theorem (introduced later) and polar coordinates, \[\begin{split} I^2 &=\int_{\R^2}e^{-(x^2+y^2)/2}\,dx\,dy\\ &=\int_0^{2\pi}\int_0^\infty e^{-r^2/2}r\,dr\,d\theta =2\pi. \end{split}\]I2=∫ℝ2e−(x2+y2)/2dxdy=∫02π∫0∞e−r2/2rdrdθ=2π.\begin{split} I^2 &=\int_{\mathbb{R}^2}e^{-(x^2+y^2)/2}\,dx\,dy\\ &=\int_0^{2\pi}\int_0^\infty e^{-r^2/2}r\,dr\,d\theta =2\pi. \end{split} Hence \(I=\sqrt{2\pi}\)I=2πI=\sqrt{2\pi}.

Weyl’s bound from Rayleigh quotients.

For every unit vector \(x\)xx, \[x^\top A x-\|E\|_{\op} \leq x^\top(A+E)x \leq x^\top A x+\|E\|_{\op}.\]x⊤Ax−∥E∥op≤x⊤(A+E)x≤x⊤Ax+∥E∥op.x^\top A x-\|E\|_{\mathrm{op}} \leq x^\top(A+E)x \leq x^\top A x+\|E\|_{\mathrm{op}}. Applying the Courant–Fischer characterization to these inequalities yields Theorem 4.

Why truncated SVD is optimal.

Let \(B\)BB have rank at most \(r\)rr. Its null space has codimension at most \(r\)rr. The span of the first \(r+1\)r+1r+1 right singular vectors of \(A\)AA must therefore contain a unit vector \(x\)xx with \(Bx=0\)Bx=0Bx=0. Hence \[\|A-B\|_{\op}\geq\|(A-B)x\|_2 =\|Ax\|_2\geq s_{r+1}(A).\]∥A−B∥op≥∥(A−B)x∥2=∥Ax∥2≥sr+1(A).\|A-B\|_{\mathrm{op}}\geq\|(A-B)x\|_2 =\|Ax\|_2\geq s_{r+1}(A). The truncated SVD attains this lower bound. A related orthogonality argument gives the Frobenius-norm formula.

Further reading: Historical notes, references, and self-study resources

Stirling’s approximation dates to the early eighteenth century, with the form developed by de Moivre and the constant \(\sqrt{2\pi}\)2π\sqrt{2\pi} identified by Stirling; see the MacTutor historical account. The normal approximation to the binomial distribution is correspondingly known as the de Moivre–Laplace theorem. Least squares was developed around the turn of the nineteenth century by Legendre and Gauss. The geometric method now called principal component analysis traces to Pearson and was later developed systematically by Hotelling.

For analysis and function spaces, see Rudin [2, 3]. Tao’s text [4] reviews probability and linear algebra in preparation for random matrix theory. Vershynin [5] and Wainwright [6] connect Gaussian tails, matrix norms, and convexity to modern high-dimensional statistics. Boyd and Vandenberghe [1] is a standard reference for convex optimization.

Useful online supplements include:

Key ideas

  • Compactness and continuity help establish existence; they do not imply uniqueness.

  • Gaussian affine transformations and tail bounds are reusable probability tools.

  • Quadratic forms, eigenvalues and singular values connect linear algebra to statistical variation.

  • Norm inequalities and convexity organize estimation and optimization arguments.

Looking ahead

Lecture 2 uses sets and countability to define measurable events and probability measures. This gives the Gaussian and empirical examples a common probability language. Continue to Lecture 2.

Exercises and complete solutions9 exercises · complete solutions
Mid prioritySupporting practice: topology and optimizer existence
Exercise 1Topology and existence#

Let \(S=(0,1]\cup\{2\}\subset\R\)S=(0,1]∪{2}⊂ℝS=(0,1]\cup\{2\}\subset\mathbb{R}.

  1. Find \(\overline S\)S¯\overline S, \(S^\circ\)S∘S^\circ, and \(\partial S\)∂S\partial S.

  2. Give a continuous function on the bounded open set \((0,1)\)(0,1)(0,1) whose infimum is not attained.

  3. Give a continuous function on the closed but unbounded set \([0,\infty)\)[0,∞)[0,\infty) whose infimum is not attained.

Reveal solution

  1. Every neighborhood of \(0\)00 intersects \(S\)SS, so \(0\)00 is added by closure. The point \(2\)22 is already in \(S\)SS and is isolated. Thus \[\overline S=[0,1]\cup\{2\},\qquad S^\circ=(0,1),\qquad \partial S=\{0,1,2\}.\]S¯=[0,1]∪{2},S∘=(0,1),∂S={0,1,2}.\overline S=[0,1]\cup\{2\},\qquad S^\circ=(0,1),\qquad \partial S=\{0,1,2\}.

  2. Take \(f(x)=x\)f(x)=xf(x)=x on \((0,1)\)(0,1)(0,1). It is continuous and \(\inf_{x\in(0,1)}f(x)=0\)infx∈(0,1)f(x)=0\inf_{x\in(0,1)}f(x)=0, but no point of the domain has value \(0\)00.

  3. Take \(f(x)=e^{-x}\)f(x)=e−xf(x)=e^{-x} on \([0,\infty)\)[0,∞)[0,\infty). It is continuous and has infimum \(0\)00, approached as \(x\to\infty\)x→∞x\to\infty, but \(e^{-x}>0\)e−x>0e^{-x}>0 for every finite \(x\)xx. These examples show why both closedness and boundedness appear in the Heine–Borel theorem.

High priorityCore practice: asymptotic notation
Exercise 2Asymptotic notation#

Suppose all comparison sequences below are eventually positive.

  1. Show that \(\log n=o(n^\alpha)\)logn=o(nα)\log n=o(n^\alpha) for every fixed \(\alpha>0\)α>0\alpha>0.

  2. If \(a_n=O(b_n)\)an=O(bn)a_n=O(b_n) and \(c_n=o(d_n)\)cn=o(dn)c_n=o(d_n), prove that \(a_nc_n=o(b_nd_n)\)ancn=o(bndn)a_nc_n=o(b_nd_n).

  3. Give an example in which \(a_n=O(b_n)\)an=O(bn)a_n=O(b_n) but \(a_n/b_n\)an/bna_n/b_n does not converge.

  4. For \(a_n(t)=t/n\)an(t)=t/na_n(t)=t/n, explain the difference between \(a_n(t)=O(n^{-1})\)an(t)=O(n−1)a_n(t)=O(n^{-1}) for every fixed \(t\in\R\)t∈ℝt\in\mathbb{R} and a uniform \(O(n^{-1})\)O(n−1)O(n^{-1}) statement over all \(t\in\R\)t∈ℝt\in\mathbb{R}.

Reveal solution

  1. Treating \(n\)nn as a continuous variable, repeated use of l’Hôpital’s rule is unnecessary: \[\lim_{x\to\infty}\frac{\log x}{x^\alpha} =\lim_{x\to\infty}\frac{1/x}{\alpha x^{\alpha-1}} =\lim_{x\to\infty}\frac{1}{\alpha x^\alpha}=0.\]limx→∞logxxα=limx→∞1/xαxα−1=limx→∞1αxα=0.\lim_{x\to\infty}\frac{\log x}{x^\alpha} =\lim_{x\to\infty}\frac{1/x}{\alpha x^{\alpha-1}} =\lim_{x\to\infty}\frac{1}{\alpha x^\alpha}=0. Restricting \(x\)xx to the integers gives the result.

  2. There are \(C<\infty\)C<∞C<\infty and \(N_1\)N1N_1 such that \(|a_n|/b_n\leq C\)|an|/bn≤C|a_n|/b_n\leq C for \(n\geq N_1\)n≥N1n\geq N_1. Also, \(|c_n|/d_n\to 0\)|cn|/dn→0|c_n|/d_n\to 0. Therefore, \[\frac{|a_nc_n|}{b_nd_n} =\frac{|a_n|}{b_n}\frac{|c_n|}{d_n} \leq C\frac{|c_n|}{d_n}\longrightarrow 0.\]|ancn|bndn=|an|bn|cn|dn≤C|cn|dn→0.\frac{|a_nc_n|}{b_nd_n} =\frac{|a_n|}{b_n}\frac{|c_n|}{d_n} \leq C\frac{|c_n|}{d_n}\longrightarrow 0.

  3. Let \(a_n=(-1)^n\)an=(−1)na_n=(-1)^n and \(b_n=1\)bn=1b_n=1. Then \(|a_n|\leq b_n\)|an|≤bn|a_n|\leq b_n, but \(a_n/b_n=(-1)^n\)an/bn=(−1)na_n/b_n=(-1)^n has no limit.

  4. For each fixed \(t\)tt, \(|a_n(t)|\leq |t|n^{-1}\)|an(t)|≤|t|n−1|a_n(t)|\leq |t|n^{-1}, so the hidden constant may be \(|t|\)|t||t|. Uniformly over all \(t\in\R\)t∈ℝt\in\mathbb{R}, \[\sup_{t\in\R}|a_n(t)|=\infty,\]supt∈ℝ|an(t)|=∞,\sup_{t\in\mathbb{R}}|a_n(t)|=\infty, so no finite constant works. Uniformity would hold on a bounded set such as \(|t|\leq M\)|t|≤M|t|\leq M, with constant \(M\)MM.

High priorityCore practice: Gaussian tails and a union bound
Exercise 3Gaussian maxima#

Let \(G_1,\ldots,G_d\)G1,…,GdG_1,\ldots,G_d be standard normal random variables, not necessarily independent.

  1. Use the Gaussian moment-generating function to prove \(\PR(G_1\geq t)\leq e^{-t^2/2}\)ℙ(G1≥t)≤e−t2/2\mathbb{P}(G_1\geq t)\leq e^{-t^2/2} for \(t\geq 0\)t≥0t\geq 0.

  2. Show that, for \(\delta\in(0,1)\)δ∈(0,1)\delta\in(0,1), \[\PR\left( \max_{1\leq j\leq d}|G_j| >\sqrt{2\log(2d/\delta)} \right)\leq\delta.\]ℙ(max1≤j≤d|Gj|>2log(2d/δ))≤δ.\mathbb{P}\left( \max_{1\leq j\leq d}|G_j| >\sqrt{2\log(2d/\delta)} \right)\leq\delta. Identify exactly where independence would have been used, if it were needed.

Reveal solution

Markov’s inequality (Lecture 4) gives \(\PR(Y\geq a)\leq\E Y/a\)ℙ(Y≥a)≤𝔼Y/a\mathbb{P}(Y\geq a)\leq\mathbb{E}Y/a for \(Y\geq0\)Y≥0Y\geq0 and \(a>0\)a>0a>0. Completing the square in the normal density yields \[\E e^{\lambda G_1} =e^{\lambda^2/2}\int_{\R}\phi(x-\lambda)\,dx =e^{\lambda^2/2}.\]𝔼eλG1=eλ2/2∫ℝϕ(x−λ)dx=eλ2/2.\mathbb{E}e^{\lambda G_1} =e^{\lambda^2/2}\int_{\mathbb{R}}\phi(x-\lambda)\,dx =e^{\lambda^2/2}.

  1. For any \(\lambda>0\)λ>0\lambda>0, Markov’s inequality and \(\E e^{\lambda G_1}=e^{\lambda^2/2}\)𝔼eλG1=eλ2/2\mathbb{E}e^{\lambda G_1}=e^{\lambda^2/2} give \[\PR(G_1\geq t) =\PR(e^{\lambda G_1}\geq e^{\lambda t}) \leq e^{-\lambda t+\lambda^2/2}.\]ℙ(G1≥t)=ℙ(eλG1≥eλt)≤e−λt+λ2/2.\mathbb{P}(G_1\geq t) =\mathbb{P}(e^{\lambda G_1}\geq e^{\lambda t}) \leq e^{-\lambda t+\lambda^2/2}. For \(t>0\)t>0t>0, the exponent is minimized at \(\lambda=t>0\)λ=t>0\lambda=t>0, yielding \(e^{-t^2/2}\)e−t2/2e^{-t^2/2}. At \(t=0\)t=0t=0, use the trivial one-sided bound \(\PR(G_1\geq0)\leq1=e^0\)ℙ(G1≥0)≤1=e0\mathbb{P}(G_1\geq0)\leq1=e^0 separately. By symmetry, \(\PR(|G_1|\geq t)\leq 2e^{-t^2/2}\)ℙ(|G1|≥t)≤2e−t2/2\mathbb{P}(|G_1|\geq t)\leq 2e^{-t^2/2}.

  2. The union bound gives \[\PR\left(\max_j|G_j|>t\right) \leq\sum_{j=1}^d\PR(|G_j|>t) \leq 2d e^{-t^2/2}.\]ℙ(maxj|Gj|>t)≤∑j=1dℙ(|Gj|>t)≤2de−t2/2.\mathbb{P}\left(\max_j|G_j|>t\right) \leq\sum_{j=1}^d\mathbb{P}(|G_j|>t) \leq 2d e^{-t^2/2}. Substituting \(t=\sqrt{2\log(2d/\delta)}\)t=2log(2d/δ)t=\sqrt{2\log(2d/\delta)} makes the right-hand side equal to \(\delta\)δ\delta. Independence was not used: the union bound is valid for arbitrarily dependent events.

Mid prioritySupporting practice: Stirling’s approximation
Exercise 4Stirling’s formula and the central binomial coefficient#

For even \(n\)nn, use Stirling’s formula to show \[\binom{n}{n/2} \sim 2^n\sqrt{\frac{2}{\pi n}}.\](nn/2)∼2n2πn.\binom{n}{n/2} \sim 2^n\sqrt{\frac{2}{\pi n}}.

Reveal solution

Applying Stirling’s formula to \(n!\)n!n! and \((n/2)!\)(n/2)!(n/2)! gives \[n!\sim\sqrt{2\pi n}\left(\frac ne\right)^n, \qquad \left\{\left(\frac n2\right)!\right\}^2 \sim \pi n\left(\frac{n}{2e}\right)^n.\]n!∼2πn(ne)n,{(n2)!}2∼πn(n2e)n.n!\sim\sqrt{2\pi n}\left(\frac ne\right)^n, \qquad \left\{\left(\frac n2\right)!\right\}^2 \sim \pi n\left(\frac{n}{2e}\right)^n. Therefore, \[\binom{n}{n/2} =\frac{n!}{\{(n/2)!\}^2} \sim \frac{\sqrt{2\pi n}}{\pi n}\,2^n =2^n\sqrt{\frac{2}{\pi n}}.\](nn/2)=n!{(n/2)!}2∼2πnπn2n=2n2πn.\binom{n}{n/2} =\frac{n!}{\{(n/2)!\}^2} \sim \frac{\sqrt{2\pi n}}{\pi n}\,2^n =2^n\sqrt{\frac{2}{\pi n}}.

Low priority — not examined: Optional practice: entropy approximation
Exercise 5Entropy approximation for binomial coefficients#

Let \(m=m_n\in\{1,\ldots,n-1\}\)m=mn∈{1,…,n−1}m=m_n\in\{1,\ldots,n-1\} and \(p_n=m/n\)pn=m/np_n=m/n. Assume that \(p_n\)pnp_n remains in a fixed compact subinterval of \((0,1)\)(0,1)(0,1).

  1. Use Stirling’s formula to show \[\log\binom{n}{m} =n h(p_n)-\frac12\log\{2\pi n p_n(1-p_n)\}+o(1).\]log(nm)=nh(pn)−12log{2πnpn(1−pn)}+o(1).\log\binom{n}{m} =n h(p_n)-\frac12\log\{2\pi n p_n(1-p_n)\}+o(1).

  2. Explain the combinatorial meaning of the leading term \(n h(p_n)\)nh(pn)n h(p_n).

Reveal solution

Stirling’s logarithmic form gives \[\begin{split} \log\binom{n}{m} &=\log(n!)-\log(m!)-\log((n-m)!)\\ &=n\log n-m\log m-(n-m)\log(n-m)\\ &\quad -\frac12\log\{2\pi n p_n(1-p_n)\}+o(1). \end{split}\]log(nm)=log(n!)−log(m!)−log((n−m)!)=nlogn−mlogm−(n−m)log(n−m)−12log{2πnpn(1−pn)}+o(1).\begin{split} \log\binom{n}{m} &=\log(n!)-\log(m!)-\log((n-m)!)\\ &=n\log n-m\log m-(n-m)\log(n-m)\\ &\quad -\frac12\log\{2\pi n p_n(1-p_n)\}+o(1). \end{split} Because \(m=np_n\)m=npnm=np_n and \(n-m=n(1-p_n)\)n−m=n(1−pn)n-m=n(1-p_n), the first line of leading terms becomes \[-np_n\log p_n-n(1-p_n)\log(1-p_n)=n h(p_n).\]−npnlogpn−n(1−pn)log(1−pn)=nh(pn).-np_n\log p_n-n(1-p_n)\log(1-p_n)=n h(p_n). The uniform separation of \(p_n\)pnp_n from \(0\)00 and \(1\)11 ensures that the Stirling remainders for all three factorials are \(o(1)\)o(1)o(1).

The quantity \(\binom{n}{m}\)(nm)\binom{n}{m} counts binary strings with exactly \(m\)mm ones, or subsets of size \(m\)mm. Thus \(h(p_n)\)h(pn)h(p_n) is the exponential growth rate per coordinate of this collection.

High priorityCore practice: quadratic forms and PCA
Exercise 6Quadratic forms and population PCA#

Let \(X\in\R^d\)X∈ℝdX\in\mathbb{R}^d have mean \(\mu\)μ\mu and covariance \(\Sigma\)Σ\Sigma, and let \(M\in\R^{d\times d}\)M∈ℝd×dM\in\mathbb{R}^{d\times d}.

  1. Derive \(\E[X^\top M X]=\tr(M\Sigma)+\mu^\top M\mu\)𝔼[X⊤MX]=tr(MΣ)+μ⊤Mμ\mathbb{E}[X^\top M X]=\operatorname{tr}(M\Sigma)+\mu^\top M\mu.

  2. Suppose \(\mu=0\)μ=0\mu=0. For a unit vector \(v\)vv, interpret \(\E[(v^\top X)^2]\)𝔼[(v⊤X)2]\mathbb{E}[(v^\top X)^2] and show that it is maximized by a leading eigenvector of \(\Sigma\)Σ\Sigma.

Reveal solution

Using the cyclic property of trace, \[X^\top M X=\tr(X^\top M X)=\tr(MXX^\top).\]X⊤MX=tr(X⊤MX)=tr(MXX⊤).X^\top M X=\operatorname{tr}(X^\top M X)=\operatorname{tr}(MXX^\top). Taking expectations, \[\E[X^\top M X] =\tr\{M\E(XX^\top)\} =\tr\{M(\Sigma+\mu\mu^\top)\} =\tr(M\Sigma)+\mu^\top M\mu.\]𝔼[X⊤MX]=tr{M𝔼(XX⊤)}=tr{M(Σ+μμ⊤)}=tr(MΣ)+μ⊤Mμ.\mathbb{E}[X^\top M X] =\operatorname{tr}\{M\mathbb{E}(XX^\top)\} =\operatorname{tr}\{M(\Sigma+\mu\mu^\top)\} =\operatorname{tr}(M\Sigma)+\mu^\top M\mu. If \(\mu=0\)μ=0\mu=0, then \[\E[(v^\top X)^2]=\var(v^\top X)=v^\top\Sigma v.\]𝔼[(v⊤X)2]=Var(v⊤X)=v⊤Σv.\mathbb{E}[(v^\top X)^2]=\operatorname{Var}(v^\top X)=v^\top\Sigma v. The Rayleigh-quotient characterization gives \[\max_{\|v\|_2=1}v^\top\Sigma v=\lambda_{\max}(\Sigma),\]max∥v∥2=1v⊤Σv=λmax(Σ),\max_{\|v\|_2=1}v^\top\Sigma v=\lambda_{\max}(\Sigma), and the maximizers are unit vectors in the leading eigenspace. This is population PCA: choose the direction with largest projected variance.

Mid prioritySupporting practice: norm inequalities and duality
Exercise 7Norm duality#

Let \(1<p<\infty\)1<p<∞1<p<\infty and let \(q=p/(p-1)\)q=p/(p−1)q=p/(p-1).

  1. Prove \[\|x\|_p=\max_{\|y\|_q\leq 1}\langle x,y\rangle\]∥x∥p=max∥y∥q≤1⟨x,y⟩\|x\|_p=\max_{\|y\|_q\leq 1}\langle x,y\rangle and exhibit a maximizing \(y\)yy when \(x\neq 0\)x≠0x\neq 0.

  2. State maximizing choices for the endpoint pairs \((p,q)=(1,\infty)\)(p,q)=(1,∞)(p,q)=(1,\infty) and \((p,q)=(\infty,1)\)(p,q)=(∞,1)(p,q)=(\infty,1).

  3. Use Cauchy–Schwarz to derive \(\|x\|_1\leq\sqrt d\,\|x\|_2\)∥x∥1≤d∥x∥2\|x\|_1\leq\sqrt d\,\|x\|_2 and \(\|x\|_2\leq\sqrt d\,\|x\|_\infty\)∥x∥2≤d∥x∥∞\|x\|_2\leq\sqrt d\,\|x\|_\infty.

Reveal solution

Hölder’s inequality gives \(|\langle x,y\rangle|\leq\|x\|_p\|y\|_q\leq\|x\|_p\)|⟨x,y⟩|≤∥x∥p∥y∥q≤∥x∥p|\langle x,y\rangle|\leq\|x\|_p\|y\|_q\leq\|x\|_p, so it remains to attain the upper bound. For \(x\neq 0\)x≠0x\neq 0, define \[y_j=\frac{\sign(x_j)|x_j|^{p-1}}{\|x\|_p^{p-1}}.\]yj=sign(xj)|xj|p−1∥x∥pp−1.y_j=\frac{\operatorname{sign}(x_j)|x_j|^{p-1}}{\|x\|_p^{p-1}}. Because \((p-1)q=p\)(p−1)q=p(p-1)q=p, \[\|y\|_q^q =\frac{\sum_j|x_j|^p}{\|x\|_p^p}=1, \qquad \langle x,y\rangle =\frac{\sum_j|x_j|^p}{\|x\|_p^{p-1}} =\|x\|_p.\]∥y∥qq=∑j|xj|p∥x∥pp=1,⟨x,y⟩=∑j|xj|p∥x∥pp−1=∥x∥p.\|y\|_q^q =\frac{\sum_j|x_j|^p}{\|x\|_p^p}=1, \qquad \langle x,y\rangle =\frac{\sum_j|x_j|^p}{\|x\|_p^{p-1}} =\|x\|_p. For \(p=1\)p=1p=1, take \(y_j=\sign(x_j)\)yj=sign(xj)y_j=\operatorname{sign}(x_j), which has \(\|y\|_\infty\leq 1\)∥y∥∞≤1\|y\|_\infty\leq 1. For \(p=\infty\)p=∞p=\infty, choose an index \(j^\star\)j⋆j^\star with \(|x_{j^\star}|=\|x\|_\infty\)|xj⋆|=∥x∥∞|x_{j^\star}|=\|x\|_\infty and take \(y=\sign(x_{j^\star})e_{j^\star}\)y=sign(xj⋆)ej⋆y=\operatorname{sign}(x_{j^\star})e_{j^\star}.

Finally, \[\|x\|_1=\langle |x|,\mathbf 1\rangle \leq\|x\|_2\|\mathbf 1\|_2 =\sqrt d\,\|x\|_2,\]∥x∥1=⟨|x|,1⟩≤∥x∥2∥1∥2=d∥x∥2,\|x\|_1=\langle |x|,\mathbf 1\rangle \leq\|x\|_2\|\mathbf 1\|_2 =\sqrt d\,\|x\|_2, and \[\|x\|_2^2=\sum_{j=1}^d x_j^2 \leq d\|x\|_\infty^2.\]∥x∥22=∑j=1dxj2≤d∥x∥∞2.\|x\|_2^2=\sum_{j=1}^d x_j^2 \leq d\|x\|_\infty^2.

Mid prioritySupporting practice: spectral perturbation
Exercise 8Spectral perturbation#

Let \(A\)AA and \(\widehat A=A+E\)Â=A+E\widehat A=A+E be symmetric \(d\times d\)d×dd\times d matrices with \(\|E\|_{\op}\leq\epsilon\)∥E∥op≤ϵ\|E\|_{\mathrm{op}}\leq\epsilon. Let \(\widehat v_1\)v̂1\widehat v_1 be a unit leading eigenvector of \(\widehat A\)Â\widehat A.

  1. Bound \(|\lambda_k(\widehat A)-\lambda_k(A)|\)|λk(Â)−λk(A)||\lambda_k(\widehat A)-\lambda_k(A)| for every \(k\)kk.

  2. Show that \[\widehat v_1^\top A\widehat v_1 \geq\lambda_1(A)-2\epsilon.\]v̂1⊤Av̂1≥λ1(A)−2ϵ.\widehat v_1^\top A\widehat v_1 \geq\lambda_1(A)-2\epsilon. Interpret the result when \(A\)AA is a population covariance and \(\widehat A\)Â\widehat A is a sample covariance.

Reveal solution

Weyl’s bound immediately gives \[|\lambda_k(\widehat A)-\lambda_k(A)|\leq\epsilon \quad\text{for every }k.\]|λk(Â)−λk(A)|≤ϵfor every k.|\lambda_k(\widehat A)-\lambda_k(A)|\leq\epsilon \quad\text{for every }k. For the second claim, compare the Rayleigh value at the same unit vector under \(A\)AA and \(\widehat A\)Â\widehat A, then compare their leading eigenvalues. Identify the reason for each transition; the complete argument follows.

1. Substitute the perturbation. \[\widehat v_1^\top A\widehat v_1 =\widehat v_1^\top\widehat A\widehat v_1 -\widehat v_1^\top E\widehat v_1.\]v̂1⊤Av̂1=v̂1⊤Âv̂1−v̂1⊤Ev̂1.\widehat v_1^\top A\widehat v_1 =\widehat v_1^\top\widehat A\widehat v_1 -\widehat v_1^\top E\widehat v_1. Use \(A=\widehat A-E\)A=Â−EA=\widehat A-E; the vector is held fixed in both terms.

2. Use the eigenvector identity and norm bound. \[\widehat v_1^\top A\widehat v_1 \geq\lambda_1(\widehat A)-\epsilon.\]v̂1⊤Av̂1≥λ1(Â)−ϵ.\widehat v_1^\top A\widehat v_1 \geq\lambda_1(\widehat A)-\epsilon. Since \(\widehat A\widehat v_1=\lambda_1(\widehat A)\widehat v_1\)Âv̂1=λ1(Â)v̂1\widehat A\widehat v_1=\lambda_1(\widehat A)\widehat v_1 and \(\|\widehat v_1\|_2=1\)∥v̂1∥2=1\|\widehat v_1\|_2=1, its Rayleigh value is \(\lambda_1(\widehat A)\)λ1(Â)\lambda_1(\widehat A). Cauchy–Schwarz and the definition of operator norm give \(|\widehat v_1^\top E\widehat v_1| \leq\|\widehat v_1\|_2\|E\widehat v_1\|_2 \leq\|E\|_{\op}\leq\epsilon\)|v̂1⊤Ev̂1|≤∥v̂1∥2∥Ev̂1∥2≤∥E∥op≤ϵ|\widehat v_1^\top E\widehat v_1| \leq\|\widehat v_1\|_2\|E\widehat v_1\|_2 \leq\|E\|_{\mathrm{op}}\leq\epsilon.

3. Apply Weyl to the leading eigenvalue. \[\widehat v_1^\top A\widehat v_1 \geq\lambda_1(\widehat A)-\epsilon \geq\lambda_1(A)-2\epsilon.\]v̂1⊤Av̂1≥λ1(Â)−ϵ≥λ1(A)−2ϵ.\widehat v_1^\top A\widehat v_1 \geq\lambda_1(\widehat A)-\epsilon \geq\lambda_1(A)-2\epsilon. Theorem 4 gives \(\lambda_1(\widehat A)\geq\lambda_1(A)-\epsilon\)λ1(Â)≥λ1(A)−ϵ\lambda_1(\widehat A)\geq\lambda_1(A)-\epsilon. This uses the mid-priority theorem statement, not its optional Courant–Fischer proof. Thus, operator-norm accuracy of the sample covariance implies eigenvalue accuracy and guarantees that the empirical leading direction captures population variance within \(2\epsilon\)2ϵ2\epsilon of the optimum. Controlling the angle between the eigenvectors requires an additional eigengap condition and a result such as the Davis–Kahan theorem (an extension, not needed here).

Mid prioritySupporting practice: soft thresholding
Exercise 9One-dimensional LASSO#

For \(y\in\R\)y∈ℝy\in\mathbb{R} and \(\lambda>0\)λ>0\lambda>0, find the unique minimizer of \[f(\beta)=(y-\beta)^2+\lambda|\beta|.\]f(β)=(y−β)2+λ|β|.f(\beta)=(y-\beta)^2+\lambda|\beta|. You may use the subgradient optimality condition, or work separately on \(\beta<0\)β<0\beta<0, \(\beta=0\)β=0\beta=0, and \(\beta>0\)β>0\beta>0. Explain why the solution can be exactly zero.

Reveal solution

One can solve the problem without subgradients. On \(\beta>0\)β>0\beta>0, differentiation gives \(2(\beta-y)+\lambda=0\)2(β−y)+λ=02(\beta-y)+\lambda=0, so \(\beta=y-\lambda/2\)β=y−λ/2\beta=y-\lambda/2, which is positive exactly when \(y>\lambda/2\)y>λ/2y>\lambda/2. If \(\beta<0\)β<0\beta<0, differentiation gives \(2(\beta-y)-\lambda=0\)2(β−y)−λ=02(\beta-y)-\lambda=0, so \(\beta=y+\lambda/2\)β=y+λ/2\beta=y+\lambda/2, which is negative exactly when \(y<-\lambda/2\)y<−λ/2y<-\lambda/2. At \(\beta=0\)β=0\beta=0, the left and right derivatives are \(-2y-\lambda\)−2y−λ-2y-\lambda and \(-2y+\lambda\)−2y+λ-2y+\lambda, respectively. They straddle zero exactly when \(|y|\leq\lambda/2\)|y|≤λ/2|y|\leq\lambda/2. Combining the three cases, \[\widehat\beta =\sign(y)\left(|y|-\frac{\lambda}{2}\right)_+.\]β̂=sign(y)(|y|−λ2)+.\widehat\beta =\operatorname{sign}(y)\left(|y|-\frac{\lambda}{2}\right)_+.

Optional alternate route (subgradients; not examined). The condition \[0\in 2(\beta-y)+\lambda\,\partial|\beta|\]0∈2(β−y)+λ∂|β|0\in 2(\beta-y)+\lambda\,\partial|\beta| produces the same three cases; at \(\beta=0\)β=0\beta=0, it becomes \(0\in-2y+\lambda[-1,1]\)0∈−2y+λ[−1,1]0\in-2y+\lambda[-1,1]. This is equivalent to \(|y|\leq\lambda/2\)|y|≤λ/2|y|\leq\lambda/2.

This is the soft-thresholding rule. The one-sided derivatives straddle zero for a whole interval of data values, \(|y|\leq\lambda/2\)|y|≤λ/2|y|\leq\lambda/2, giving the exact optimizer \(\widehat\beta=0\)β̂=0\widehat\beta=0. The squared term is strictly convex, so the minimizer is unique.

References

[1]
S. Boyd and L. Vandenberghe. Convex optimization. Cambridge university press. 2004.
[2]
W. Rudin. Principles of mathematical analysis. McGraw-Hill, New York. 1976.
[3]
W. Rudin. Real and complex analysis. McGraw-Hill Education. 1987.
[4]
T. Tao. Topics in random matrix theory. American Mathematical Soc. 2012.
[5]
R. Vershynin. High-dimensional probability: An introduction with applications in data science. Cambridge university press. 2018.
[6]
M. J. Wainwright. High-dimensional statistics: A non-asymptotic viewpoint. Cambridge university press. 2019.
What changed

October 19, 2026: Corrected notation, wording and cross-references after the course-wide errata review; refreshed the linked HTML and PDF editions.

October 14, 2026. Added issue-reporting links to the webpage and PDF. The mathematics and priority assignments are unchanged in this update.

Comments

Discuss an idea or ask a public question. Include a section or exercise number when relevant. For errors in the notes or website, Report an issue.

Public comments use Disqus. Enable JavaScript to load them.

Email the instructor for a private question or if comments are unavailable.