Study Notes

Probability Foundations

The arc of this guide: events → random variables → expectation → tail control → limit theorems → the normal sampling family. Each layer compresses the previous one: a distribution compresses an experiment, the exponential family compresses the zoo to one schema, moments compress a distribution, and the limit theorems say that after enough averaging only two moments survive. The endpoint is the t-statistic — the first object where every piece of the chapter is load-bearing at once.

1. Probability spaces and conditioning

Three axioms generate everything: P(Ω)=1P(\Omega) = 1; P(A)0P(A) \geq 0; additivity over disjoint events. Inclusion–exclusion repairs additivity for overlapping events: P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B) — the intersection got counted twice.

Conditioning is restriction + renormalization. P(AB)=P(AB)P(B)P(A \mid B) = \frac{P(A \cap B)}{P(B)}: shrink the sample space to BB, rescale so it has mass 1. Everything downstream is this one move applied repeatedly:

  • Multiplication law: P(AB)=P(AB)P(B)P(A \cap B) = P(A \mid B)P(B) — build joint events sequentially.
  • Law of total probability: for a partition {Bi}\{B_i\}, P(A)=iP(ABi)P(Bi)P(A) = \sum_i P(A \mid B_i)P(B_i) — answer within each scenario, then average over scenarios, weighted by how likely each was.
  • Bayes is the multiplication law read in both directions. Write the joint event both ways, then solve:

P(ABj)=P(ABj)P(Bj)=P(BjA)P(A)P(A \cap B_j) = P(A \mid B_j)P(B_j) = P(B_j \mid A)P(A)

  P(BjA)=P(ABj)P(Bj)P(A)=P(ABj)P(Bj)iP(ABi)P(Bi)\Rightarrow\; P(B_j \mid A) = \frac{P(A \mid B_j)P(B_j)}{P(A)} = \frac{P(A \mid B_j)P(B_j)}{\sum_i P(A \mid B_i)P(B_i)}

with total probability expanding the denominator.

Implications — what falls out:

  • Bayes in slogan form: posterior ∝ likelihood × prior — the denominator is just normalization. This one proportionality is the entire Bayesian track (STATS371) in miniature.
  • Total probability is the universal de-conditioning move: whenever a quantity is easy given something, condition on it, then average it back out. The expectation version (tower, §5) and the variance version (decomposition, §5) are the same move at higher moments.

Independence is factorization: P(AB)=P(A)P(B)P(A \cap B) = P(A)P(B) — conditioning on BB teaches you nothing about AA. Mutual independence (every subset factors) implies pairwise but not conversely; the standing counterexample is XOR — two fair bits and their parity are pairwise independent but not mutually.

Counting is the combinatorial backbone of the discrete zoo. Every “choose kk from nn” sorts along two axes — does order matter? and is replacement allowed? — giving one 2×22\times2 table to hold:

Without replacementWith replacement
Ordered (sequences)n!(nk)!\dfrac{n!}{(n-k)!} — permutationsnkn^k
Unordered (sets)(nk)\dbinom{n}{k} — combinations(n+k1k)\dbinom{n+k-1}{k} — stars & bars
  • The cells are linked by de-ordering: (nk)=1k!n!(nk)!\binom{n}{k} = \frac{1}{k!}\cdot\frac{n!}{(n-k)!} — count the ordered arrangements, then divide by the k!k! orderings of each set you don’t want to distinguish. (Stars & bars is the same de-ordering applied to nkn^k, but with repeats the division isn’t clean — you count multisets directly: kk stars into nn bins separated by n1n-1 bars.)
  • Multinomial coefficient (nn1nr)=n!n1!nr!\binom{n}{n_1\cdots n_r} = \frac{n!}{n_1!\cdots n_r!} generalizes combinations (r=2r=2): ways to deal nn labeled objects into rr labeled groups of fixed sizes nin_i. The binomial theorem (a+b)n=k(nk)akbnk(a+b)^n = \sum_k\binom{n}{k}a^kb^{n-k} is the r=2r=2 bookkeeping — (nk)\binom{n}{k} counts which kk of the nn factors contribute an aa.
  • Anchor — choose 2 from {A,B,C}\{A,B,C\}: ordered/no-replace =32=6= 3{\cdot}2 = 6 (AB, BA, AC, CA, BC, CB); unordered/no-replace =(32)=3= \binom{3}{2} = 3 ({AB},{AC},{BC}\{AB\},\{AC\},\{BC\}); ordered/with =32=9= 3^2 = 9; unordered/with =(42)=6= \binom{4}{2} = 6 (the 3 sets plus AA, BB, CC).
  • These factors are the discrete distributions (§2): the (nk)\binom{n}{k} in Binomial counts which trials succeed (unordered, no replacement of positions); the Hypergeometric is unordered-without-replacement of items; sampling models each pick a cell of this table.

Core competency set

  • Conditioning = restrict and renormalize; derive Bayes from the joint-written-both-ways in two lines.
  • Partition an awkward event and apply total probability without prompting; recognize tower/variance-decomposition as the same move.
  • State why pairwise independence ≠ mutual independence.
  • Reproduce the counting 2×22\times2 (ordered/unordered × with/without replacement) and the de-ordering link (nk)=1k!n!(nk)!\binom{n}{k} = \frac{1}{k!}\frac{n!}{(n-k)!}.

2. Random variables and the distribution zoo

What a distribution actually is. Build the object before the catalog:

  • A random variable is a map X:ΩRX: \Omega \to R — a numerical question asked of a random outcome. The randomness lives in Ω\Omega; XX just reads a number off it.
  • The distribution of XX is the probability measure XX induces on the real line: for any set BB, it answers P(XB)=P({ω:X(ω)B})P(X \in B) = P(\{\omega : X(\omega) \in B\}). The original experiment is forgotten; only the landing probabilities survive. That compression is the whole point — statistics never sees Ω\Omega, only the induced measure.
  • The CDF F(x)=P(Xx)F(x) = P(X \leq x) is the universal bookkeeping device: intervals generate every set you care about, so FF pins down the entire measure. It always exists (discrete, continuous, or mixed), is nondecreasing and right-continuous, and runs 0 → 1. Convergence in distribution (§7) is defined through it for exactly this reason.
  • pmf/pdf are the local views of FF: the pmf is the jumps of FF, the pdf its slope (f=Ff = F'). A density is not a probability — f(x)f(x) can exceed 1; only integrals of it are probabilities: f(x)dxf(x)\,dx \approx mass in a tiny interval around xx. (This is also why densities transform with Jacobians in §3 while probabilities never need correction — mass is conserved, height isn’t.)
  • Two RVs with the same distribution are statistically indistinguishable yet can be different functions of ω\omega (for symmetric laws, XX and X-X). Every “iid” hypothesis in the theorems to come asks only for matching distributions — function-level identity never matters.

With the object in hand, the catalog. Hold the zoo as generative stories (“what’s the law of ___?”), not formulas — and keep the two halves apart, because the type tracks the story: discrete laws count (a pmf, mass on {0,1,2,}\{0,1,2,\dots\}), continuous laws measure (a pdf spread over an interval).

Discrete — built from coin flips and arrivals:

DistributionStorypmfEEVar\operatorname{Var}
Bernoulli(pp)one coin flippx(1p)1xp^x(1-p)^{1-x}ppp(1p)p(1-p)
Binomial(n,pn,p)# successes in nn flips =nBern= \sum_n \text{Bern}(nk)pk(1p)nk\binom{n}{k}p^k(1-p)^{n-k}npnpnp(1p)np(1-p)
Geometric(pp)# flips until the 1st successp(1p)k1p(1-p)^{k-1}1/p1/p1pp2\frac{1-p}{p^2}
NegBin(r,pr,p)# flips until the rrth success =rGeo= \sum_r \text{Geo}(k1r1)pr(1p)kr\binom{k-1}{r-1}p^r(1-p)^{k-r}r/pr/pr(1p)p2\frac{r(1-p)}{p^2}
Hypergeom(n,r,mn,r,m)draw mm from a population of nn (rr successes), count successes — without replacement(rk)(nrmk)(nm)\frac{\binom{r}{k}\binom{n-r}{m-k}}{\binom{n}{m}}mrnm\frac{r}{n}mrnnrnnmn1m\frac{r}{n}\frac{n-r}{n}\cdot\frac{n-m}{n-1}
Poisson(λ\lambda)count of rare events; Bin(n,λ/n)\text{Bin}(n, \lambda/n) as nn \to \inftyλkk!eλ\frac{\lambda^k}{k!}e^{-\lambda}λ\lambdaλ\lambda

Continuous — proportions, waits, and the averaging limit:

DistributionSupportStorypdfEEVar\operatorname{Var}
Uniform(a,ba,b)[a,b][a,b]no information beyond the range1ba\frac{1}{b-a}a+b2\frac{a+b}{2}(ba)212\frac{(b-a)^2}{12}
Exponential(λ\lambda)[0,)[0,\infty)continuous waiting time, memorylessλeλx\lambda e^{-\lambda x}1/λ1/\lambda1/λ21/\lambda^2
Gamma(α,λ\alpha,\lambda)[0,)[0,\infty)wait for the α\alphath arrival =αExp= \sum_\alpha \text{Exp}λαΓ(α)tα1eλt\frac{\lambda^\alpha}{\Gamma(\alpha)}t^{\alpha-1}e^{-\lambda t}α/λ\alpha/\lambdaα/λ2\alpha/\lambda^2
Beta(a,ba,b)[0,1][0,1]a random proportion; posterior of pp after a1a{-}1 successes, b1b{-}1 failuresΓ(a+b)Γ(a)Γ(b)ua1(1u)b1\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}u^{a-1}(1-u)^{b-1}aa+b\frac{a}{a+b}ab(a+b)2(a+b+1)\frac{ab}{(a+b)^2(a+b+1)}
Normal(μ,σ2\mu,\sigma^2)RRCLT fixed point — a sum of many small effects12πσe(xμ)22σ2\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}}μ\muσ2\sigma^2
CauchyRRratio of two std normals =t1= t_11π(1+z2)\frac{1}{\pi(1+z^2)}nonenone

The relationship map (draw it from a blank page — the zoo is really one diagram, not twelve facts):

  • Coin-flip chain (count successes): Bern(p) sum n Bin(n,p) n, npλ Pois(λ)\text{Bern}(p) \xrightarrow{\ \text{sum }n\ } \text{Bin}(n,p) \xrightarrow{\ n\to\infty,\ np\to\lambda\ } \text{Pois}(\lambda) — the last arrow is the rare-events limit.
  • Waiting chain (count trials until success — the mirror image): Geo(p) sum r NegBin(r,p)\text{Geo}(p) \xrightarrow{\ \text{sum }r\ } \text{NegBin}(r,p) in discrete time; Exp(λ) sum α Gamma(α,λ)\text{Exp}(\lambda) \xrightarrow{\ \text{sum }\alpha\ } \text{Gamma}(\alpha,\lambda) in continuous time.
  • The Poisson-process hub — where the discrete and continuous halves are the same process. Events at rate λ\lambda: the count in a window tt is Pois(λt)\text{Pois}(\lambda t); the wait to the next event is Exp(λ)\text{Exp}(\lambda); the wait to the α\alphath is Gamma(α,λ)\text{Gamma}(\alpha,\lambda). One randomness, sliced by counting vs. timing (discrete shadow: Binomial counts ↔ Geometric/NegBin waits).
  • Conjugate partners (next subsection): Beta sits behind Binomial’s pp, Gamma behind Poisson/Exponential’s rate — the continuous laws that are the posteriors of the discrete ones.
  • The CLT sink: average anything with finite variance and you flow to the Normal (§7). Cauchy is the one law that escapes — no mean ⟹ no LLN, no CLT; the average of Cauchys is again Cauchy. It is the standing counterexample throughout.

Structural facts the map encodes:

  • Hypergeometric = Binomial without replacement. Same mean mpmp (each draw has marginal success rate p=r/np = r/n), but the variance is binomial’s mp(1p)mp(1-p) times the finite-population correction nmn11\frac{n-m}{n-1} \le 1. Drawing without replacement makes successive draws negatively correlated — pull a success and the rest are slightly likelier to fail — so the count is less variable than the with-replacement Binomial. The FPC is 11 for a single draw (m=1m=1, just a Bernoulli) and 00 once you’ve drawn the whole population (m=nm=n, no randomness left); as nn\to\infty with mm fixed it 1\to 1 and Hypergeometric \to Binomial (replacement stops mattering when the pool is huge).
  • Memoryless pair: Geometric (discrete) and Exponential (continuous) are the only memoryless laws — P(X>s+tX>s)=P(X>t)P(X > s+t \mid X > s) = P(X > t), the wait resets no matter how long you’ve already waited.
  • Sums stay in the family: nBern=Bin\sum_n\text{Bern} = \text{Bin}, rGeo=NegBin\sum_r\text{Geo} = \text{NegBin}, αExp=Gamma\sum_\alpha\text{Exp} = \text{Gamma}, Pois=Pois\sum\text{Pois} = \text{Pois}, Normal=Normal\sum\text{Normal} = \text{Normal} — each a two-line computation once we have the moment generating function E[etX]E[e^{tX}] (§6), which turns “sum of independent” into “product of MGFs.”
  • Numbers to anchor the hub: at rate λ=2\lambda = 2/hour, P(no events in an hour)=e20.135P(\text{no events in an hour}) = e^{-2} \approx 0.135 — the Pois(2)\text{Pois}(2) pmf at 00, and P(Exp(2) wait>1)P(\text{Exp}(2)\text{ wait} > 1). Same number, two slices of one process.

The exponential family — one schema behind the zoo

Most of the table is one distribution wearing different clothes. A family {f(xθ)}\{f(x \mid \theta)\} is an exponential family if it can be written

f(xθ)=h(x)exp(η(θ)T(x)A(η))f(x \mid \theta) = h(x)\,\exp\big(\eta(\theta)\,T(x) - A(\eta)\big)

  • T(x)T(x) — the sufficient statistic: the only feature of the data the parameter ever interacts with.
  • η\eta — the natural parameter: the scale on which the family is exponentially tilted.
  • A(η)A(\eta) — the log-partition function: whatever it takes to normalize. Looks like bookkeeping; turns out to run the show.
  • h(x)h(x) — base measure, carrying the parts that don’t involve θ\theta.

The recipe — how to cast a density into this form (the examples below are just this, run twice):

  1. Write f=exp(logf)f = \exp(\log f) — exponentiate the log-density (the named move: exponentiate-the-log).
  2. Expand logf\log f and sort the terms. Anything of the form (function of θ\theta)×\times(function of xx) is the η(θ)T(x)\eta(\theta)\,T(x) piece; pure-xx terms collect into logh(x)\log h(x); pure-θ\theta terms are A(η)-A(\eta).
  3. Read off TT (the xx-factor multiplying θ\theta), η\eta (its θ\theta-coefficient), hh; then A(η)A(\eta) is whatever normalizes — usually already sitting there as the leftover pure-θ\theta term.
  4. Re-express in η\eta and you’re done. Why bother: once you have (T,η,A)(T,\eta,A), every downstream quantity — moments, the MLE, the sufficient statistic, the conjugate prior — is mechanical, read off AA and its derivatives rather than re-derived per distribution.

See it once and you’ll believe it everywhere — Bernoulli, rewritten by exponentiating its own log:

px(1p)1x=exp(xlogp1p+log(1p))η=logp1p,T(x)=x,A(η)=log(1+eη)p^x(1-p)^{1-x} = \exp\Big(x\log\tfrac{p}{1-p} + \log(1-p)\Big) \qquad \eta = \log\tfrac{p}{1-p},\quad T(x) = x,\quad A(\eta) = \log(1 + e^\eta)

The natural parameter of a coin flip is the log-odds — logistic regression’s logit link isn’t a modeling choice, it’s the family’s native scale. Poisson, same move:

λkeλk!=1k!exp(klogλλ)η=logλ,T(k)=k,A(η)=eη\frac{\lambda^ke^{-\lambda}}{k!} = \frac{1}{k!}\exp\big(k\log\lambda - \lambda\big) \qquad \eta = \log\lambda,\quad T(k) = k,\quad A(\eta) = e^\eta

— Poisson regression’s log link. Normal (known σ2\sigma^2), Exponential, Gamma, Beta, Binomial, Geometric all fit the same schema. Two familiar holdouts do not: the Uniform (its support depends on the parameter, which the form can’t express) and the Cauchy (no fixed-dimension sufficient statistic exists for it — the same pathology behind its missing MGF). The usual suspects, excluded again.

Why the schema earns its place — implications:

  • AA generates the moments. Differentiate the normalization identity h(x)eηT(x)A(η)dx=1\int h(x)\,e^{\eta T(x) - A(\eta)}\,dx = 1 with respect to η\eta:

h(x)eηT(x)A(η)(T(x)A(η))dx=0    E[T(X)]=A(η)\int h(x)\,e^{\eta T(x) - A(\eta)}\big(T(x) - A'(\eta)\big)\,dx = 0 \;\Rightarrow\; E[T(X)] = A'(\eta)

Differentiate again, same move: Var[T(X)]=A(η)\operatorname{Var}[T(X)] = A''(\eta). One function, differentiated, regenerates every E/Var entry in the table — check it on Poisson: A=eηA = e^\eta, so A=A=eη=λA' = A'' = e^\eta = \lambda, both mean and variance. And A=Var0A'' = \operatorname{Var} \geq 0 means AA is convex, so log-likelihoods in η\eta are concave: one MLE, no local optima. (This is no coincidence: AA is the cumulant generating function of the family — AA' the first cumulant, AA'' the second — i.e. the MGF machinery of §6 wearing exp-family clothes.)

  • Sufficiency. For nn iid observations the likelihood is (h(xi))exp(ηiT(xi)nA(η))\big(\prod h(x_i)\big)\exp\big(\eta\sum_iT(x_i) - nA(\eta)\big) — the data enters only through iT(xi)\sum_i T(x_i). Any dataset, any size, compresses to a fixed-dimension summary with zero information loss about θ\theta. (Track 3’s factorization theorem makes this precise; exp families are where it bites hardest.)
  • MLE = moment matching. Set the derivative of the log-likelihood to zero:

ddη(ηiT(xi)nA(η))=0    A(η^)=1niT(xi)\frac{d}{d\eta}\Big(\eta\sum_iT(x_i) - nA(\eta)\Big) = 0 \;\Rightarrow\; A'(\hat\eta) = \frac{1}{n}\sum_iT(x_i)

Choose the parameter whose theoretical mean of TT equals the observed mean. Every textbook MLE you half-remember (p^\hat{p} = sample proportion, λ^\hat\lambda = sample mean) is this one equation instantiated.

  • GLMs and the role of the link. The mean is μ=E[T]=A(η)\mu = E[T] = A'(\eta), so the natural parameter and the mean are tied by η=(A)1(μ)\eta = (A')^{-1}(\mu). Call that map the canonical link gg: g(μ)=ηg(\mu) = \eta. A GLM models the natural parameter as linear in covariates, η=xTβ\eta = x^T\beta, i.e. g(μ)=xTβg(\mu) = x^T\beta — the link is the coordinate in which the parameter is naturally linear, handed to you by AA, not chosen. Read it off each family: Bernoulli η=logp1p\eta = \log\frac{p}{1-p}logit link (logistic regression); Poisson η=logλ\eta = \log\lambdalog link (Poisson regression — the log isn’t a fix for positivity, it’s the count’s native scale); Normal η=μ\eta = \muidentity link (ordinary regression). So linear/logistic/Poisson regression are one algorithm ranging over family members, each at its canonical link.
  • Memorization payoff: don’t memorize a dozen unrelated densities; memorize the schema plus each member’s (T,η)(T, \eta), and rederive moments from AA.

Conjugacy — families closed under Bayesian updating

The mechanism is just posterior ∝ likelihood × prior (§1). If the prior has the same functional shape in θ\theta as the likelihood, the product stays in the prior’s family — only the exponents update. Watch Beta–Binomial do it:

p(θx)    θx(1θ)nxlikelihood  θa1(1θ)b1Beta(a,b) prior  =  θ(a+x)1(1θ)(b+nx)1p(\theta \mid x) \;\propto\; \underbrace{\theta^x(1-\theta)^{n-x}}_{\text{likelihood}}\;\underbrace{\theta^{a-1}(1-\theta)^{b-1}}_{\text{Beta}(a,b)\text{ prior}} \;=\; \theta^{(a+x)-1}(1-\theta)^{(b+n-x)-1}

  θxBeta(a+x,  b+nx)\Rightarrow\; \theta \mid x \sim \text{Beta}(a + x,\; b + n - x)

  • Updating is counting: add the data’s successes and failures straight onto the prior’s two exponents — infinite-dimensional posterior calculus collapses to arithmetic. The prior’s “size” has one weight worth pinning down: its concentration a+ba+b, which is the number of pseudo-observations it carries in the posterior mean. (The table’s ”a1a-1 successes, b1b-1 failures” is the same prior read as data added to a flat Beta(1,1)\text{Beta}(1,1) base — and a+b=(a1)+(b1)+2a+b = (a-1) + (b-1) + 2, the base itself counting for 2; that reading is what makes the posterior mode a success frequency.)
  • Numbers: prior Beta(2,3)\text{Beta}(2,3) — mean 0.40.4, concentration a+b=5a+b = 5. Observe 7 heads in 10 flips → posterior Beta(9,6)\text{Beta}(9,6), mean 915=0.6=5(0.4)+10(0.7)15\frac{9}{15} = 0.6 = \frac{5(0.4) + 10(0.7)}{15}: the prior’s 5 pseudo-flips are outvoted by the data’s 10, proportionally.
  • The standard pairs — all the same mechanism, worth recognizing on sight:
LikelihoodConjugate priorPosterior
Bernoulli / BinomialBeta(a,ba, b)Beta(a+successes, b+failuresa + \text{successes},\ b + \text{failures})
PoissonGamma(α,β\alpha, \beta)Gamma(α+ki, β+n\alpha + \sum k_i,\ \beta + n)
ExponentialGamma(α,β\alpha, \beta)Gamma(α+n, β+xi\alpha + n,\ \beta + \sum x_i)
Normal mean (known σ2\sigma^2)NormalNormal — precision-weighted average of prior mean and xˉ\bar{x}
MultinomialDirichlet(α1,,αK\alpha_1, \ldots, \alpha_K)Dirichlet(αk+nk\alpha_k + n_k)
  • Why conjugates exist at all — the exponential family paying off. The nn-point likelihood is exp(ηT(xi)nA(η))\exp\big(\eta\sum T(x_i) - nA(\eta)\big), so take a prior of the matching shape in η\eta:

π(η)exp(ητνA(η))    π(ηx)exp(η(τ+T(xi))(ν+n)A(η))\pi(\eta) \propto \exp\big(\eta\,\tau - \nu A(\eta)\big) \;\Rightarrow\; \pi(\eta \mid x) \propto \exp\big(\eta(\tau + \textstyle\sum T(x_i)) - (\nu + n)A(\eta)\big)

Same shape, updated bookkeeping: τ\tau absorbs the sufficient statistics, ν\nu counts the observations. Every exponential family has a conjugate prior, built exactly this way. The table above isn’t five coincidences to memorize — it’s one construction instantiated five times, and (τ,ν)(\tau, \nu) are the pseudo-counts.

  • This is the working core of the Bayesian track (7): conjugate updating as pseudo-count arithmetic, with exp-family structure as the reason the bookkeeping stays finite-dimensional forever.

Core competency set

  • State what a distribution is (the induced measure), why the CDF determines it, and why a density is not a probability.
  • Recite each distribution’s generative story; recover E/Var for the core ones directly — or rederive them from AA', AA''.
  • Draw the zoo relationship map from a blank page (coin-flip chain, waiting chain, Poisson hub, CLT sink); tell the Poisson-process story in its three slices (count / first wait / α\alphath wait) and its discrete shadow.
  • Cast a density into exponential form via the 4-step recipe; read off the canonical link g(μ)=ηg(\mu) = \eta per family (logit / log / identity).
  • Cast Bernoulli and Poisson into exponential-family form from memory; name (T,η,A)(T, \eta, A) and read off the logit/log links.
  • Reproduce the E[T]=AE[T] = A' derivation (differentiate the normalization identity) and the MLE-as-moment-matching equation.
  • Run the Beta–Binomial update and narrate pseudo-counts; construct the conjugate prior for a generic exp family.
  • Explain why the Cauchy breaks the limit theorems — and why it’s also outside the exponential family.

3. Transformations of random variables

For Y=g(X)Y = g(X), two routes — the first always works, the second is the first packaged into a formula.

CDF method:

  • Write FY(y)=P(g(X)y)F_Y(y) = P(g(X) \leq y), manipulate the event into a statement about XX, then differentiate.
  • Example, Z=X/2Z = X/2:

FZ(z)=P(X/2z)=P(X2z)=FX(2z)    fZ(z)=2fX(2z)F_Z(z) = P(X/2 \leq z) = P(X \leq 2z) = F_X(2z) \;\Rightarrow\; f_Z(z) = 2f_X(2z)

The factor 2 is the Jacobian showing up on its own.

Change of variables (monotone gg) — derive it once from the CDF method. For increasing gg:

FY(y)=P(g(X)y)=P(Xg1(y))=FX(g1(y))F_Y(y) = P(g(X) \leq y) = P(X \leq g^{-1}(y)) = F_X(g^{-1}(y))

fY(y)=ddyFX(g1(y))=fX(g1(y))ddyg1(y)f_Y(y) = \frac{d}{dy}F_X(g^{-1}(y)) = f_X(g^{-1}(y))\cdot\frac{d}{dy}g^{-1}(y)

Decreasing gg flips the inequality, producing a minus sign — hence the absolute value in the general formula:

fY(y)=fX(g1(y))ddyg1(y)f_Y(y) = f_X(g^{-1}(y))\left|\frac{d}{dy}g^{-1}(y)\right|

The Jacobian factor is conservation of probability mass: fY(y)dy=fX(x)dxf_Y(y)\,|dy| = f_X(x)\,|dx|. Where gg stretches an interval, the density must thin proportionally.

Multivariate version — reach for this when you transform a vector of RVs and want the joint law of the new coordinates: the distribution of a sum and difference together, the polar change in Box–Muller (uniforms → two independent normals), or building χ2\chi^2/tt/FF out of normals (§8). Same idea, J|J| is now a volume-scaling factor. For (U,V)=g(X,Y)(U,V) = g(X,Y):

  1. Invert the transformation: x=h1(u,v)x = h_1(u,v), y=h2(u,v)y = h_2(u,v).
  2. Compute the Jacobian of the inverse map:

J=det[x/ux/vy/uy/v]J = \det\begin{bmatrix} \partial x/\partial u & \partial x/\partial v \\ \partial y/\partial u & \partial y/\partial v \end{bmatrix}

  1. Then fUV(u,v)=fXY(h1(u,v),h2(u,v))Jf_{UV}(u,v) = f_{XY}(h_1(u,v), h_2(u,v))\,|J|.

Universality of the uniform — one fact, two hats. For continuous FF:

P(F(X)u)=P(XF1(u))=F(F1(u))=uP(F(X) \leq u) = P(X \leq F^{-1}(u)) = F(F^{-1}(u)) = u

so F(X)U(0,1)F(X) \sim U(0,1), and running it backward, F1(U)FF^{-1}(U) \sim F.

Implications:

  • Backward hat: sampling any distribution reduces to sampling uniforms — inverse-CDF sampling, the basis of simulation.
  • Forward hat: a p-value is FF-of-the-data under the null, so p-values are uniform under the null — the fact that makes rejection thresholds calibrated. Same theorem, statistics costume.

Sums — why we care, and the convolution. Sums of independent RVs are everywhere: a total, the sample sum behind every average (§7), errors accumulating. The density of Z=X+YZ = X + Y (XYX \perp Y) is the convolution of fX,fYf_X, f_Y — and it’s just the multivariate transform above in disguise: set (Z,W)=(X+Y, X)(Z, W) = (X + Y,\ X), whose inverse x=w, y=zwx = w,\ y = z - w has Jacobian 11, then marginalize out WW:

fZ(z)=fX(x)fY(zx)dxf_Z(z) = \int f_X(x)\,f_Y(z - x)\,dx

— sum over every way to split z=x+(zx)z = x + (z - x). Convolution integrals are painful, which is precisely why MGFs exist (§6): independence gives MX+Y=MXMYM_{X+Y} = M_XM_Y, so adding independent RVs becomes multiplying MGFs — the two-line route behind every “sum within a family” fact (§2). Affine normal closure: XN(μ,σ2)aX+bN(aμ+b,a2σ2)X \sim N(\mu, \sigma^2) \Rightarrow aX + b \sim N(a\mu + b, a^2\sigma^2).

Core competency set

  • Execute the CDF method and re-derive the change-of-variables formula from it; explain the Jacobian as mass conservation.
  • Run the 3-step multivariate Jacobian procedure.
  • Prove universality of the uniform from memory; produce both hats (simulation, p-values).

4. Joint distributions

  • Joint CDF F(x,y)F(x,y); marginal = integrate the other variable out fully: fX(x)=f(x,y)dyf_X(x) = \int f(x,y)\,dy. Even when the support couples xx and yy, the marginal’s domain is free of yy — the dependence lives in the integration limits, which get consumed.
  • Conditional density: fYX(yx)=fXY(x,y)fX(x)f_{Y|X}(y \mid x) = \frac{f_{XY}(x,y)}{f_X(x)} — restriction + renormalization again, now slicing the joint surface at xx and rescaling the slice to integrate to 1.
  • Independence ⟺ the joint factors: F(x1,,xn)=FXi(xi)F(x_1, \ldots, x_n) = \prod F_{X_i}(x_i). Equivalently densities factor and the support is a product set — a triangular support kills independence regardless of the formula.
  • A copula is a joint CDF with uniform marginals — by universality (§3), any joint distribution separates into marginals + copula: “what each variable does” + “how they co-move.”

Core competency set

  • Marginalize and condition fluently, including with coupled supports.
  • Spot non-independence from a non-product support without computing anything.

5. Expectation

E(X)=xip(xi)E(X) = \sum x_ip(x_i) or xf(x)dx\int xf(x)\,dx (requires EX<E|X| < \infty). LOTUS: E[g(X)]=g(x)f(x)dxE[g(X)] = \int g(x)f(x)\,dx — no need to derive the distribution of g(X)g(X) first.

The algebra that does all the work:

  • Linearity, no independence required: E(aiXi)=aiE(Xi)E(\sum a_iX_i) = \sum a_iE(X_i). The single most-used fact in the subject — it’s how E[Bin]=npE[\text{Bin}] = np falls out with zero computation (sum of nn Bernoulli means), and the engine of every indicator-variable argument.
  • Independence ⟹ E(XY)=E(X)E(Y)E(XY) = E(X)E(Y). Converse false: uncorrelated ≠ independent — except jointly normal, where it’s true (§8 leans on exactly this).
  • The variance shortcut, derived once:

Var(X)=E(Xμ)2=E(X2)2μE(X)+μ2=E(X2)μ2\operatorname{Var}(X) = E(X - \mu)^2 = E(X^2) - 2\mu E(X) + \mu^2 = E(X^2) - \mu^2

  • Covariance is bilinear: Cov(aX,bY)=abCov(X,Y)\operatorname{Cov}(aX, bY) = ab\operatorname{Cov}(X,Y), and Var(X)=Cov(X,X)\operatorname{Var}(X) = \operatorname{Cov}(X,X). Variance of a sum is the quadratic expansion of that bilinearity:

Var(X+Y)=Cov(X+Y,X+Y)=Var(X)+Var(Y)+2Cov(X,Y)\operatorname{Var}(X + Y) = \operatorname{Cov}(X+Y,\, X+Y) = \operatorname{Var}(X) + \operatorname{Var}(Y) + 2\operatorname{Cov}(X,Y)

generalizing to Var(Xi)=Var(Xi)+2i<jCov(Xi,Xj)\operatorname{Var}(\sum X_i) = \sum\operatorname{Var}(X_i) + 2\sum_{i<j}\operatorname{Cov}(X_i,X_j) — cross-terms vanish under independence.

  • Correlation = covariance of the standardized variables: ρ=σXYσXσY[1,1]\rho = \frac{\sigma_{XY}}{\sigma_X\sigma_Y} \in [-1,1] (Cauchy–Schwarz).

Conditional expectation is a random variable. Build it in three steps:

  • E(YX=x)E(Y \mid X = x): the mean of YY inside the slice X=xX = x — a number that depends on xx, i.e. a function of xx.
  • E(YX)E(Y \mid X): plug the random XX into that function — now a random variable, the best guess of YY given what XX tells you.
  • Tower / total expectation: E(Y)=E[E(YX)]E(Y) = E[E(Y \mid X)] — compute the answer within each scenario, then average over scenarios. The proof is just unpacking the double integral:

E[E(YX)]=E(YX=x)fX(x)dx= ⁣ ⁣yfYX(yx)fX(x)dydx= ⁣ ⁣yfXY(x,y)dydx=E(Y)E[E(Y \mid X)] = \int E(Y \mid X = x)\,f_X(x)\,dx = \int\!\!\int y\,f_{Y|X}(y \mid x)\,f_X(x)\,dy\,dx = \int\!\!\int y\,f_{XY}(x,y)\,dy\,dx = E(Y)

(the inner product fYXfXf_{Y|X} \cdot f_X reassembles the joint — conditioning run in reverse).

  • Variance decomposition: total spread = average spread inside each slice + spread of the slice means:

Var(Y)=E[Var(YX)]within-group+Var[E(YX)]between-group\operatorname{Var}(Y) = \underbrace{E[\operatorname{Var}(Y \mid X)]}_{\text{within-group}} + \underbrace{\operatorname{Var}[E(Y \mid X)]}_{\text{between-group}}

Derivation — apply tower to both pieces of the variance shortcut. First piece, using E(Y2X)=Var(YX)+E(YX)2E(Y^2 \mid X) = \operatorname{Var}(Y \mid X) + E(Y \mid X)^2:

E(Y2)=E[E(Y2X)]=E[Var(YX)]+E[E(YX)2]E(Y^2) = E[E(Y^2 \mid X)] = E[\operatorname{Var}(Y \mid X)] + E[E(Y \mid X)^2]

Second piece, by tower: (EY)2=(E[E(YX)])2(EY)^2 = (E[E(Y \mid X)])^2. Subtract:

Var(Y)=E[Var(YX)]+E[E(YX)2](E[E(YX)])2= Var[E(YX)]\operatorname{Var}(Y) = E[\operatorname{Var}(Y \mid X)] + \underbrace{E[E(Y \mid X)^2] - (E[E(Y \mid X)])^2}_{=\ \operatorname{Var}[E(Y \mid X)]}

Implications — why E(YX)E(Y \mid X) is the central object of statistics:

  • E(YX)E(Y \mid X) is the best predictor of YY under squared loss. For any competitor g(X)g(X), add and subtract E(YX)E(Y \mid X):

E[(Yg(X))2]=E[(YE(YX))2]+E[(E(YX)g(X))2]E[(Y - g(X))^2] = E[(Y - E(Y \mid X))^2] + E[(E(Y \mid X) - g(X))^2]

The cross-term dies by conditioning on XX (inside the slice, YE(YX)Y - E(Y \mid X) has mean zero while the other factor is a constant). Both remaining terms are 0\geq 0 and only the second depends on gg — minimized by g=E(YX)g = E(Y \mid X). Regression is the project of estimating this function.

  • The variance decomposition is the seed of ANOVA and R2R^2: “fraction of variance explained” = between-group share Var[E(YX)]Var(Y)\frac{\operatorname{Var}[E(Y|X)]}{\operatorname{Var}(Y)}.
  • Tower is the universal trick for expectations of layered randomness (random sums, mixtures, hierarchical models): condition on the layer that makes it easy, then average it out.

Core competency set

  • Use linearity + indicators as the default attack on any “expected count” problem.
  • Reproduce the tower proof (joint reassembly) and the variance decomposition derivation.
  • Prove that E(YX)E(Y|X) minimizes squared loss and say why the cross-term vanishes.
  • Expand the variance of a sum with covariances without error.

6. Tail bounds, MGFs, delta method

Markov’s inequality — built from one pointwise comparison. For X0X \geq 0, t>0t > 0, it’s true case-by-case that t1{Xt}Xt\,\mathbf{1}\{X \geq t\} \leq X (if XtX \geq t, the left side is tXt \leq X; if not, it’s 0X0 \leq X). Expectations preserve ≤:

tP(Xt)=E[t1{Xt}]E(X)    P(Xt)E(X)tt\,P(X \geq t) = E[t\,\mathbf{1}\{X \geq t\}] \leq E(X) \;\Rightarrow\; P(X \geq t) \leq \frac{E(X)}{t}

A mean constrains how much mass can live far out.

Chebyshev — Markov applied to a transformed variable. (Xμ)2(X - \mu)^2 is a nonnegative RV with mean σ2\sigma^2, so:

P(Xμ>t)=P((Xμ)2>t2)E(Xμ)2t2=σ2t2P(|X - \mu| > t) = P\big((X-\mu)^2 > t^2\big) \leq \frac{E(X-\mu)^2}{t^2} = \frac{\sigma^2}{t^2}

Distribution-free tail control from two moments.

Implications — the transform, then Markov pattern scales:

  • Apply Markov to etXe^{tX} instead and optimize over tt:

P(Xa)=P(etXeta)etaM(t)    P(Xa)mintetaM(t)P(X \geq a) = P(e^{tX} \geq e^{ta}) \leq e^{-ta}M(t) \;\Rightarrow\; P(X \geq a) \leq \min_t\, e^{-ta}M(t)

— the Chernoff bound, with exponentially decaying tails where Chebyshev gives only polynomial. Each higher transform spends more moment information to buy a sharper tail. This is the engine of concentration inequalities (Hoeffding, Bernstein) used everywhere in ML theory.

  • Chebyshev is already enough to prove the WLLN (§7) — the cheapest possible route from moments to convergence.

MGF M(t)=E(etX)M(t) = E(e^{tX}) — one function doing three jobs the chapter keeps needing: it encodes every moment, it fingerprints the distribution (uniqueness), and it turns sums into products. The third is the payoff: convolution (§3) is painful, but independence makes MGFs multiply, so “add independent RVs” becomes “multiply MGFs and recognize the result” — that is how every sum-within-a-family fact (§2) is a two-line proof. Defined when it exists near 0:

  • M(r)(0)=E(Xr)M^{(r)}(0) = E(X^r)etXe^{tX} is a moment-encoding power series; differentiation reads the moments off.
  • Uniqueness: same MGF ⟹ same distribution.
  • Independence turns convolution into multiplication — the tool for sums:

MX+Y(t)=E[et(X+Y)]=E[etXetY]=E[etX]E[etY]=MX(t)MY(t)M_{X+Y}(t) = E[e^{t(X+Y)}] = E[e^{tX}e^{tY}] = E[e^{tX}]\,E[e^{tY}] = M_X(t)M_Y(t)

  • Affine: Ma+bX(t)=eatMX(bt)M_{a+bX}(t) = e^{at}M_X(bt).
  • Cumulants, and the exponential-family bridge. The cumulant generating function K(t)=logM(t)K(t) = \log M(t) has K(0)=E(X)K'(0) = E(X) and K(0)=Var(X)K''(0) = \operatorname{Var}(X) — mean and variance off the first two derivatives at 0. This is exactly the exponential family’s log-partition AA (§2): A(η)A(\eta) is the CGF of the natural family, which is the real reason A(η)=E[T]A'(\eta) = E[T] and A(η)=Var[T]A''(\eta) = \operatorname{Var}[T] there. The normalizer you collect when casting a density into exponential form and the MGF you build here are one object in two costumes — that is what “the exp family gets into moment generation” was pointing at.
  • Caveat: MGFs can fail to exist (Cauchy); existence near 0 is what makes the uniqueness/continuity machinery run.

Delta method — pushing moments through a smooth function:

  • XX concentrated near μ\mu; zoomed in there, gg is approximately a line:

Y=g(X)g(μ)+g(μ)(Xμ)Y = g(X) \approx g(\mu) + g'(\mu)(X - \mu)

  • Variance through a line is slope-squared (constants don’t vary; coefficients square):

Var(Y)Var(g(μ)+g(μ)(Xμ))=[g(μ)]2σ2\operatorname{Var}(Y) \approx \operatorname{Var}\big(g(\mu) + g'(\mu)(X - \mu)\big) = [g'(\mu)]^2\,\sigma^2

  • Keep the second-order term for the mean and a bias appears:

E(Y)g(μ)+12g(μ)σ2E(Y) \approx g(\mu) + \frac{1}{2}g''(\mu)\,\sigma^2

— Jensen’s inequality made quantitative: convex gg (g>0g'' > 0) drags the mean up.

Implications: the delta method composes with the CLT — if Xˉn\bar{X}_n is asymptotically normal, so is g(Xˉn)g(\bar{X}_n), with variance [g(μ)]2σ2/n[g'(\mu)]^2\sigma^2/n. This is how standard errors for ratios, logs, and odds get built in practice.

Core competency set

  • Prove Markov from the pointwise inequality; derive Chebyshev and Chernoff from it as instances of transform-then-Markov.
  • Derive MX+Y=MXMYM_{X+Y} = M_XM_Y and use it to identify the distribution of a sum in two lines.
  • Run the delta method including the second-order bias term, and say where the [g]2[g']^2 comes from.

7. Convergence and limit theorems

Three modes, strictly ordered (a.s. ⟹ in probability ⟹ in distribution):

ModeStatementWhat it controls
Almost sureP(XnX)=1P(X_n \to X) = 1each sample path eventually settles for good
In probabilityP(XnX>ϵ)0P(\lvert X_n - X\rvert > \epsilon) \to 0 for all ϵ\epsilonat any large nn a deviation is unlikely — but a given path may keep misbehaving rarely forever
In distributionFn(x)F(x)F_n(x) \to F(x) at continuity points of FFonly the CDFs converge; says nothing about the RVs as functions

WLLN. XiX_i iid with mean μ\mu, variance σ2\sigma^2: then Xˉnpμ\bar{X}_n \xrightarrow{p} \mu. Proof — independence kills the cross-terms in the variance, then Chebyshev finishes:

Var(Xˉn)=1n2iVar(Xi)=σ2n\operatorname{Var}(\bar{X}_n) = \frac{1}{n^2}\sum_i \operatorname{Var}(X_i) = \frac{\sigma^2}{n}

P(Xˉnμ>ϵ)Var(Xˉn)ϵ2=σ2nϵ20P(|\bar{X}_n - \mu| > \epsilon) \leq \frac{\operatorname{Var}(\bar{X}_n)}{\epsilon^2} = \frac{\sigma^2}{n\epsilon^2} \to 0

(SLLN upgrades to almost-sure convergence under just EX<E|X| < \infty; no two-line proof exists.)

Continuity theorem. If Mn(t)M(t)M_n(t) \to M(t) for all tt near 0, then FnFF_n \to F at continuity points. Converts distributional convergence into calculus on MGFs — the engine behind the CLT.

CLT. XiX_i iid, mean μ\mu, variance σ2<\sigma^2 < \infty:

Xˉnμσ/ndN(0,1)\frac{\bar{X}_n - \mu}{\sigma/\sqrt{n}} \xrightarrow{d} N(0,1)

The one proof in this guide worth rehearsing fully:

  1. WLOG μ=0\mu = 0 (center first). Let Sn=XiS_n = \sum X_i; target the MGF of Snσn\frac{S_n}{\sigma\sqrt{n}}.
  2. Independence factorizes it:

MSn/σn(t)=[M ⁣(tσn)]nM_{S_n/\sigma\sqrt{n}}(t) = \left[M\!\left(\frac{t}{\sigma\sqrt{n}}\right)\right]^n

  1. Taylor-expand MM at 0 — the crux: M(0)=1M(0) = 1, M(0)=E(X)=0M'(0) = E(X) = 0 (centering!), M(0)=E(X2)=σ2M''(0) = E(X^2) = \sigma^2. The first surviving term is second order:

M ⁣(tσn)=1+0+σ22t2σ2n+o ⁣(1n)=1+t22n+o ⁣(1n)M\!\left(\frac{t}{\sigma\sqrt{n}}\right) = 1 + 0 + \frac{\sigma^2}{2}\cdot\frac{t^2}{\sigma^2 n} + o\!\left(\frac{1}{n}\right) = 1 + \frac{t^2}{2n} + o\!\left(\frac{1}{n}\right)

  1. Power up using (1+an+o(1/n))nea(1 + \frac{a}{n} + o(1/n))^n \to e^a:

[1+t22n+o(1/n)]net2/2\left[1 + \frac{t^2}{2n} + o(1/n)\right]^n \to e^{t^2/2}

— the N(0,1)N(0,1) MGF. 5. Finish by the continuity theorem.

Read the mechanism off the proof:

  • Centering deletes the first-order term; that’s what makes step 3 work.
  • n\sqrt{n} is the unique scale where the second-order term lands at Θ(1/n)\Theta(1/n), so the nnth power converges to something finite and non-degenerate. Scale by nn and everything dies; scale by 1 and it blows up.
  • Every moment beyond the second enters at o(1/n)o(1/n) and is annihilated in the limit — averaging erases all of a distribution’s personality except (μ,σ2)(\mu, \sigma^2). That is why the normal is universal: it’s the fixed point of averaging.

Implications — what falls out of the CLT:

  • The universal error rate of statistics: estimates based on nn samples have noise σn\sim \frac{\sigma}{\sqrt{n}} — quadruple the data to halve the error.
  • Numbers: a fair coin flipped 100 times — σ=0.5\sigma = 0.5, so the proportion of heads has se =0.5100=0.05= \frac{0.5}{\sqrt{100}} = 0.05. Observing 60% heads is z=2z = 2, probability 2.3%\approx 2.3\%. Every A/B-test readout is this arithmetic.
  • Large-sample confidence intervals with no normality assumption on the data: Xˉ±zα/2σn\bar{X} \pm z_{\alpha/2}\frac{\sigma}{\sqrt{n}} is approximately calibrated for any finite-variance population.
  • Normal approximations to Binomial (npnp large) and Poisson (λ\lambda large) — both are sums, so the CLT applies to them directly.
  • Most classical estimators are averages (or smooth functions of averages — delta method, §6), which is why “asymptotically normal” is the default ending of estimation theory (track 3).

Core competency set

  • State the three convergence modes and their ordering; give the flavor of why in-probability ≠ almost-sure.
  • Prove the WLLN in two displayed lines.
  • Reproduce the CLT MGF proof and explain why n\sqrt{n} and why only two moments survive.
  • Produce the implications: n\sqrt{n}-rate, large-sample CIs, normal approximations.

8. The normal sampling family

A constructed family — each member is a recipe over independent ingredients:

  • Chi-square: χn2=i=1nZi2\chi^2_n = \sum_{i=1}^n Z_i^2 for iid ZiN(0,1)Z_i \sim N(0,1). The law of “squared normal noise.” Equals Gamma(n2,12)\text{Gamma}(\frac{n}{2}, \frac{1}{2}); E=nE = n, Var=2n\operatorname{Var} = 2n.
  • t: tn=ZU/nt_n = \frac{Z}{\sqrt{U/n}} with ZN(0,1)Uχn2Z \sim N(0,1) \perp U \sim \chi^2_n. A normal whose scale is itself noisy ⟹ heavier tails. t1t_1 = Cauchy (maximal scale noise); tnN(0,1)t_n \to N(0,1) as the scale noise vanishes.
  • F: Fm,n=U/mV/nF_{m,n} = \frac{U/m}{V/n}, independent chi-squares — a ratio of two variance estimates. tn2=F1,nt_n^2 = F_{1,n}.

The sampling theorem. For X1,,XnX_1, \ldots, X_n iid N(μ,σ2)N(\mu, \sigma^2), with Xˉ=1nXi\bar{X} = \frac{1}{n}\sum X_i and s2=1n1(XiXˉ)2s^2 = \frac{1}{n-1}\sum(X_i - \bar{X})^2:

  1. XˉN(μ,σ2n)\bar{X} \sim N(\mu, \frac{\sigma^2}{n})
  2. Xˉs2\bar{X} \perp s^2
  3. (n1)s2σ2χn12\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{n-1}
  4. therefore Xˉμs/ntn1\frac{\bar{X} - \mu}{s/\sqrt{n}} \sim t_{n-1}

Proof of (2) — the magic ingredient, special to the normal:

  • Compute the covariance of the mean with each deviation:

Cov(Xˉ,XiXˉ)=Cov(Xˉ,Xi)Var(Xˉ)=σ2nσ2n=0\operatorname{Cov}(\bar{X},\, X_i - \bar{X}) = \operatorname{Cov}(\bar{X}, X_i) - \operatorname{Var}(\bar{X}) = \frac{\sigma^2}{n} - \frac{\sigma^2}{n} = 0

  • (Xˉ,X1Xˉ,,XnXˉ)(\bar{X},\, X_1 - \bar{X}, \ldots, X_n - \bar{X}) is jointly normal (a linear image of normals), and for jointly normal vectors uncorrelated ⟹ independent.
  • s2s^2 is a function of the deviations only, so Xˉs2\bar{X} \perp s^2. For any non-normal distribution they are dependent — this independence characterizes the normal.

Proof skeleton for (3) — degrees of freedom as spent information. Add and subtract Xˉ\bar{X}, then expand:

i(Xiμ)2=i((XiXˉ)+(Xˉμ))2=i(XiXˉ)2+n(Xˉμ)2\sum_i (X_i - \mu)^2 = \sum_i \big((X_i - \bar{X}) + (\bar{X} - \mu)\big)^2 = \sum_i (X_i - \bar{X})^2 + n(\bar{X} - \mu)^2

(the cross-term is 2(Xˉμ)i(XiXˉ)=02(\bar{X} - \mu)\sum_i(X_i - \bar{X}) = 0 since deviations sum to zero). Divide through by σ2\sigma^2:

i(Xiμ)2σ2χn2=i(XiXˉ)2σ2= (n1)s2/σ2+(Xˉμ)2σ2/nχ12\underbrace{\sum_i \frac{(X_i - \mu)^2}{\sigma^2}}_{\chi^2_n} = \underbrace{\sum_i \frac{(X_i - \bar{X})^2}{\sigma^2}}_{=\ (n-1)s^2/\sigma^2} + \underbrace{\frac{(\bar{X} - \mu)^2}{\sigma^2/n}}_{\chi^2_1}

The two right-hand pieces are independent (by (2)), so MGFs multiply; matching against the left side forces the first piece to be χn12\chi^2_{n-1}. One degree of freedom was spent estimating the mean — the deviations obey one linear constraint, which is also why s2s^2 divides by n1n - 1.

Assembling (4) — the destination of the whole track. Divide and conquer the unknown σ\sigma:

Xˉμs/n=(Xˉμ)/(σ/n)s2/σ2=Zχn12/(n1)tn1\frac{\bar{X} - \mu}{s/\sqrt{n}} = \frac{(\bar{X} - \mu)\big/(\sigma/\sqrt{n})}{\sqrt{s^2/\sigma^2}} = \frac{Z}{\sqrt{\chi^2_{n-1}/(n-1)}} \sim t_{n-1}

— exactly the t recipe, with the required independence supplied by (2), and σ\sigma cancelling between numerator and denominator.

Implications — why this theorem is the payoff:

  • The t-statistic is a pivot: a statistic whose distribution is fully known and free of unknown parameters. Pivots are what make exact inference possible — invert the pivot’s quantiles and you get the small-sample confidence interval

Xˉ±tn1,α/2sn\bar{X} \pm t_{n-1,\,\alpha/2}\cdot\frac{s}{\sqrt{n}}

valid at any nn, not just asymptotically.

  • The price of estimating σ\sigma is visible: tn1t_{n-1} has heavier tails than ZZ, so intervals widen at small nn; as nn \to \infty, sσs \to \sigma and t collapses back to the normal — the CLT regime takes over.
  • The same architecture (ratio of independent normal-ish numerator to chi-square-ish denominator) recurs everywhere downstream: regression t-tests for coefficients, F-tests comparing variances/models (track 4) — learn the pattern once here.

Core competency set

  • Build χ², t, F from their recipes; place t1t_1 = Cauchy and t=Zt_\infty = Z on the spectrum.
  • Prove Xˉs2\bar{X} \perp s^2 via covariance + joint normality; run the add-and-subtract χ² split and narrate the lost degree of freedom.
  • Assemble the t-statistic, articulate the pivot property, and write the CI it produces.

9. Memorize cold

The instant-recall layer — these should cost nothing to produce. Everything else in the guide is rederivable from them plus the named moves; the fluency flashcards drill exactly this list.

  • Bayes, slogan and formula: posterior ∝ likelihood × prior; P(BjA)=P(ABj)P(Bj)iP(ABi)P(Bi)P(B_j \mid A) = \frac{P(A \mid B_j)P(B_j)}{\sum_iP(A \mid B_i)P(B_i)}.
  • The zoo’s core rows with E/Var: Bern, Bin, Geo, Pois, Unif, Exp, Gamma, Normal — including the normal pdf 12πσe(xμ)22σ2\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}} outright.
  • Variance shortcut Var(X)=E(X2)(EX)2\operatorname{Var}(X) = E(X^2) - (EX)^2; sum rule Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y)\operatorname{Var}(X+Y) = \operatorname{Var}(X) + \operatorname{Var}(Y) + 2\operatorname{Cov}(X,Y).
  • Tower E(Y)=E[E(YX)]E(Y) = E[E(Y \mid X)]; decomposition Var(Y)=E[Var(YX)]+Var[E(YX)]\operatorname{Var}(Y) = E[\operatorname{Var}(Y \mid X)] + \operatorname{Var}[E(Y \mid X)].
  • Change of variables: fY(y)=fX(g1(y))ddyg1(y)f_Y(y) = f_X(g^{-1}(y))\left|\frac{d}{dy}g^{-1}(y)\right|.
  • Markov P(Xt)E(X)tP(X \geq t) \leq \frac{E(X)}{t}; Chebyshev P(Xμ>t)σ2t2P(|X - \mu| > t) \leq \frac{\sigma^2}{t^2}.
  • Counting 2×22\times2: ordered/unordered × with/without replacement = n!(nk)!\frac{n!}{(n-k)!}, nkn^k, (nk)\binom{n}{k}, (n+k1k)\binom{n+k-1}{k}.
  • Exponential family form h(x)exp(ηT(x)A(η))h(x)\exp(\eta T(x) - A(\eta)); E[T]=A(η)E[T] = A'(\eta), Var[T]=A(η)\operatorname{Var}[T] = A''(\eta) (AA = the CGF); Bernoulli’s η\eta = log-odds, Poisson’s η=logλ\eta = \log\lambda; canonical link g(μ)=η=(A)1(μ)g(\mu) = \eta = (A')^{-1}(\mu).
  • The conjugate table as pseudo-count updates: Beta–Binomial, Gamma–Poisson, Gamma–Exponential, Normal–Normal, Dirichlet–Multinomial.
  • CLT statement: Xˉnμσ/ndN(0,1)\frac{\bar{X}_n - \mu}{\sigma/\sqrt{n}} \xrightarrow{d} N(0,1); the σn\frac{\sigma}{\sqrt{n}} error rate.
  • The recipes: χn2=Zi2\chi^2_n = \sum Z_i^2, tn=ZU/nt_n = \frac{Z}{\sqrt{U/n}}, Fm,n=U/mV/nF_{m,n} = \frac{U/m}{V/n}; the t-statistic Xˉμs/ntn1\frac{\bar{X} - \mu}{s/\sqrt{n}} \sim t_{n-1} and its CI Xˉ±tn1,α/2sn\bar{X} \pm t_{n-1,\alpha/2}\frac{s}{\sqrt{n}}.
  • Named moves: restrict-and-renormalize (conditioning); condition-then-average (total probability / tower); transform-then-Markov; add-and-subtract; exponentiate-the-log (exp-family rewrites).