Skip to content

Chapter 6 Formula Sheet

Reference, not teaching. Each entry names the book’s number, states the result, and gives the condition it needs. Read the concept pages first; come back here when you are working.

Two rules generate the chapter, and one family makes them computable:

sum ruleEq 6.20  +  product ruleEq 6.22    BayesEq 6.23  Eq 6.107exponential family  closed-form inferenceconjugacy\underbrace{\text{sum rule}}_{\text{Eq 6.20}} \;+\; \underbrace{\text{product rule}}_{\text{Eq 6.22}} \;\Longrightarrow\; \underbrace{\text{Bayes}}_{\text{Eq 6.23}} \;\xrightarrow[\text{Eq 6.107}]{\text{exponential family}}\; \underbrace{\text{closed-form inference}}_{\text{conjugacy}}

Everything else is either a named distribution, a summary statistic, or a rule for transforming one distribution into another.

ObjectSymbolLives in§6.1
sample spaceΩ\Omegathe set of outcomes
event spaceA\mathcal{A}subsets of Ω\Omegathe askable questions; the power set for discrete
probabilityPPA[0,1]\mathcal{A}\to[0,1]a measure, P(Ω)=1P(\Omega)=1
target spaceT\mathcal{T}the quantity of interest
random variableXXΩT\Omega\to\mathcal{T}a function, not a variable
law / distributionPXP_XT[0,1]\mathcal{T}\to[0,1]PX1P\circ X^{-1}
PX(S)=P(XS)=P(X1(S))=P({ωΩ:X(ω)S})(6.8)P_X(S) = P(X\in S) = P\bigl(X^{-1}(S)\bigr) = P\bigl(\{\omega\in\Omega : X(\omega)\in S\}\bigr) \tag{6.8}
#ResultCondition
Eq 6.9joint P(X=xi,Y=yj)=nij/NP(X=x_i,Y=y_j) = n_{ij}/Ndiscrete
Eq 6.10, 6.11marginals ci/Nc_i/N and rj/Nr_j/Ndiscrete
Eq 6.12probabilities sum to 1discrete, finite
Eq 6.13P(Y=yjX=xi)=nij/ciP(Y=y_j\mid X=x_i) = n_{ij}/c_i — normalises columns
Eq 6.14P(X=xiY=yj)=nij/rjP(X=x_i\mid Y=y_j) = n_{ij}/r_j — normalises rows
Def 6.1pdf: f(x)0f(\mathbf{x})\geqslant0 and f=1\int f = 1 (Eq 6.15)no upper bound on ff
Eq 6.16P(aXb)=abfP(a\leqslant X\leqslant b) = \int_a^b fcontinuous
Def 6.2cdf FX(x)=P(X1x1,)F_X(\mathbf{x}) = P(X_1\leqslant x_1,\ldots) (Eq 6.17, 6.18)some cdfs have no pdf

Table 6.1, the nomenclature:

Type“point probability”“interval probability”
discreteP(X=x)P(X=x), a pmfnot applicable
continuousp(x)p(x), a pdfP(Xx)P(X\leqslant x), a cdf
p(x)=yp(x,y)orp(x,y)dy(6.20)p(\mathbf{x}) = \sum_{\mathbf{y}} p(\mathbf{x},\mathbf{y}) \quad\text{or}\quad \int p(\mathbf{x},\mathbf{y})\,\mathrm{d}\mathbf{y} \tag{6.20} p(xi)=p(x1,,xD)dxi(6.21)p(x_i) = \int p(x_1,\ldots,x_D)\,\mathrm{d}\mathbf{x}_{\setminus i} \tag{6.21} p(x,y)=p(yx)p(x)=p(xy)p(y)(6.22)p(\mathbf{x},\mathbf{y}) = p(\mathbf{y}\mid\mathbf{x})p(\mathbf{x}) = p(\mathbf{x}\mid\mathbf{y})p(\mathbf{y}) \tag{6.22} p(xy)posterior=p(yx)likelihood  p(x)priorp(y)evidence(6.23)\underbrace{p(\mathbf{x}\mid\mathbf{y})}_{\text{posterior}} = \frac{\overbrace{p(\mathbf{y}\mid\mathbf{x})}^{\text{likelihood}}\;\overbrace{p(\mathbf{x})}^{\text{prior}}}{\underbrace{p(\mathbf{y})}_{\text{evidence}}} \tag{6.23} p(y):=p(yx)p(x)dx=EX[p(yx)](6.27)p(\mathbf{y}) := \int p(\mathbf{y}\mid\mathbf{x})p(\mathbf{x})\,\mathrm{d}\mathbf{x} = \mathbb{E}_X\bigl[p(\mathbf{y}\mid\mathbf{x})\bigr] \tag{6.27}
QuantityNormalises overNotes
prior p(x)p(x)xxmust be nonzero on every plausible state
likelihood p(yx)p(y\mid x)yy, not xxnever “the likelihood of yy
evidence p(y)p(y)— (a number)expected likelihood under the prior
posterior p(xy)p(x\mid y)xxthe quantity of interest
#ResultShape / condition
Def 6.3EX[g(x)]=g(x)p(x)dx\mathbb{E}_X[g(x)] = \int g(x)p(x)\,\mathrm{d}x or g(x)p(x)\sum g(x)p(x)Eq 6.28–6.30
Eq 6.34E[ag+bh]=aE[g]+bE[h]\mathbb{E}[ag+bh] = a\mathbb{E}[g]+b\mathbb{E}[h]no independence needed
Def 6.4mean, elementwiseEq 6.31, 6.32
Def 6.5Cov[x,y]=E[(xEx)(yEy)]\operatorname{Cov}[x,y] = \mathbb{E}[(x-\mathbb{E}x)(y-\mathbb{E}y)]Eq 6.35
Eq 6.36=E[xy]E[x]E[y]= \mathbb{E}[xy]-\mathbb{E}[x]\mathbb{E}[y]
Def 6.6Cov[x,y]=E[xy]E[x]E[y]\operatorname{Cov}[\mathbf{x},\mathbf{y}] = \mathbb{E}[\mathbf{x}\mathbf{y}^\top]-\mathbb{E}[\mathbf{x}]\mathbb{E}[\mathbf{y}]^\topD×ED\times E, Eq 6.37
Def 6.7covariance matrix, Eq 6.38csymmetric, positive semidefinite
Def 6.8corr[x,y]=Cov/V[x]V[y]\operatorname{corr}[x,y] = \operatorname{Cov}/\sqrt{\mathbb{V}[x]\mathbb{V}[y]}in [1,1][-1,1], Eq 6.40
Def 6.9empirical mean and covariance, Eq 6.41, 6.42the book’s is biased (1/N1/N)
Eq 6.43V[x]=E[(xμ)2]\mathbb{V}[x] = \mathbb{E}[(x-\mu)^2]two passes, numerically safe
Eq 6.44=E[x2]E[x]2= \mathbb{E}[x^2]-\mathbb{E}[x]^2one pass, unsafe
Eq 6.45pairwise sum over N2N^2 terms == twice Eq 6.44
Eq 6.46–6.49sums; variances need the cross terms
Eq 6.50, 6.51E[Ax+b]=Aμ+b\mathbb{E}[\mathbf{A}\mathbf{x}+\mathbf{b}] = \mathbf{A}\boldsymbol{\mu}+\mathbf{b}, V=AΣA\mathbb{V} = \mathbf{A}\boldsymbol{\Sigma}\mathbf{A}^\toptakes the output’s shape
Eq 6.52Cov[x,y]=ΣA\operatorname{Cov}[\mathbf{x},\mathbf{y}] = \boldsymbol{\Sigma}\mathbf{A}^\top
Def 6.10independence: p(x,y)=p(x)p(y)p(\mathbf{x},\mathbf{y}) = p(\mathbf{x})p(\mathbf{y})Eq 6.53
Def 6.11conditional independence, Eq 6.55must hold for every z\mathbf{z}
Eq 6.57equivalently p(xy,z)=p(xz)p(x\mid y,z) = p(x\mid z)
Eq 6.59–6.61covariance as an inner product; sd is a length, correlation a cosinezero mean
p(xμ,σ2)=12πσ2exp ⁣((xμ)22σ2)(6.62)p(x\mid\mu,\sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}}\exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \tag{6.62} p(xμ,Σ)=(2π)D2Σ12exp ⁣(12(xμ)Σ1(xμ))(6.63)p(\mathbf{x}\mid\boldsymbol{\mu},\boldsymbol{\Sigma}) = (2\pi)^{-\frac D2}\lvert\boldsymbol{\Sigma}\rvert^{-\frac12}\exp\!\left(-\tfrac12(\mathbf{x}-\boldsymbol{\mu})^\top\boldsymbol{\Sigma}^{-1}(\mathbf{x}-\boldsymbol{\mu})\right) \tag{6.63}
OperationResult#
marginaliseN(μx,Σxx)\mathcal{N}(\boldsymbol{\mu}_x,\boldsymbol{\Sigma}_{xx}) — delete rows and columns6.68
conditionμx+ΣxyΣyy1(yμy)\boldsymbol{\mu}_x+\boldsymbol{\Sigma}_{xy}\boldsymbol{\Sigma}_{yy}^{-1}(\mathbf{y}-\boldsymbol{\mu}_y)6.66
ΣxxΣxyΣyy1Σyx\boldsymbol{\Sigma}_{xx}-\boldsymbol{\Sigma}_{xy}\boldsymbol{\Sigma}_{yy}^{-1}\boldsymbol{\Sigma}_{yx}6.67
multiplyC=(A1+B1)1\mathbf{C} = (\mathbf{A}^{-1}+\mathbf{B}^{-1})^{-1} — precisions add6.74
c=C(A1a+B1b)\mathbf{c} = \mathbf{C}(\mathbf{A}^{-1}\mathbf{a}+\mathbf{B}^{-1}\mathbf{b})6.75
c=N(ab,A+B)c = \mathcal{N}(\mathbf{a}\mid\mathbf{b},\mathbf{A}+\mathbf{B})6.76, 6.77
add independentN(μx+μy, Σx+Σy)\mathcal{N}(\boldsymbol{\mu}_x+\boldsymbol{\mu}_y,\ \boldsymbol{\Sigma}_x+\boldsymbol{\Sigma}_y)6.78
weighted sumN(aμx+bμy, a2Σx+b2Σy)\mathcal{N}(a\boldsymbol{\mu}_x+b\boldsymbol{\mu}_y,\ a^2\boldsymbol{\Sigma}_x+b^2\boldsymbol{\Sigma}_y)6.79
affine mapN(Aμ, AΣA)\mathcal{N}(\mathbf{A}\boldsymbol{\mu},\ \mathbf{A}\boldsymbol{\Sigma}\mathbf{A}^\top)may be singular6.88
reverse mapmean (AA)1Ay(\mathbf{A}^\top\mathbf{A})^{-1}\mathbf{A}^\top\mathbf{y} — the pseudo-inverse6.91
mix densitiesnot GaussianThm 6.12

Theorem 6.12, the mixture:

E[x]=αμ1+(1α)μ2(6.81)\mathbb{E}[x] = \alpha\mu_1+(1-\alpha)\mu_2 \tag{6.81} V[x]=ασ12+(1α)σ22within+αμ12+(1α)μ22[αμ1+(1α)μ2]2between(6.82)\mathbb{V}[x] = \underbrace{\alpha\sigma_1^2+(1-\alpha)\sigma_2^2}_{\text{within}} + \underbrace{\alpha\mu_1^2+(1-\alpha)\mu_2^2 - \bigl[\alpha\mu_1+(1-\alpha)\mu_2\bigr]^2}_{\text{between}} \tag{6.82}

an instance of the law of total variance, V[x]=EY[V[xy]]+VY[E[xy]]\mathbb{V}[x] = \mathbb{E}_Y[\mathbb{V}[x\mid y]] + \mathbb{V}_Y[\mathbb{E}[x\mid y]].

§6.5.4 sampling. If xN(0,I)\mathbf{x}\sim\mathcal{N}(\mathbf{0},\mathbf{I}) then y=Ax+μ\mathbf{y} = \mathbf{A}\mathbf{x}+\boldsymbol{\mu} has covariance AA\mathbf{A}\mathbf{A}^\top. Choose A\mathbf{A} as the Cholesky factor: it exists because covariances are symmetric positive definite, and it is triangular.

§6.6 Conjugacy and the exponential family

Section titled “§6.6 Conjugacy and the exponential family”
DistributionDensityMeanVariance
Bernoulli, Eq 6.92μx(1μ)1x\mu^x(1-\mu)^{1-x}μ\muμ(1μ)\mu(1-\mu)
Binomial, Eq 6.95(Nm)μm(1μ)Nm\binom Nm\mu^m(1-\mu)^{N-m}NμN\muNμ(1μ)N\mu(1-\mu)
Beta, Eq 6.98Γ(α+β)Γ(α)Γ(β)μα1(1μ)β1\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}\mu^{\alpha-1}(1-\mu)^{\beta-1}αα+β\frac{\alpha}{\alpha+\beta}Eq 6.99

The Beta’s four regimes: α=β=1\alpha=\beta=1 uniform; α,β<1\alpha,\beta<1 bimodal with endpoint spikes; α,β>1\alpha,\beta>1 unimodal; α=β>1\alpha=\beta>1 symmetric with mode 12\tfrac12.

Definition 6.13. A prior is conjugate for a likelihood if the posterior stays in the prior’s family. Table 6.2:

LikelihoodConjugate prior
Bernoulli, BinomialBeta
Gaussian (univariate)Gaussian / inverse Gamma
Gaussian (multivariate)Gaussian / inverse Wishart
MultinomialDirichlet
Beta(α,β)+h heads in NBeta(h+α, Nh+β)(6.104d)\text{Beta}(\alpha,\beta) + h \text{ heads in } N \Longrightarrow \operatorname{Beta}(h+\alpha,\ N-h+\beta) \tag{6.104d}

Theorem 6.14 (Fisher–Neyman). ϕ(x)\phi(\mathbf{x}) is sufficient for θ\boldsymbol{\theta} iff

p(xθ)=h(x)gθ(ϕ(x))(6.106)p(\mathbf{x}\mid\boldsymbol{\theta}) = h(\mathbf{x})\,g_{\boldsymbol{\theta}}\bigl(\phi(\mathbf{x})\bigr) \tag{6.106}

The exponential family:

p(xθ)=h(x)exp(θ,ϕ(x)A(θ))(6.107)p(\mathbf{x}\mid\boldsymbol{\theta}) = h(\mathbf{x})\exp\bigl(\langle\boldsymbol{\theta},\phi(\mathbf{x})\rangle - A(\boldsymbol{\theta})\bigr) \tag{6.107}
PieceNameRole
ϕ(x)\phi(\mathbf{x})sufficient statisticsthe only route from data to parameters
θ\boldsymbol{\theta}natural parametersunconstrained
A(θ)A(\boldsymbol{\theta})log-partition functionnormalises; A/θ=E[ϕ]\partial A/\partial\boldsymbol{\theta} = \mathbb{E}[\phi]
h(x)h(\mathbf{x})base measureparameter-free
Distributionϕ\phiθ\thetaA(θ)A(\theta)
Gaussian, Ex 6.13(x,x2)(x, x^2)(μ/σ2, 1/(2σ2))\bigl(\mu/\sigma^2,\ -1/(2\sigma^2)\bigr)
Bernoulli, Ex 6.14xxlogμ1μ\log\frac{\mu}{1-\mu}log(1+eθ)\log(1+e^\theta)
Binomialmmlogμ1μ\log\frac{\mu}{1-\mu}Nlog(1+eθ)N\log(1+e^\theta)
Beta(logμ, log(1μ))(\log\mu,\ \log(1-\mu))(α1, β1)(\alpha-1,\ \beta-1)logB(α,β)\log B(\alpha,\beta)
μ=11+exp(θ)(6.118)\mu = \frac{1}{1+\exp(-\theta)} \tag{6.118}

the sigmoid — which is why logistic regression is a Bernoulli likelihood in natural parameters. And every member has a conjugate prior by formula:

p(θγ)=hc(θ)exp ⁣([γ1γ2],[θA(θ)]Ac(γ))(6.120)p(\boldsymbol{\theta}\mid\boldsymbol{\gamma}) = h_c(\boldsymbol{\theta})\exp\!\left(\left\langle\begin{bmatrix}\gamma_1\\\gamma_2\end{bmatrix},\begin{bmatrix}\boldsymbol{\theta}\\-A(\boldsymbol{\theta})\end{bmatrix}\right\rangle - A_c(\boldsymbol{\gamma})\right) \tag{6.120}
CaseFormula#
discreteP(Y=y)=P(X=U1(y))P(Y=y) = P\bigl(X=U^{-1}(y)\bigr)no Jacobian6.125
continuous, univariatef(y)=fx(U1(y))ddyU1(y)f(y) = f_x\bigl(U^{-1}(y)\bigr)\left\lvert\frac{\mathrm{d}}{\mathrm{d}y}U^{-1}(y)\right\rvert6.143
continuous, multivariatef(y)=fx(U1(y))detyU1(y)f(\mathbf{y}) = f_x\bigl(U^{-1}(\mathbf{y})\bigr)\left\lvert\det\frac{\partial}{\partial\mathbf{y}}U^{-1}(\mathbf{y})\right\rvertThm 6.16, 6.144

Theorem 6.15 (probability integral transform). For continuous XX with a strictly monotonic cdf, Y:=FX(X)Y := F_X(X) is uniform. Run backwards, that is inverse-transform sampling.

QuantityValueWhere
Example 6.1’s pmf0.49, 0.42, 0.090.49,\ 0.42,\ 0.09§6.1
frequentist error rate1/N\propto 1/\sqrt N§6.1
power set size2Ω2^{\lvert\Omega\rvert}; 1.15×10771.15\times10^{77} at 256256§6.1
uniform on [0.9,1.6][0.9,1.6] density1.4286>11.4286 > 1§6.2
Gaussian peak at σ=0.01\sigma=0.0139.8939.89§6.2
joint entries, DD binary2D2^D; 1.27×10301.27\times10^{30} at D=100D=100§6.3
base-rate overstatement10.98×10.98\times at prevalence 0.0010.001§6.3
Eq 6.44 failure offset10910^9 returns 00 for a variance of 44§6.4
biased covariance at N=2N=2half the true variance§6.4
Example 6.6 conditionalN(0.6, 0.1)\mathcal{N}(0.6,\ 0.1) from N(0, 0.3)\mathcal{N}(0,\ 0.3)§6.5
mixture variance decompositionwithin 1.01.0, between 8.648.64, total 9.649.64§6.5
mixture excess kurtosis1.4746-1.4746 against a Gaussian’s 00§6.5
conjugate posterior size22 numbers after 100000100\,000 observations§6.6
grid posterior size200D200^D; 102310^{23} at D=10D=10§6.6
sufficiency gap2.3×10132.3\times10^{-13} between two different datasets§6.6
dA/dθ\mathrm{d}A/\mathrm{d}\theta vs sigmoid4×10114\times10^{-11}§6.6
missing Jacobianintegral 1.6471.647; shape error 0.52750.5275§6.7
mode of exp(X)\exp(X)0.36790.3679, not 11§6.7
P(bag 2mango)P(\text{bag 2}\mid\text{mango})13\tfrac13Ex 6.4
Kalman trace reduction1.12780.53341.1278 \to 0.5334Ex 6.5
SectionUsed in
§6.1 probability spacethe vocabulary for everything after
§6.2 pmf/pdf/cdf§6.7’s transforms; every likelihood in Chapters 9–12
§6.3 sum, product, BayesChapter 8’s probabilistic modelling; all inference
§6.4 mean, covarianceChapter 10’s PCA (the covariance matrix is PCA)
§6.5 GaussianChapter 9’s regression, Chapter 11’s mixtures, Kalman filters
§6.6 conjugacy, exp familyChapter 9’s Bayesian regression, Chapter 12’s losses
§6.7 change of variablesnormalising flows, reparameterised gradients
  1. Reading a density as a probability. Definition 6.1 bounds the area, not the height; 39.8939.89 is a perfectly ordinary density value.
  2. Forgetting the pre-image. Equation 6.8 sums over every outcome mapping to a state; skip it and Example 6.1’s 0.420.42 becomes 0.210.21.
  3. Transposing a conditional. Equation 6.13 normalises columns, 6.14 rows. Both look right; only the axis sums distinguish them.
  4. Confusing p(yx)p(y\mid x) with p(xy)p(x\mid y). Measured on a medical test: 0.990.99 against 0.09020.0902.
  5. Using Equation 6.44 on offset data. Returns 00 for a variance of 44 at an offset of 10910^9.
  6. Concluding independence from zero covariance. Example 6.5 is a deterministic relationship with zero covariance.
  7. Averaging component variances for a mixture. Equation 6.82’s second term was 90%90\% of the answer.
  8. Dropping the Jacobian in a change of variables, or trusting a mode across a reparameterisation.
TaskCall
joint from countsn_ij / n_ij.sum()
marginaljoint.sum(axis=k) — sum the axis you remove
conditional on XXjoint / joint.sum(axis=0)[None, :]
variance, safelynp.var(x) (two-pass internally), never mean(x**2) - mean(x)**2
unbiased variancenp.var(x, ddof=1)
covariance matrixnp.cov(X.T, bias=True) for the book’s 1/N1/N
correlationnp.corrcoef(x, y)
Gaussian conditioningmu_x + Sxy @ np.linalg.solve(Syy, y - mu_y)
sample a Gaussianz @ np.linalg.cholesky(S).T + mu
log-density, stablynp.linalg.slogdet plus np.linalg.solve, never inv
Beta functionsmath.lgamma, and work in logs
inverse-transform sampleF_inverse(rng.random(n))
pch.quizTag Check your understanding
  1. Which of the chapter's results is the computational bottleneck in probabilistic modelling?

    pch.quizShowAnswer

    B — The sum rule, Equation 6.20 — marginalising D binary variables costs 2^D terms, which is 1.27e30 at D = 100, with no known exact polynomial-time algorithm — The book flags it in a Remark. Bayes and the product rule are free; the evidence in Equation 6.27 is a high-dimensional integral, which is why variational inference and MCMC exist at all.

  2. What single property makes the Gaussian the workhorse of the chapter?

    pch.quizShowAnswer

    B — Closure: marginalising, conditioning, multiplying, adding and affine mapping all return Gaussians, each by a closed-form formula in the mean and covariance — so inference is matrix algebra rather than integration — That is why Exercise 6.5 produces the Kalman filter with no new mathematics, and why Exercise 6.12 produces Bayesian linear regression the same way.

  3. Why is conjugacy more than a convenience?

    pch.quizShowAnswer

    B — It satisfies the second desideratum: the parameter count does not grow with the data. Measured at two numbers after 100000 observations, against 200^D for a grid — 1e23 at D = 10 — And it works because multiplying exponential-family densities adds natural parameters. Pitman, Darmois and Koopman proved those are the only families with finite-dimensional sufficient statistics.

  4. You reparameterise a model from sigma to log-sigma and your MAP estimate changes. Bug or not?

    pch.quizShowAnswer

    B — Not a bug. A density's mode is not reparameterisation-invariant, because the Jacobian reweights it — measured, the mode of exp(X) is 0.3679 rather than exp(0) = 1. Quantiles, including the median, ARE invariant — Only affine reparameterisations leave the mode alone, since their Jacobian is constant. If a point estimate must survive a change of coordinates, report a posterior quantile rather than a MAP.

  5. Two datasets give identical Gaussian log-likelihoods to 2.3e-13 but look completely different. What follows?

    pch.quizShowAnswer

    B — They share the sufficient statistics — n, the sum and the sum of squares — so by Theorem 6.14 no inference about mu or sigma can distinguish them. Everything downstream of the likelihood inherits that blindness — This is the flip side of conjugacy's convenience: a fixed parameter count can absorb unbounded data precisely because the data compresses to a fixed-size summary first. Skew and multimodality are simply not in that summary.

  • Two rules generate the chapter. The sum rule (Eq 6.20) collapses an axis; the product rule (Eq 6.22) factorises a cell. Bayes (Eq 6.23) is those two rearranged.
  • The sum rule is the expensive one: 2^D terms for D binary variables, 1.27e30 at D = 100, with no known exact polynomial-time algorithm.
  • A random variable is a FUNCTION, and Eq 6.8 defines its law through the pre-image because that function can collapse outcomes.
  • A density is not a probability. Def 6.1 bounds the integral, not the height — measured 1.4286, 39.89 and 1e8 with the integral exactly 1 each time. And P(X=x) = 0 exactly for continuous X.
  • The cdf is the only one of the three that is always a probability, and some cdfs have no pdf.
  • Eq 6.13 normalises columns, Eq 6.14 rows. Assert the axis sums; a transposed conditional is invisible otherwise.
  • The likelihood is not a distribution in x. It needs the prior and the evidence to become one.
  • The evidence (Eq 6.27) is the likelihood averaged under the PRIOR, and it is the hard integral.
  • A zero prior is permanent — exactly 0.0000000000 after 400 confirming observations, silently.
  • The base-rate fallacy, measured: P(disease | +) = 0.0902 at prevalence 0.001 with a 99% test, an overstatement of 10.98x.
  • Expectation is linear (Eq 6.34) with no independence needed; covariance (Eq 6.36) measures only LINEAR dependence, so zero covariance does not imply independence.
  • Eq 6.44 is numerically unsafe: returns 0 for a variance of 4 once the data is offset by 1e9. Use Eq 6.43.
  • The book’s empirical covariance is BIASED (1/N) and it says so; at N = 2 that is half the true variance.
  • Eq 6.51’s V[Ax+b] = A Sigma A-transpose takes the OUTPUT’s shape and can be singular, hence have no density.
  • The Gaussian is closed under everything — marginalise (6.68), condition (6.66, 6.67), multiply (6.74–6.77), add (6.78), map affinely (6.88) — each in closed form.
  • Conditioning can only shrink the covariance, and not at all if the cross-covariance is zero.
  • Precisions ADD when Gaussians multiply, so a Gaussian posterior is always sharper than its prior.
  • A mixture of Gaussians is NOT Gaussian (Thm 6.12), and its variance has a between-component term that was 90% of the answer in the worked case.
  • Sample a Gaussian with the Cholesky factor: triangular, and guaranteed to exist for a covariance matrix.
  • Eq 6.107’s exponential family has sufficiency built in — the data reaches the parameters only through phi(x) — and dA/dtheta = E[phi(x)].
  • The Bernoulli’s natural parameter is the log-odds, and its inverse is the SIGMOID (Eq 6.118).
  • Conjugacy is structural: multiplying exponential-family densities adds natural parameters, so Eq 6.120 generates a conjugate prior for every member.
  • Transforming a continuous variable needs a Jacobian (Eq 6.143, Thm 6.16); dropping it is a shape error no renormalisation repairs.
  • Theorem 6.15: F_X(X) is uniform for any continuous X with a strictly monotonic cdf — moments are irrelevant. Backwards, it is inverse-transform sampling.
  • A mode is not reparameterisation-invariant; a quantile is.

Next: Probability and Distributions Overview for the chapter map, or on to Chapter 7, Continuous Optimization.

pch.coffeeTagline

pch.coffeeCta

pch.feedbackHeading

pch.feedbackSubheading