Appendix B

Mathematical Toolkit and Concept Map

Six algebraic and probabilistic tools do almost all the heavy lifting across Hoff’s twelve chapters. Keeping them collected in one place makes every derivation in Parts I–III transparent—and the master concept map at the end shows how every chapter links into a single coherent architecture.

B.1Six Recurring Mathematical Identities

B.1.11. Completing the Square (Scalar and Vector)

For a scalar precision a>0a > 0 and linear coefficient b∈ℝb \in \mathbb{R},

−12ax2+bx=−12a(x−ba)2+b22a. -\frac{1}{2}a x^2 + b x = -\frac{1}{2}a\left(x - \frac{b}{a}\right)^2 + \frac{b^2}{2a}. (B.1)

For a symmetric positive-definite p×pp \times p precision matrix A=AT≻0A = A^T \succ 0 and vector 𝐛∈ℝp\mathbf{b} \in \mathbb{R}^p,

−12𝐱TA𝐱+𝐱T𝐛=−12(𝐱−A−1𝐛)TA(𝐱−A−1𝐛)+12𝐛TA−1𝐛. -\frac{1}{2}\mathbf{x}^T A \mathbf{x} + \mathbf{x}^T \mathbf{b} = -\frac{1}{2}(\mathbf{x} - A^{-1}\mathbf{b})^T A (\mathbf{x} - A^{-1}\mathbf{b}) + \frac{1}{2}\mathbf{b}^T A^{-1}\mathbf{b}. (B.2)

Whenever a log-conditional density equals the left-hand side of (B.2) plus a constant independent of 𝐱\mathbf{x}, we immediately read off 𝐱∼𝒩p(A−1𝐛, A−1)\mathbf{x} \sim \mathcal{N}_p(A^{-1}\mathbf{b},\, A^{-1}).

B.1.22. The Matrix Trace Trick

Because a scalar equals its own trace and tr⁡(BC)=tr⁡(CB)\operatorname{tr}(BC) = \operatorname{tr}(CB) whenever both products are square,

∑i=1n(𝐲i−𝜽)TΣ−1(𝐲i−𝜽)=∑i=1ntr⁡ ⁣((𝐲i−𝜽)(𝐲i−𝜽)TΣ−1)=tr⁡(𝐒𝜽Σ−1), \sum_{i=1}^n (\mathbf{y}_i - \boldsymbol{\theta})^T \Sigma^{-1} (\mathbf{y}_i - \boldsymbol{\theta}) = \sum_{i=1}^n \operatorname{tr}\!\left((\mathbf{y}_i - \boldsymbol{\theta})(\mathbf{y}_i - \boldsymbol{\theta})^T \Sigma^{-1}\right) = \operatorname{tr}(\mathbf{S}_{\boldsymbol{\theta}} \Sigma^{-1}), (B.3)

where 𝐒𝜽=∑i=1n(𝐲i−𝜽)(𝐲i−𝜽)T\mathbf{S}_{\boldsymbol{\theta}} = \sum_{i=1}^n (\mathbf{y}_i - \boldsymbol{\theta})(\mathbf{y}_i - \boldsymbol{\theta})^T. This identity turns the MVN likelihood into an inverse-Wishart kernel in Σ\Sigma (used in Chapter 7, Chapter 11, and Chapter 12).

B.1.33. Block Inversion and the Schur Complement

Partition a symmetric positive-definite matrix Σ\Sigma and its inverse Ω=Σ−1\Omega = \Sigma^{-1} compatibly into index sets aa and bb:

Σ=(Σa,aΣa,bΣb,aΣb,b),Σb∣a=Σb,b−Σb,aΣa,a−1Σa,b. \Sigma = \begin{pmatrix} \Sigma_{a,a} & \Sigma_{a,b} \\ \Sigma_{b,a} & \Sigma_{b,b} \end{pmatrix}, \qquad \Sigma_{b \mid a} = \Sigma_{b,b} - \Sigma_{b,a}\Sigma_{a,a}^{-1}\Sigma_{a,b}. (B.4)

The matrix Σb∣a\Sigma_{b \mid a} is the Schur complement of Σa,a\Sigma_{a,a} in Σ\Sigma. By the block LDU factorization, ∣Σ∣=∣Σa,a∣⋅∣Σb∣a∣\lvert \Sigma \rvert = \lvert \Sigma_{a,a} \rvert \cdot \lvert \Sigma_{b \mid a} \rvert, and the conditional distribution of 𝐘b∣𝐘a=𝐲a\mathbf{Y}_b \mid \mathbf{Y}_a = \mathbf{y}_a for 𝐘∼𝒩p(𝜽,Σ)\mathbf{Y} \sim \mathcal{N}_p(\boldsymbol{\theta}, \Sigma) is 𝒩(𝜽b+Σb,aΣa,a−1(𝐲a−𝜽a),  Σb∣a)\mathcal{N}\bigl(\boldsymbol{\theta}_b + \Sigma_{b,a}\Sigma_{a,a}^{-1}(\mathbf{y}_a - \boldsymbol{\theta}_a),\; \Sigma_{b \mid a}\bigr). Moreover, the precision block satisfies Ωb,b=Σb∣a−1\Omega_{b,b} = \Sigma_{b \mid a}^{-1} and Ωb,a=−Σb∣a−1Σb,aΣa,a−1\Omega_{b,a} = -\Sigma_{b \mid a}^{-1}\Sigma_{b,a}\Sigma_{a,a}^{-1}, proving immediately that 𝜷b∣a=Σb,aΣa,a−1=−Ωb,b−1Ωb,a\boldsymbol{\beta}_{b \mid a} = \Sigma_{b,a}\Sigma_{a,a}^{-1} = -\Omega_{b,b}^{-1}\Omega_{b,a}—so zeros of Ω=Σ−1\Omega = \Sigma^{-1} encode conditional independence!

B.1.44. The Woodbury Matrix Identity

For conformable invertible matrices AA and CC,

(A+UCV)−1=A−1−A−1U(C−1+VA−1U)−1VA−1. (A + U C V)^{-1} = A^{-1} - A^{-1} U (C^{-1} + V A^{-1} U)^{-1} V A^{-1}. (B.5)

This identity simplifies both marginal likelihood integrations (such as Zellner’s gg-prior in Chapter 9, where In+gX(XTX)−1XTI_n + g X(X^T X)^{-1} X^T has inverse In−gg+1X(XTX)−1XTI_n - \frac{g}{g+1} X(X^T X)^{-1} X^T) and low-rank covariance updates.

B.1.55. Inverse-CDF Sampling for Truncated Normal Distributions

To draw Z∼𝒩(μ,σ2)Z \sim \mathcal{N}(\mu, \sigma^2) restricted to an interval (a,b)(a, b) (used in ordered probit, rank likelihood, and Gaussian copulas in Chapter 12):

  1. Compute ua=Φ ⁣(a−μσ)u_a = \Phi\!\bigl(\frac{a - \mu}{\sigma}\bigr) and ub=Φ ⁣(b−μσ)u_b = \Phi\!\bigl(\frac{b - \mu}{\sigma}\bigr).
  2. Draw U∼uniform⁡(ua,ub)U \sim \operatorname{uniform}(u_a, u_b).
  3. Return Z=μ+σ Φ−1(U)Z = \mu + \sigma\,\Phi^{-1}(U).

Remark B.1 (Numerical caution in extreme tails). When both (a−μ)/σ(a - \mu)/\sigma and (b−μ)/σ(b - \mu)/\sigma exceed roughly 88, floating-point norm.cdf saturates to 1.0 and norm.ppf(1.0) returns inf. In production code, use scipy.stats.truncnorm or log-space tail approximations whenever an interval lies far in the tail.

B.1.66. Markov Chain Convergence Checklist

A Markov chain with transition kernel K(ϕ→ϕ′)K(\phi \to \phi') converges to the target posterior π(ϕ)=p(ϕ∣y)\pi(\phi) = p(\phi \mid y) as S→∞S \to \infty when three structural conditions hold:Christian P. Robert and George Casella. Monte Carlo Statistical Methods. Springer, New York, second edition, 2004

  • Stationarity (invariance): ∫π(ϕ) K(ϕ→ϕ′) dϕ=π(ϕ′)\int \pi(\phi)\,K(\phi \to \phi')\,d\phi = \pi(\phi') (automatically implied by detailed balance, π(ϕ) K(ϕ→ϕ′)=π(ϕ′) K(ϕ′→ϕ)\pi(\phi)\,K(\phi \to \phi') = \pi(\phi')\,K(\phi' \to \phi), though systematic-scan Gibbs satisfies invariance directly without reversibility).
  • Irreducibility: the chain can reach any positive-probability subset of Θ\Theta from any starting state in finitely many steps (preventing disconnected islands).
  • Aperiodicity: the chain does not cycle deterministically between disjoint regions.

B.2Master Concept Map of Hoff (2009)

Table B.1: Complete chapter-by-chapter dependency map of Hoff (2009).
Ch.Title & Core IdeaModel & PriorInference EngineFlagship Dataset(s)Builds On
1Introduction & ExamplesBinomial–Beta; sparse regressionExact conjugacy; BMA previewRare infection (n=20,y=0n=20, y=0); Diabetes (p=64p=64)—
2Belief, Probability & ExchangeabilityBelief axioms P1–P3; de FinettiExact Bayes’ rule & Bayes factorsScreening; GSS surveyCh. 1
3One-Parameter ModelsBeta–Binomial; Poisson–Gamma; Exp. familiesClosed-form conjugacy, HPDGSS happiness & birth ratesCh. 2
4Monte Carlo ApproximationArbitrary g(θ)g(\theta); predictive checksi.i.d. MC, ancestral sampling, PPCGSS log-odds & fertility PPCCh. 3
5The Normal Model𝒩(θ,σ2)\mathcal{N}(\theta, \sigma^2) + Normal–IGExact Student-tt; MSE theoremMidge wing lengths (n=9n=9); Town IQCh. 3–4
6The Gibbs SamplerSemiconjugate independent prior2-block Gibbs; ACF & SeffS_{\text{eff}}Midge data; Trimodal mixture trapCh. 4–5
7Multivariate Normal Model𝒩p(𝜽,Σ)\mathcal{N}_p(\boldsymbol{\theta}, \Sigma) + MVN/IWTrace trick; Schur MAR augmentationReading scores (n=22n=22); Pima IndiansCh. 6
8Hierarchical ModelingTwo-level exchangeable normalMulti-block Gibbs; Stein shrinkage2002 ELS math scores (m=100m=100 schools)Ch. 6
9Linear Regression𝒩n(𝐗𝜷,σ2I)\mathcal{N}_n(\mathbf{X}\boldsymbol{\beta}, \sigma^2 I) + gg-prior & spike-and-slabExact MC; collapsed Gibbs BMAOxygen uptake (n=12n=12); Diabetes (p=64p=64)Ch. 5–7
10Nonconjugate Priors & MHGLMs (Poisson, Logistic); AR(1) GLSMetropolis, MH, Metropolis-within-GibbsSparrows (n=52n=52); Ice-core CO2\text{CO}_2Ch. 6, 9
11Mixed Effects ModelsLME & Poisson GLMMModular Gibbs + MH-within-GibbsELS SES slopes; Mouse intestine tumorsCh. 7–10
12Ordinal & Copula ModelsOrdered probit; rank likelihood; Gaussian copulaData augmentation; parameter expansionSocial mobility; GSS mixed ordinal dataCh. 7, 9–11

B.2.1Recommended Study Tracks

  • Track 1 — Conceptual Core (Fastest Complete Arc): Chapters 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 → 9. Covers every foundational Bayesian principle, conjugate & Gibbs updating, multivariate covariance, hierarchical shrinkage, and regression/model averaging.
  • Track 2 — Computational MCMC Deep Dive: Chapters 4 → 5 → 6 → 7 → 9 → 10 → 12. Focuses on i.i.d. MC, Gibbs, data augmentation, Metropolis–Hastings detailed balance, and parameter expansion.
  • Track 3 — Applied Multilevel & Non-Normal Data (assuming Chapters 1–6): Chapters 7 → 8 → 9 → 10 → 11 → 12. Moves directly from multivariate covariance modeling into hierarchical shrinkage, GLMs, mixed effects, and mixed ordinal copulas.