Statistical Inference
The arc: an estimator is a random variable → Fisher information prices what the data can tell you → Cramér–Rao sets the speed limit → the MLE reaches it asymptotically → sufficiency says how far data compresses → testing is the same machinery run as a decision. Two unifications carry the whole subject: the likelihood function is the interface between data and parameter (MLE, sufficiency, Bayes, LRT are all operations on it), and the MLE asymptotics theorem , where Fisher information, Cramér–Rao, and the CLT meet. Prerequisites cashed in from track 1: CLT, delta method, tower/variance decomposition, exp family, the t-pivot.
1. The estimation frame
- The data are random variables whose joint distribution depends on an unknown parameter . An estimator is a function of the data alone — therefore itself a random variable, with a distribution called its sampling distribution. All of inference is the study of that distribution.
- Keep three thetas straight: the parameter (ranges over the parameter space), the one true value, your random estimate.
- Standard error = the standard deviation of the sampling distribution; for a mean, . You rarely know it (it depends on the true parameter), so you plug in: .
- Unbiased: — right on average. Consistent: — right eventually. Neither implies the other; consistency is the one you can’t do without.
- Frequentist: is a fixed unknown number, the data are random. Bayesian (§7): is itself a random variable with a prior. Same likelihood, different object treated as random — most “philosophy” disputes in statistics are this one modeling choice.
Core competency set
- State why an estimator is an RV and what its sampling distribution is.
- Distinguish the three thetas; define SE vs estimated SE; define unbiased vs consistent.
2. Fisher information — pricing the data
Target idea first. Everything in this section funnels to one number, , the Fisher information: how sharply the data can distinguish the true from values nearby. It will turn out to be inverse variance — the best any estimator can do is (Cramér–Rao, §3), and the MLE achieves it (§4). So is the exchange rate between data and precision, and it is built entirely from the slope of the log-likelihood.
Setup and notation. For a single observation with density , write the one-observation log-likelihood and its derivative in the parameter:
is the score. The prime is always (the parameter), never — the data point is held fixed and we ask how its likelihood responds as moves.
The score has mean zero — the hinge the section hangs on. Start from the one identity every density obeys, that it integrates to 1, and differentiate it in .
Differentiate the normalization, moving inside the integral (Leibniz rule; legal exactly when the support doesn’t depend on ):
Multiply and divide the integrand by — the trick that manufactures a score:
Recognize the ratio as the score, since :
Chaining the three displays, . (The differentiate-the-identity move that gave in the exp family — track 1 §2; named move, first of several appearances this section.)
From one observation to — the bridge. For an iid sample the log-likelihood adds, so the sample score is a sum of one-observation scores:
Each term has mean zero and they’re independent, so as well, and variance adds. Hold this bridge — , sample information is times per-observation information — because Cramér–Rao (§3) and the MLE (§4) both run on it.
Fisher information is the variance of the score. Define it that way for one observation, then read off two more forms:
Form 1 = form 2 because variance is and the second term vanishes (score mean zero):
Form 2 = form 3 by differentiating the score-mean-zero identity a second time. Product rule on :
Re-insert in the second integral (same multiply-by- recognition as before):
So , i.e. . For the sample, each form scales by : .
Reading the three forms. is the expected squared slope of the log-likelihood (form 2) and equally its expected curvature at the truth (form 3). Steep slope ⟹ a small change in swings the likelihood a lot ⟹ the data discriminates between nearby parameter values ⟹ informative. The curvature form says the same of the peak: a sharply curved (peaked) log-likelihood pins down; a flat one leaves many values about equally plausible.
The picture to hold: two log-likelihood curves through the same maximum — one sharply peaked (high : the data pins down), one nearly flat (low : many ‘s explain the data about equally well). The estimator’s uncertainty is the width of that peak.
Numbers — Bernoulli(), . Log-likelihood of one observation, then differentiate twice in :
Take with , so :
Information explodes near (rare events are very informative about rarity) and bottoms out at ; the implied MLE variance is the familiar binomial-proportion variance, recovered instantly by §4’s capstone. (In the natural parameter = log-odds, — same object, different coordinates; information transforms by .)
Implications
- converts “how much data do I need?” into arithmetic: equate across two sampling plans to compare them.
- In exp families, , so and — the log-partition function prices the information too.
- The variance of good estimators will turn out to be — information is literally inverse variance, the claim §3 makes precise.
Core competency set
- Prove the score has mean zero (differentiate the normalization, multiply-and-divide by , recognize ).
- State the bridge , , and derive the three equivalent forms of .
- Narrate slope and curvature intuitions; run the Bernoulli computation .
3. Cramér–Rao — the speed limit
Target idea. There is a floor on how well any unbiased estimator can do, and Fisher information sets it. The reason is one mechanism: the data’s distribution responds to through exactly one channel, the score, so an estimator can track only insofar as it correlates with the score — and correlation is bounded by variance. That sentence is the theorem; the algebra cashes it.
Restate the §2 bridge, leaned on twice below: for an iid sample the sample score is , it has mean zero, and its variance is the sample information
(variance adds over the iid terms). Let be the joint density, so — the same ratio as in §2, now for the whole sample.
Cramér–Rao inequality. For an unbiased estimator of ,
The proof is two moves. Move 1 — differentiate the identity to write the slope as a covariance with the score. The estimator doesn’t depend on ; only the density does. Write the expectation as an integral and differentiate, Leibniz inside:
Multiply and divide by and recognize the sample score :
Turn that expectation into a covariance, using :
So — and for the plain unbiased case this is just .
Move 2 — Cauchy–Schwarz on that covariance. The covariance inequality with , :
Substitute (the bridge) and divide through by it:
The plain form is the case .
Read the mechanism off the proof. The score is the only channel through which the data’s distribution responds to ; an estimator tracks exactly to the extent it correlates with the score (move 1), and that correlation is capped by the two variances (move 2). Equality — an estimator that achieves the bound, called efficient — holds iff Cauchy–Schwarz is tight, i.e. iff is a linear function of the score.
Numbers — Bernoulli(), as an estimator of . From §2, , so the bound is . And exactly — sits on the floor, so the sample mean is an efficient estimator of a Bernoulli rate (consistent with the equality condition: the Bernoulli score is linear in ).
Efficiency: ; with variances , this is the ratio of sample sizes needed for equal precision. An unbiased estimator achieving the bound is efficient.
Implications
- The bound is the benchmark that makes “asymptotically efficient” meaningful — and the MLE (§4) hits it as . That’s the reason MLE is the default estimator.
- The bound governs only unbiased estimators. Counterexample on duty — shrink the sample mean, with . Its MSE is , and lowering below 1 cuts the variance term faster than it adds bias, so drops below the Cramér–Rao floor in MSE. This is the loophole Bayesian/shrinkage estimators exploit — seed of the bias–variance tradeoff in track 6 and of ridge in track 4 §8.
Core competency set
- State both forms of Cramér–Rao; restate the bridge the proof uses.
- Run the two moves (differentiate-the-identity to a covariance; Cauchy–Schwarz) and the equality condition ( linear in the score); define efficiency as a sample-size ratio.
- Show is efficient for a Bernoulli rate; explain the unbiasedness loophole with the shrink-the-mean counterexample.
4. Building estimators: Method of Moments and MLE
Method of Moments — match theoretical to observed moments:
- Express low-order moments in terms of the parameters: (need as many moments as parameters).
- Invert: parameters in terms of moments.
- Plug in sample moments .
- Fast, consistent, sometimes crude. Not range-respecting (can return illegal values like negative variances). MoM variance is the version: .
MLE — make the observed data most probable:
- Write the log-likelihood; differentiate in each parameter; set to zero; solve.
- Check it’s a max (second derivative / boundary).
- Read the result: in exp families this is exactly moment matching, (track 1 §2).
- Invariance: is the MLE of — transformations ride for free.
- Range-respecting: never returns an illegal parameter value (unlike MoM).
- Caution: the MLE is the parameter that makes the data most probable, not the parameter that is most probable given the data — that inversion needs a prior (§7).
The capstone theorem — MLE asymptotics. Under smoothness conditions (the support doesn’t depend on ),
This is where Fisher information, Cramér–Rao, and the CLT meet: the limit variance is exactly the Cramér–Rao floor, so the MLE is asymptotically efficient. The derivation is one Taylor expansion of the score, after which the §2 bridge and track 1’s CLT/LLN do all the work.
Start from the defining property — the MLE zeroes the sample score, . Taylor-expand about the truth , keeping the linear term:
Solve for the estimation error:
Now read numerator and denominator separately, each a sum of iid terms. Numerator — the score at the truth is a sum of iid mean-zero terms (the §2 bridge: , each mean zero, each variance ), so by the CLT:
Denominator — minus the second derivative is a sum of iid terms with mean (form 3), so by the LLN:
Divide: a numerator over the constant scales the variance by :
Every piece is load-bearing: the mean-zero score makes the CLT apply, the form-2/form-3 identity makes the same appear top and bottom, and the limit variance is exactly the Cramér–Rao bound.
- Caveat: fails when the support depends on (e.g. ) — the differentiate-under-the-integral moves break, the same pathology that excluded Uniform from the exp family.
Implications — what falls out of the capstone:
- The asymptotic CI machine of §5: , for any smooth model.
- Composes with the delta method (track 1 §6): — standard errors for any transformed parameter, free.
- The observed curvature estimates — which is why an optimizer’s Hessian at the maximum doubles as the standard-error matrix in practice.
- Wilks’ theorem (§9) is this theorem squared — the same Taylor expansion drives the χ² limit of likelihood ratios.
Core competency set
- Run both procedures; state MLE’s invariance and range-respecting properties.
- Reproduce the MLE asymptotics derivation and name where CLT, LLN, mean-zero score, and the information identity each enter.
- State the support-depends-on-θ caveat.
5. Confidence intervals — three routes
- Exact (pivots): when a pivot exists, invert its known quantiles — gives the t-interval (track 1 §8); gives the (asymmetric!) variance interval.
- Asymptotic: plug the MLE theorem into the usual recipe —
estimate ± z × SE, with SE priced by Fisher information.
Numbers: Poisson counts, over , with (moment matching). Get the information the §2 way — the one-count log-likelihood is , so the score and its derivative in are
and, using ,
So SE (since ) and the 95% CI is .
- Bootstrap — when no formula exists, simulate the sampling distribution: generate samples from the fitted model (or resample the data), compute each time, and use the distribution of as a stand-in for the unknowable . The whole trick is one approximation: the estimated world relates to your estimate the way the real world relates to the truth. CI: from the quantiles of .
Core competency set
- Produce all three CI routes and say when each applies.
- State the bootstrap’s one approximation in a sentence.
6. Sufficiency — how far data compresses
- is sufficient for if the conditional distribution of the data given does not depend on — once you know , the rest of the data is noise as far as is concerned.
- Factorization theorem (the usable test): is sufficient ⟺ the joint density factors as
— touches the data only through . Read it as: the likelihood, as a function of , depends on the data only through . So anything computed from the likelihood (MLE, posterior) is automatically a function of .
- Exp families are sufficiency’s home turf: the -point likelihood is , so is sufficient — fixed dimension at any (track 1 §2, now made precise).
Rao–Blackwell — sufficiency as an improvement engine. Let be any estimator, sufficient, and . Then
The proof reduces the MSE comparison to a variance comparison, then applies the variance decomposition from track 1 §5. First, the bias is unchanged. By the tower property the conditioned estimator has the same mean:
so and carry identical bias. Since , comparing their MSEs is comparing their variances. Now decompose by conditioning on :
The second term is exactly (since ); the first is non-negative. Drop it:
Same bias plus smaller variance gives . Conditioning on throws away exactly the noise that carries no information about . (Sufficiency is what makes a statistic — computable without knowing .)
Implications
- Estimation should start from sufficient statistics — any estimator that doesn’t can be improved for free.
- Sufficiency is the license behind summary statistics: in exp families, keeping only loses nothing about — the theory behind streaming and compressed data analysis.
- Foreshadow: Rao–Blackwell + a complete sufficient statistic yields the unique minimum-variance unbiased estimator (Lehmann–Scheffé — advanced pass).
Core competency set
- Define sufficiency, state and apply the factorization theorem; identify in an exp family on sight.
- Prove Rao–Blackwell from the variance decomposition and say why sufficiency is needed for the construction to be legal.
7. Bayesian estimation
- Treat as random with prior . Then everything is track 1 conditioning:
The denominator doesn’t involve — recognize the posterior’s shape as a known distribution and skip the integral (the conjugate machinery of track 1 §2 exists exactly for this).
- Sequential updating works: today’s posterior is tomorrow’s prior; the answer matches processing all data at once.
- The conjugate formula track 1’s table left implicit — Normal–Normal (known ; prior ). Work in precisions :
Precisions add; the posterior mean is the precision-weighted average of prior mean and data mean. Same pseudo-count grammar as Beta–Binomial: the prior is worth observations.
- Choosing the point estimate is a loss-function decision, and track 1’s best-predictor results decide it:
- Posterior mean minimizes posterior mean squared error.
- Posterior median minimizes posterior mean absolute error.
- Posterior mode (MAP) is the Bayesian shadow of the MLE.
- Interval: take posterior quantiles (credible interval), or HPD (lower a horizontal line on the density until is enclosed — differs from quantiles only for asymmetric posteriors).
- Interpretation contrast worth keeping sharp: a credible interval is a probability statement about given the data; a confidence interval is a probability statement about the procedure over repeated data, with fixed.
- Large-sample reconciliation: the posterior is approximately — the prior washes out and Bayes converges to the MLE with the same Fisher-information variance. The two frameworks disagree mostly at small , which is exactly when the prior is doing work.
Core competency set
- Run a conjugate posterior update and a posterior-mean/median estimate, naming the loss each minimizes.
- Articulate credible vs confidence in one sentence each; state the large-sample posterior ≈ MLE result.
8. Hypothesis testing — the Neyman–Pearson frame
The decision frame:
| true | false | |
|---|---|---|
| reject | Type I (prob , the level) | correct — prob = power |
| accept | correct | Type II (prob ) |
- A test statistic , its null distribution, a critical value at level . The p-value is the probability under of a result at least as extreme as observed — equivalently the smallest at which you’d reject. Under it’s Uniform(0,1) for a continuous test statistic (discrete ones are conservative) — universality of the CDF (track 1 §3) wearing its testing hat; that’s the calibration of the whole machine.
The picture to hold: two overlapping sampling densities of — null and alternative — with a vertical critical-value line. = the null’s tail beyond the line, = the alternative’s mass before it. Sliding the line trades one error for the other; only separating the curves (more data, bigger effect, less noise) improves both.
- Simple hypothesis = fully specifies the distribution; otherwise composite.
- Neyman–Pearson lemma: for simple vs simple, the likelihood ratio test — reject when — is the most powerful test at its level. Optimality belongs to the likelihood ratio; everything else is implementation.
- The working pattern (used constantly): write the LR, observe it’s monotone in some statistic (e.g. ), so thresholding the LR ⟺ thresholding the statistic — then use the statistic’s known null distribution to set the cutoff.
- UMP tests (most powerful against every alternative simultaneously) exist for one-sided alternatives via that monotonicity; no UMP test exists against two-sided alternatives — there’s no single best direction to spend your in.
The duality — tests and confidence intervals are the same object:
A CI is the set of nulls the data can’t reject; a test checks whether the null is in the CI. One computation, two readings.
Core competency set
- Define α, β, power, p-value; explain why p-values are uniform under the null and why that matters.
- State Neyman–Pearson and run the monotone-LR pattern; say why two-sided UMP fails.
- State the CI–test duality and use it in both directions.
9. Generalized LRT and the chi-square family
When hypotheses are composite, maximize over each:
- Wilks’ theorem: under , as ,
- Sketch for — the capstone cashed in. Under the numerator of maximizes at , the denominator at , so . Taylor-expand about the MLE ; the linear term drops because :
Substitute into (the terms cancel, the sign flips the second-derivative term):
Replace by (LLN, as in §4) and group the square:
the bracket being the standardized MLE from the capstone. The likelihood-ratio statistic is the squared standardized MLE; each additional free parameter contributes one more squared normal — that’s the χ² recipe (track 1 §8) assembling itself.
- The degrees of freedom are a count of free parameters: has 0, has 2. Intuition for the rule: every extra free parameter lets the alternative chase the data a little harder, inflating the ratio even under — the reference is exactly the chase-allowance, one squared-normal unit per parameter (, track 1 §8).
- Pearson’s chi-square is the GLRT in disguise: a Taylor expansion of for multinomial data gives
with = (number of cells − 1) − (parameters estimated).
Numbers — testing a 3:1 Mendelian ratio, : observed (84, 16), expected (75, 25):
Reject at 5% — and note the small-expected-count cell carries three-quarters of the statistic.
- One statistic, three sampling designs — keep them distinct by what’s fixed:
- Goodness of fit: one sample vs a theoretical distribution.
- Homogeneity: column totals fixed (J independent multinomials) — are the column distributions equal?
- Independence: only the grand total fixed (one multinomial on the I×J grid) — does ? Same formula, same df, different hypothesis and design. Fisher’s exact test handles the small-sample 2×2 case (hypergeometric null, all margins fixed).
- Specific beats generic: testing Poisson rate-constancy against the specific alternative of varying rates (dispersion test, ) has more power than an omnibus goodness-of-fit test. If you know what you’re looking for, test for it.
Core competency set
- Write the GLRT, state Wilks with the df-counting rule, and narrate the chase-allowance intuition.
- Connect Pearson’s to the GLRT; keep homogeneity vs independence straight by what’s fixed.
10. Two samples, pairs, and ANOVA
Two independent samples (the workhorse): , pool the variance estimate
— the same pivot architecture as track 1 §8: normal numerator over independent scaled-χ² denominator. (Unequal variances: replace the pooled SE with and use Welch’s adjusted df — pooling assumes a shared .) Power rises with effect size , with , with , and falls with .
Paired samples: work with ,
Pairing pays exactly when — matching subjects subtracts the shared noise. Then it’s a one-sample t-test on the .
ANOVA (one-way) — many groups at once. Model , errors iid , . The add-and-subtract move (track 1’s named move, third appearance) splits the variation. Add and subtract the group mean inside each total deviation:
Square and sum over all . The cross-term vanishes because within each group the deviations from the group mean sum to zero ():
leaving (the between term carries a factor because is constant across the members of group ):
— the sample version of .
- Expectations tell you what to compare: always; — equal iff all . Hence
≈ 1 under the null, inflated otherwise — the F recipe from track 1 §8 (ratio of independent χ²’s, independence by the same Cochran-style splitting).
- Multiple comparisons: a significant F says “something differs,” not what. Tukey (studentized range, simultaneous CIs for all pairs) or Bonferroni (test each of comparisons at — crude, general). The problem this solves — inflation over many tests — only grows downstream.
- Two-way layout adds and interaction ; the same decomposition produces , each scaled by a χ² under its null, each tested by an F against .
Core competency set
- Build the two-sample t (pooled SE) and the paired t; say exactly when pairing helps and why.
- Derive the ANOVA decomposition via add-and-subtract; explain the F statistic through the expected mean squares.
- Name the multiple-comparisons problem and the two standard fixes.
11. Nonparametric tests — rank everything
One idea: replace values by ranks; under the null every rank assignment is equally likely, so the null distribution is known combinatorially, with no distributional assumption — and outliers lose their leverage.
- Mann–Whitney / rank-sum (two independent samples, ): pool, rank, sum the ranks of one sample. Under : , , normal approximation for .
- Sign test (paired): count positive differences; under , . Crude but assumption-free.
- Wilcoxon signed-rank (paired, sharper): rank , restore signs, sum the positive ranks; , .
- Kruskal–Wallis = Mann–Whitney generalized to groups (the rank version of ANOVA): approximately.
- The surprise worth remembering: even when normality holds, rank tests lose very little power vs the t-test — and they’re far more robust when it doesn’t. For small samples they’re often simply preferable.
Core competency set
- State the one idea (equally likely rank assignments) and match each test to its design.
- Explain why rank tests are robust and what the power cost is.
12. 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.
- Score mean zero: . Fisher info three forms: ; .
- Cramér–Rao: (unbiased); equality ⟺ linear in the score.
- Worked information: (Bernoulli), (Poisson).
- MLE asymptotics: ; asymptotic CI .
- MLE invariance: is the MLE of .
- Factorization: ⟺ sufficient.
- Rao–Blackwell: never worse (via variance decomposition).
- Posterior ∝ likelihood × prior; posterior mean ↔ squared loss, median ↔ absolute loss; large-sample posterior .
- Normal–Normal: precisions add; posterior mean = precision-weighted average of and .
- α / β / power / p-value definitions; p-value uniform under ; CI–test duality.
- Neyman–Pearson: LRT most powerful for simple vs simple.
- Wilks: , = free params() − free params(); Pearson .
- Two-sample t with ; paired .
- ANOVA: ; ; Bonferroni .
- Rank-test null moments: ; sign test .
- Named moves: differentiate-the-identity (score mean zero, ); Taylor-the-score (MLE asymptotics); condition-on-sufficient (Rao–Blackwell); monotone-LR-then-threshold; add-and-subtract (ANOVA); invert-the-test (CI duality); estimated-world-as-real-world (bootstrap).