Appendix C

Verified Errata and Parameterization Notes for Hoff (2009)

Every classic textbook accumulates a handful of minor typographical slips in its first printing. While verifying every derivation and numerical calculation against the 2009 Springer printing of Peter D. Hoff’s A First Course in Bayesian Statistical MethodsPeter D. Hoff. A First Course in Bayesian Statistical Methods. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. doi: 10.1007/978-0-387-92407-6, we catalogued seven entries that commonly trip up readers implementing the formulas from scratch. All equations in this companion present the verified, corrected versions.

Table C.1: Verified typographical slips in the 2009 Springer printing of Hoff (2009) and their exact corrections.
LocationPrinted in Hoff (2009)Corrected Formula / ValueVerification Note
Ch. 3, p. 4395% HPD interval of beta⁡(3,9)\operatorname{beta}(3, 9) printed as [0.04, 0.048][0.041, 0.484] (exact [0.0406, 0.4837])Decimal typo in upper bound (0.048 instead of 0.48); density level h∗=0.5846h^* = 0.5846, width 0.44320.4432.
Ch. 3, p. 52Poisson exponential family printed as c(ϕ)=exp⁡(e−ϕ)c(\phi) = \exp(e^{-\phi}) and DY prior exp⁡(n0e−ϕ)en0t0y\exp(n_0 e^{-\phi}) e^{n_0 t_0 y}c(ϕ)=exp⁡(−eϕ)c(\phi) = \exp(-e^\phi) and p(ϕ∣n0,t0)∝exp⁡(−n0eϕ+n0t0ϕ)p(\phi \mid n_0, t_0) \propto \exp(-n_0 e^\phi + n_0 t_0 \phi)Since ϕ=log⁡θ\phi = \log\theta, e−θ=exp⁡(−eϕ)e^{-\theta} = \exp(-e^\phi); with Jacobian ∣dϕ/dθ∣=θ−1\lvert d\phi/d\theta \rvert = \theta^{-1}, this yields gamma⁡(n0t0,n0)\operatorname{gamma}(n_0 t_0, n_0).
Ch. 8, p. 135Numerator of full conditional mean of θj\theta_j printed as njy¯j/σ2+1/τ2n_j \bar{y}_j / \sigma^2 + 1 / \tau^2njy¯j/σ2+μ/τ2n_j \bar{y}_j / \sigma^2 + \mu / \tau^2Missing factor μ\mu in the printed formula; Hoff’s accompanying R code on p. 138 correctly writes mu/tau2.
Ch. 8, p. 144Rate parameter of full conditional of σ02\sigma_0^2 printed as b+12∑j=1m1/σj2b + \frac{1}{2}\sum_{j=1}^m 1/\sigma_j^2b+ν02∑j=1m1/σj2b + \frac{\nu_0}{2}\sum_{j=1}^m 1/\sigma_j^2Missing factor ν0\nu_0: since p(σj−2∣ν0,σ02)∝(σ02)ν0/2exp⁡(−ν0σ022σj−2)p(\sigma_j^{-2} \mid \nu_0, \sigma_0^2) \propto (\sigma_0^2)^{\nu_0/2}\exp\bigl(-\frac{\nu_0 \sigma_0^2}{2}\sigma_j^{-2}\bigr), the exponent collects ν02∑σj−2\frac{\nu_0}{2}\sum \sigma_j^{-2}.
Ch. 9, pp. 151, 157 & 165On p. 151, two regression lines indexed by x1=0,1x_1 = 0, 1; on p. 157, normalizer printed as ∣2πgσ2(𝐗T𝐗)−1∣−1\lvert 2\pi g\sigma^2 (\mathbf{X}^T\mathbf{X})^{-1} \rvert^{-1}; on p. 165, intermediate denominator exponent printed as (ν0+n)/2−1(\nu_0 + n)/2 - 1 (and SSR⁡gz\operatorname{SSR}_g^z missing transpose on last 𝐗z\mathbf{X}_z)Group indicator is x2∈{0,1}x_2 \in \{0, 1\} (x1≡1x_1 \equiv 1 is the intercept); determinant exponent is −1/2-1/2; denominator exponent is (ν0+n)/2(\nu_0 + n)/2Standard MVN normalizing constant is ∣2πΣ∣−1/2\lvert 2\pi\Sigma \rvert^{-1/2}; Hoff’s final boxed marginal likelihood formula on p. 165 is already correct.
Ch. 10, p. 180Text writes dpois(y_i, x_i^T beta*) in the MH acceptance ratiodpois(y_i, exp(x_i^T beta*))Poisson log-link requires θi=exp⁡(𝐱iT𝜷)\theta_i = \exp(\mathbf{x}_i^T \boldsymbol{\beta}); Hoff’s R code on the same page correctly uses exp(X %*% beta.p).
Ch. 12, p. 220R code defines the conditional regression-weight vector Sz <- Sigma[j,-j] %*% solve(Sigma[-j,-j]) on line 1, then references Sjc on lines 2–3Replace Sjc with Sz consistentlyVariable-renaming slip in the snippet computing the conditional mean and variance of Zi,jZ_{i,j} given 𝐙i,−j\mathbf{Z}_{i,-j}.

Remark C.1 (Why verifying equations against code matters). Notice that several of these slips—such as the missing μ\mu on p. 135 or the missing exp on p. 180—were already correct in Hoff’s own R code, while others (such as the missing ν0\nu_0 on p. 144) can silently bias a sampler if transcribed blindly from the printed equation! A reliable habit when studying any Bayesian algorithm is simulation-based calibration: simulate synthetic data from known ground-truth parameters (μ,τ2,ν0,σ02,𝜷)(\mu, \tau^2, \nu_0, \sigma_0^2, \boldsymbol{\beta}), run your sampler, and verify that posterior credible intervals recover the true values cleanly.