<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>A First Course in Bayesian Statistical Methods on Massimo Nocentini</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/</link><description>Recent content in A First Course in Bayesian Statistical Methods on Massimo Nocentini</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/index.xml" rel="self" type="application/rss+xml"/><item><title>Preface</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/preface/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/preface/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Peter D. Hoff’s textbook&lt;/span&gt; &lt;em&gt;A First Course in Bayesian Statistical Methods&lt;/em&gt;&lt;label for="sn-a602bb-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-a602bb-2" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; is widely admired because it turns a one-quarter graduate course into a remarkably tight, self-contained arc—bridging classical theoretical foundations&lt;label for="sn-a602bb-3" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-a602bb-3" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="bernardo1994"&gt;José M. Bernardo and Adrian F. M. Smith. &lt;cite&gt;Bayesian Theory&lt;/cite&gt;. John Wiley &amp;amp; Sons, Chichester, 1994&lt;/span&gt;&lt;/span&gt; and applied Bayesian data analysis&lt;label for="sn-a602bb-4" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-a602bb-4" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="gelman2004"&gt;Andrew Gelman, John B. Carlin, Hal S. Stern, and Donald B. Rubin. &lt;cite&gt;Bayesian Data Analysis&lt;/cite&gt;. Chapman &amp;amp; Hall/CRC, Boca Raton, FL, second edition, 2004&lt;/span&gt;&lt;/span&gt; from motivating examples in Chapter 1 and the axioms of rational belief in Chapter 2 to semiparametric Gaussian copulas for mixed ordinal data in Chapter 12, never losing sight of either mathematical clarity or hands-on simulation.&lt;/p&gt;</description></item><item><title>Notation and Conventions</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/notation/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/notation/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Consistent notation&lt;/span&gt; is half the battle when moving from scalar conjugate models in Part I to matrix-variate hierarchical and latent-variable models in Parts II and III. This reference collects Hoff’s conventions and highlights the exact translation to Python (&lt;code&gt;numpy&lt;/code&gt; / &lt;code&gt;scipy.stats&lt;/code&gt;) and R.&lt;/p&gt;&#10;&lt;figure class="tufte-table"&gt;&lt;label for="mn-cc63c8-1" class="margin-toggle"&gt;&amp;#8853;&lt;/label&gt;&lt;input type="checkbox" id="mn-cc63c8-1" class="margin-toggle"/&gt;&lt;span class="marginnote caption"&gt;&lt;span class="caption-label"&gt;Table&amp;nbsp;&lt;span class="tufte-num" data-kind="table" data-key="tab-notation-core" data-labeled="1" data-short="Core mathematical notation"&gt;2&lt;/span&gt;:&lt;/span&gt; &lt;span class="caption-text"&gt;Core mathematical notation used throughout this companion, following Hoff (2009).&lt;/span&gt;&lt;/span&gt;&lt;div class="table-wrapper"&gt;&#10;&lt;table&gt;&#10;&lt;thead&gt;&#10;&lt;tr&gt;&#10;&lt;th style="text-align: left"&gt;Symbol&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Meaning&lt;/th&gt;&#10;&lt;/tr&gt;&#10;&lt;/thead&gt;&#10;&lt;tbody&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝒴&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi mathvariant="normal"&gt;Θ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathcal{Y},\; \Theta&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Sample space of possible datasets and parameter space of possible parameter values.&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;Y,\; y&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Uppercase denotes an unknown random variable (before observation); lowercase denotes its realized numerical value.&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mover accent="true"&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;mo&gt;~&lt;/mo&gt;&lt;/mover&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mover accent="true"&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo&gt;~&lt;/mo&gt;&lt;/mover&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\tilde{Y},\; \tilde{y}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;A future (unobserved) observation drawn from the same population, governed by the predictive distribution &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mover accent="true"&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo&gt;~&lt;/mo&gt;&lt;/mover&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(\tilde{y} \mid y)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(\cdot),\; p(\cdot \mid \cdot)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Generic density or mass function, distinguished by its arguments (e.g., &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(\theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; is the prior, &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(y \mid \theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; the sampling model, &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(\theta \mid y)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; the posterior).&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;∝&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\propto&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Proportional to, as a function of the variable of interest (multiplicative constants independent of that variable are absorbed).&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝐲&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;𝐗&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{y},\; \mathbf{X}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Column vector &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝐲&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mi&gt;T&lt;/mi&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{y} = (y_1, \dots, y_n)^T&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;n \times p&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; design matrix &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝐗&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{X}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; with &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;i&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;-th row &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msubsup&gt;&lt;mi&gt;𝐱&lt;/mi&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;mi&gt;T&lt;/mi&gt;&lt;/msubsup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{x}_i^T&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mover accent="true"&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo&gt;¯&lt;/mo&gt;&lt;/mover&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;msup&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\bar{y},\; s^2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Sample mean &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mover accent="true"&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo&gt;¯&lt;/mo&gt;&lt;/mover&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/mfrac&gt;&lt;msubsup&gt;&lt;mo&gt;∑&lt;/mo&gt;&lt;mrow&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msubsup&gt;&lt;msub&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\bar{y} = \frac{1}{n}\sum_{i=1}^n y_i&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; and unbiased sample variance &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;msubsup&gt;&lt;mo&gt;∑&lt;/mo&gt;&lt;mrow&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msubsup&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mover accent="true"&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo&gt;¯&lt;/mo&gt;&lt;/mover&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;s^2 = \frac{1}{n-1}\sum_{i=1}^n (y_i - \bar{y})^2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;ϕ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta,\; \phi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Primary parameter of interest (often a mean or rate) and generic full parameter vector (e.g., &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ϕ&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\phi = (\theta, \sigma^2)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt; or natural parameter in an exponential family.&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mover accent="true"&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mo&gt;~&lt;/mo&gt;&lt;/mover&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;msup&gt;&lt;mover accent="true"&gt;&lt;mi&gt;τ&lt;/mi&gt;&lt;mo&gt;~&lt;/mo&gt;&lt;/mover&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;τ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\tilde{\sigma}^2 = 1/\sigma^2,\; \tilde{\tau}^2 = 1/\tau^2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Precision (inverse variance); in normal models, precisions add directly. (Context always distinguishes precision tildes from predictive &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mover accent="true"&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;mo&gt;~&lt;/mo&gt;&lt;/mover&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\tilde{Y}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; non-centered latent variables &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mover accent="true"&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo&gt;~&lt;/mo&gt;&lt;/mover&gt;&lt;mi&gt;j&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\tilde{\theta}_j&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; and dummy integration variables &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mover accent="true"&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo&gt;~&lt;/mo&gt;&lt;/mover&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\tilde{\theta}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.)&lt;/span&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;tr&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo stretchy="false"&gt;∣&lt;/mo&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mo stretchy="false"&gt;∣&lt;/mo&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi mathvariant="normal"&gt;etr&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{tr}(A),\; \lvert A \rvert,\; \operatorname{etr}(A)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Matrix trace &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mo&gt;∑&lt;/mo&gt;&lt;mi&gt;j&lt;/mi&gt;&lt;/msub&gt;&lt;msub&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;j&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;j&lt;/mi&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\sum_j A_{j,j}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; determinant &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;det&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\det(A)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; and exponential trace &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;exp&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;tr&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\exp(\operatorname{tr}(A))&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Φ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;msup&gt;&lt;mi mathvariant="normal"&gt;Φ&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\Phi(\cdot),\; \Phi^{-1}(\cdot)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;Standard normal CDF and its inverse (quantile function).&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;ϕ&lt;/mi&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;msub&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mtext&gt;eff&lt;/mtext&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\phi^{(s)},\; S,\; S_{\text{eff}}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;State at iteration &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;s&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; of a Monte Carlo or MCMC sampler, total number of draws, and effective sample size.&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;z&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mi&gt;j&lt;/mi&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;msub&gt;&lt;mi mathvariant="normal"&gt;Σ&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;z_{-j},\; \Sigma_{b,a}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;All elements of &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;z&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;z&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; except index &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;j&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;j&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt; submatrix of &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Σ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\Sigma&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; with rows indexed by &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; and columns by &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;a&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&lt;/figure&gt;&lt;p&gt;Three parameterization conventions cause the vast majority of bugs when implementing Hoff’s formulas in code. Keep them in mind whenever you translate an equation into &lt;code&gt;numpy&lt;/code&gt; or &lt;code&gt;scipy.stats&lt;/code&gt;:&lt;label for="sn-cc63c8-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-cc63c8-2" class="margin-toggle"/&gt;&lt;span class="sidenote"&gt;For complete density formulas, moments, and conjugate tables, see &lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/appendix-a-distributions/"&gt;Appendix&amp;nbsp;A&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Mathematical &amp; Probabilistic Prerequisites</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/prerequisites/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/prerequisites/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Every chapter of Hoff’s course&lt;/span&gt; rests on five compact mathematical pillars: iterated expectation and Jensen’s inequality, kernel recognition via Bayes’ rule, change-of-variables calculus with special functions, positive-definite linear algebra, and the ergodic theory of Monte Carlo and Markov chains. While &lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/notation/"&gt;Notation and Conventions&lt;/a&gt; catalogues symbols and parameterization conventions and &lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/appendix-a-distributions/"&gt;Appendix&amp;nbsp;A&lt;/a&gt; and &lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/appendix-b-toolkit/"&gt;Appendix&amp;nbsp;B&lt;/a&gt; serve as quick-reference sheets, this introductory chapter &lt;em&gt;derives&lt;/em&gt; each prerequisite from first principles and verifies it symbolically and numerically in the Wolfram Language (&lt;code&gt;wolfram-ws-bridge&lt;/code&gt; JavaScript mode).&lt;label for="sn-aef85b-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-aef85b-1" class="margin-toggle"/&gt;&lt;span class="sidenote"&gt;All eleven working examples below are collected in &lt;code&gt;wolfram_prereqs.mjs&lt;/code&gt; and were evaluated live against the Wolfram kernel with zero &lt;code&gt;console.log&lt;/code&gt; calls—each symbolic derivation and numerical instantiation appears as a KaTeX equation directly beneath its &lt;code&gt;await show&lt;/code&gt; call.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>List of Figures</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/list-of-figures/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/list-of-figures/</guid></item><item><title>List of Tables</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/list-of-tables/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/list-of-tables/</guid></item><item><title>List of Theorems and Definitions</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/list-of-theorems/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/list-of-theorems/</guid></item><item><title>Introduction and Examples</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-1/01-introduction/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-1/01-introduction/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Bayesian statistical inference&lt;/span&gt; begins with a deceptively simple shift in viewpoint: probability does not apply only to repeatable physical coin flips; it is a coherent numerical language for quantifying &lt;em&gt;uncertainty&lt;/em&gt; about any unknown quantity—including a fixed but unknown population parameter &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;label for="sn-7680cc-3" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-7680cc-3" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; When new data &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;y&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; arrive, Bayes’ rule tells us how our state of uncertainty should update, turning prior beliefs into posterior beliefs.&lt;/p&gt;</description></item><item><title>Belief, Probability, and Exchangeability</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-1/02-belief-probability-exchangeability/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-1/02-belief-probability-exchangeability/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Before computing posteriors&lt;/span&gt;, we must answer two foundational questions: &lt;em&gt;Why&lt;/em&gt; should degrees of rational belief obey the mathematical axioms of probability? And &lt;em&gt;why&lt;/em&gt; do Bayesian statisticians write down conditionally i.i.d. sampling models &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo&gt;&lt;mover&gt;&lt;mo&gt;&lt;mo&gt;∼&lt;/mo&gt;&lt;/mo&gt;&lt;mtext&gt;i.i.d.&lt;/mtext&gt;&lt;/mover&gt;&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;Y_1, \dots, Y_n \mid \theta \stackrel{\text{i.i.d.}}{\sim} p(y \mid \theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; with a prior &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(\theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;?&lt;/span&gt; Chapter 2 of Hoff&lt;label for="sn-5070f2-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-5070f2-2" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; answers the first through belief axioms and the second through Bruno de Finetti’s representation theorem.&lt;/p&gt;</description></item><item><title>One-Parameter Models</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-1/03-one-parameter-models/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-1/03-one-parameter-models/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;One-parameter models&lt;/span&gt; provide the cleanest laboratory for mastering the mechanics of Bayesian inference: sufficient statistics, conjugate updating by kernel recognition, posterior predictive distributions, credible intervals, and the unifying theory of exponential families.&lt;label for="sn-cb2379-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-cb2379-2" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;Let &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo&gt;&lt;mover&gt;&lt;mo&gt;&lt;mo&gt;∼&lt;/mo&gt;&lt;/mo&gt;&lt;mtext&gt;i.i.d.&lt;/mtext&gt;&lt;/mover&gt;&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;binary&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;Y_1, \dots, Y_n \mid \theta \stackrel{\text{i.i.d.}}{\sim} \operatorname{binary}(\theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; where &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;mo stretchy="false"&gt;[&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy="false"&gt;]&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta \in [0, 1]&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; is a population proportion (for instance, the fraction of women aged 65+ in the 1998 GSS reporting general happiness: &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;129&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;n = 129&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;∑&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;118&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\sum y_i = 118&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;).&lt;/span&gt; The joint sampling probability is&lt;/p&gt;</description></item><item><title>Monte Carlo Approximation</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-1/04-monte-carlo/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-1/04-monte-carlo/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Closed-form formulas&lt;/span&gt; only carry us so far. Even with conjugate posteriors, computing &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;Pr&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\Pr(\theta_1 &amp;gt; \theta_2 \mid y)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; finding the posterior distribution of a nonlinear transformation such as the log-odds &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;γ&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;log&lt;/mi&gt;&lt;mo rspace="0.1667em"&gt;⁡&lt;/mo&gt;&lt;mfrac&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\gamma = \log\frac{\theta}{1-\theta}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; or ratio &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;msub&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta_1 / \theta_2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; or evaluating a goodness-of-fit test statistic quickly leads to awkward multidimensional integrals or doubly infinite sums. &lt;strong&gt;Monte Carlo approximation&lt;/strong&gt;&lt;span class="index-anchor" data-index="Monte Carlo approximation"&gt;&lt;/span&gt; replaces analytical integration with a single universal recipe: draw random samples from the posterior and compute empirical averages.&lt;label for="sn-8b786b-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-8b786b-2" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;; and &lt;span class="bib-entry" data-cite="robert2004"&gt;Christian P. Robert and George Casella. &lt;cite&gt;Monte Carlo Statistical Methods&lt;/cite&gt;. Springer, New York, second edition, 2004&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The Normal Model</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/05-normal-model/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/05-normal-model/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;The normal distribution&lt;/span&gt; is the workhorse of continuous-data modeling—not because real-world populations are literally Gaussian, but because the Central Limit Theorem pushes averages toward normality and because a normal model depends only on first and second moments.&lt;label for="sn-22a691-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-22a691-1" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; Chapter 5 marks a decisive step up in complexity: for the first time we have &lt;strong&gt;two unknown parameters&lt;/strong&gt;, the population mean &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;mi&gt;ℝ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta \in \mathbb{R}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; and variance &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\sigma^2 &amp;gt; 0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; forcing us to confront joint priors, marginalization, and the exact trade-off between bias and variance.&lt;/p&gt;</description></item><item><title>Posterior Approximation with the Gibbs Sampler</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/06-gibbs-sampler/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/06-gibbs-sampler/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;The moment we relax&lt;/span&gt; the artificial prior coupling &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Var&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;msub&gt;&lt;mi&gt;κ&lt;/mi&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{Var}(\theta \mid \sigma^2) = \sigma^2/\kappa_0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; from &lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/05-normal-model/"&gt;Chapter&amp;nbsp;5&lt;/a&gt; and specify independent priors &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(\theta, \sigma^2) = p(\theta)\,p(\sigma^2)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; the joint posterior &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(\theta, \sigma^2 \mid y)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; loses its closed form. Yet its &lt;em&gt;conditional&lt;/em&gt; distributions—&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(\theta \mid \sigma^2, y)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(\sigma^2 \mid \theta, y)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;—remain completely standard! Chapter 6 introduces the &lt;strong&gt;Gibbs sampler&lt;/strong&gt;&lt;span class="index-anchor" data-index="Gibbs sampler"&gt;&lt;/span&gt;&lt;label for="sn-721c7c-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-721c7c-2" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="geman1984"&gt;Stuart Geman and Donald Geman. Stochastic Relaxation, Gibbs Distributions, and the Bayesian Restoration of Images. &lt;cite&gt;IEEE Transactions on Pattern Analysis and Machine Intelligence&lt;/cite&gt;, 6:721–741, 1984&lt;/span&gt;; &lt;span class="bib-entry" data-cite="gelfand1990"&gt;Alan E. Gelfand and Adrian F. M. Smith. Sampling-Based Approaches to Calculating Marginal Densities. &lt;cite&gt;Journal of the American Statistical Association&lt;/cite&gt;, 85(410):398–409, 1990&lt;/span&gt;; and &lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;, our first **Markov chain Monte Carlo (MCMC)**&lt;span class="index-anchor" data-index="MCMC"&gt;&lt;/span&gt; algorithm, which turns a sequence of tractable full conditional draws into dependent samples from an intractable joint posterior.&lt;/p&gt;</description></item><item><title>The Multivariate Normal Model</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/07-multivariate-normal/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/07-multivariate-normal/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Real measurements rarely arrive in isolation.&lt;/span&gt; A student takes a reading exam before and after instruction; a patient has glucose, blood pressure, skin thickness, and BMI recorded simultaneously. Treating each coordinate with a separate univariate normal model throws away the &lt;strong&gt;covariance structure&lt;/strong&gt;—the very information that lets us test paired differences, quantify conditional relationships, and impute missing observations.&lt;label for="sn-a5ecb7-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-a5ecb7-1" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; Chapter 7 generalizes every ingredient of Chapters 5 and 6 from scalars to vectors and positive-definite matrices.&lt;/p&gt;</description></item><item><title>Group Comparisons and Hierarchical Modeling</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/08-hierarchical-modeling/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/08-hierarchical-modeling/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Whenever data come in groups&lt;/span&gt;—students nested inside schools, patients nested inside hospitals, or baseball players across a league—two naive extremes tempt the analyst. &lt;strong&gt;No pooling&lt;/strong&gt; fits each group completely separately, leaving small groups noisy and erratic. &lt;strong&gt;Complete pooling&lt;/strong&gt; lumps all groups into one common mean, erasing genuine differences between groups. Chapter 8 resolves this tension cleanly through &lt;strong&gt;hierarchical modeling&lt;/strong&gt;&lt;span class="index-anchor" data-index="hierarchical model"&gt;&lt;/span&gt;&lt;label for="sn-8c14d8-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-8c14d8-2" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;; &lt;span class="bib-entry" data-cite="lindley1972"&gt;Dennis V. Lindley and Adrian F. M. Smith. Bayes Estimates for the Linear Model. &lt;cite&gt;Journal of the Royal Statistical Society, Series B&lt;/cite&gt;, 34:1–41, 1972&lt;/span&gt;; and &lt;span class="bib-entry" data-cite="gelman2007"&gt;Andrew Gelman and Jennifer Hill. &lt;cite&gt;Data Analysis Using Regression and Multilevel/Hierarchical Models&lt;/cite&gt;. Cambridge University Press, New York, 2007&lt;/span&gt;&lt;/span&gt;, where groups share information smoothly (&lt;strong&gt;partial pooling&lt;/strong&gt;) in direct proportion to their sample sizes and between-group variance.&lt;/p&gt;</description></item><item><title>Linear Regression</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/09-linear-regression/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/09-linear-regression/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Regression asks a conditional question:&lt;/span&gt; how does the distribution of &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;Y&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; change as &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝐱&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{x}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; changes? Up to now every observation in a group shared the same mean. Here each observation carries its own mean, tied to the others through a short coefficient vector &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝜷&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\boldsymbol{\beta}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;label for="sn-04503d-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-04503d-2" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; The Bayesian treatment of &lt;em&gt;estimation&lt;/em&gt; turns out to be the multivariate normal update of &lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/07-multivariate-normal/"&gt;Chapter&amp;nbsp;7&lt;/a&gt; in a new costume. The genuinely new idea is what comes next: treating &lt;em&gt;which variables belong in the model&lt;/em&gt; as one more unknown with a posterior distribution.&lt;/p&gt;</description></item><item><title>Nonconjugate Priors and Metropolis–Hastings</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/10-metropolis-hastings/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/10-metropolis-hastings/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;The Gibbs sampler needs&lt;/span&gt; every full conditional to be a distribution we can sample. Change the sampling model from normal to Poisson, or let a correlation parameter enter a covariance matrix, and that requirement fails. The &lt;strong&gt;Metropolis–Hastings algorithm&lt;/strong&gt; asks for far less: the ability to &lt;em&gt;evaluate&lt;/em&gt; the posterior density up to a constant.&lt;label for="sn-e08a89-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-e08a89-1" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="metropolis1953"&gt;Nicholas Metropolis, Arianna W. Rosenbluth, Marshall N. Rosenbluth, Augusta H. Teller, and Edward Teller. Equation of State Calculations by Fast Computing Machines. &lt;cite&gt;Journal of Chemical Physics&lt;/cite&gt;, 21(6):1087–1092, 1953&lt;/span&gt;; and &lt;span class="bib-entry" data-cite="hastings1970"&gt;W. Keith Hastings. Monte Carlo Sampling Methods Using Markov Chains and Their Applications. &lt;cite&gt;Biometrika&lt;/cite&gt;, 57:97–109, 1970&lt;/span&gt;&lt;/span&gt; This chapter derives it from a counting argument, proves that it works, and shows that the Gibbs sampler of &lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/06-gibbs-sampler/"&gt;Chapter&amp;nbsp;6&lt;/a&gt; was a special case all along.&lt;/p&gt;</description></item><item><title>Linear and Generalized Linear Mixed Effects Models</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/11-mixed-effects/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/11-mixed-effects/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Mixed effects models&lt;/span&gt; are the natural marriage of hierarchical shrinkage (&lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/08-hierarchical-modeling/"&gt;Chapter&amp;nbsp;8&lt;/a&gt;), multivariate normal covariance modeling (&lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-2/07-multivariate-normal/"&gt;Chapter&amp;nbsp;7&lt;/a&gt;), regression (&lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/09-linear-regression/"&gt;Chapter&amp;nbsp;9&lt;/a&gt;), and Metropolis–Hastings (&lt;a class="xref" href="https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/10-metropolis-hastings/"&gt;Chapter&amp;nbsp;10&lt;/a&gt;).&lt;label for="sn-d4ecf1-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-d4ecf1-1" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;; and &lt;span class="bib-entry" data-cite="gelman2007"&gt;Andrew Gelman and Jennifer Hill. &lt;cite&gt;Data Analysis Using Regression and Multilevel/Hierarchical Models&lt;/cite&gt;. Cambridge University Press, New York, 2007&lt;/span&gt;&lt;/span&gt; Instead of allowing only a scalar group mean &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mi&gt;j&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta_j&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; to vary across schools or subjects, we now let an entire &lt;strong&gt;regression coefficient vector&lt;/strong&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;𝜷&lt;/mi&gt;&lt;mi&gt;j&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;ℝ&lt;/mi&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\boldsymbol{\beta}_j \in \mathbb{R}^p&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;—both intercepts &lt;em&gt;and&lt;/em&gt; slopes—vary across groups while borrowing strength across the population.&lt;/p&gt;</description></item><item><title>Latent Variable Methods for Ordinal Data</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/12-latent-ordinal-copula/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/part-3/12-latent-ordinal-copula/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Many measurements in the social and biomedical sciences&lt;/span&gt; are &lt;strong&gt;ordinal&lt;/strong&gt; rather than truly metric: education level (no degree &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;&amp;lt;&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; high school &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;&amp;lt;&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; associate’s &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;&amp;lt;&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; bachelor’s &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;&amp;lt;&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; graduate), survey agreement scales (&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; to &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;5&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;5&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;),&lt;/span&gt; or binned income brackets. Treating “bachelor’s degree = 4” as twice “high school = 2” in a normal linear model imposes arbitrary arithmetic distances that do not exist in the data! Chapter 12 shows how &lt;strong&gt;latent Gaussian variables&lt;/strong&gt;&lt;span class="index-anchor" data-index="latent variable"&gt;&lt;/span&gt; let us bring all of our multivariate normal and regression machinery to ordinal, skewed, and mixed discrete–continuous datasets without forcing any parametric assumption on the marginal scales.&lt;label for="sn-7076f4-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-7076f4-2" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Probability Distributions and Conjugate Atlas</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/appendix-a-distributions/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/appendix-a-distributions/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Translating Bayesian derivations into bug-free code&lt;/span&gt; hinges on matching mathematical parameterizations to software libraries. This appendix collects every probability distribution used in Hoff&lt;label for="sn-046350-5" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-046350-5" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;, aligns its exact notation across Hoff, &lt;code&gt;numpy&lt;/code&gt;, and &lt;code&gt;scipy.stats&lt;/code&gt;, and summarizes all conjugate and semiconjugate updating rules from Chapters 3 through 9.&lt;/p&gt;&#10;&lt;figure class="tufte-table"&gt;&lt;label for="mn-046350-1" class="margin-toggle"&gt;&amp;#8853;&lt;/label&gt;&lt;input type="checkbox" id="mn-046350-1" class="margin-toggle"/&gt;&lt;span class="marginnote caption"&gt;&lt;span class="caption-label"&gt;Table&amp;nbsp;&lt;span class="tufte-num" data-kind="table" data-key="tab-appa-discrete" data-labeled="1" data-short="Discrete distributions"&gt;A.1&lt;/span&gt;:&lt;/span&gt; &lt;span class="caption-text"&gt;Discrete distributions in Hoff (2009) and their exact Python parameterizations.&lt;/span&gt;&lt;/span&gt;&lt;div class="table-wrapper"&gt;&#10;&lt;table&gt;&#10;&lt;thead&gt;&#10;&lt;tr&gt;&#10;&lt;th style="text-align: left"&gt;Distribution&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Support&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Mass Function &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(y)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Mean &amp;amp; Variance&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Python (&lt;code&gt;scipy.stats&lt;/code&gt; / &lt;code&gt;numpy&lt;/code&gt;)&lt;/th&gt;&#10;&lt;/tr&gt;&#10;&lt;/thead&gt;&#10;&lt;tbody&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;binary&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{binary}(\theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;{&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy="false"&gt;}&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\{0, 1\}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta^y (1 - \theta)^{1 - y}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\;\theta(1-\theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;bernoulli(p=theta)&lt;/code&gt; / &lt;code&gt;rng.binomial(1, theta)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;binomial&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{binomial}(n, \theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;{&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo stretchy="false"&gt;}&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\{0, \dots, n\}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;mo fence="true"&gt;(&lt;/mo&gt;&lt;mfrac linethickness="0px"&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mfrac&gt;&lt;mo fence="true"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;msup&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\binom{n}{y}\theta^y(1-\theta)^{n-y}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;n\theta&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\;n\theta(1-\theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;binom(n, p=theta)&lt;/code&gt; / &lt;code&gt;rng.binomial(n, theta)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Poisson&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{Poisson}(\theta)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;{&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mo stretchy="false"&gt;}&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\{0, 1, 2, \dots\}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/msup&gt;&lt;msup&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo stretchy="false"&gt;!&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta^y e^{-\theta} / y!&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\;\theta&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;poisson(mu=theta)&lt;/code&gt; / &lt;code&gt;rng.poisson(theta)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;neg-bin&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{neg-bin}(a, b)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; (Hoff)&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;{&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mtext&gt; &lt;/mtext&gt;&lt;mo stretchy="false"&gt;}&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\{0, 1, 2, \dots\}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Γ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Γ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;Γ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;(&lt;/mo&gt;&lt;mfrac&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;msup&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;)&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/msup&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;(&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;msup&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;)&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\frac{\Gamma(a+y)}{\Gamma(y+1)\Gamma(a)}\bigl(\frac{b}{b+1}\bigr)^a\bigl(\frac{1}{b+1}\bigr)^y&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\frac{a}{b}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mfrac&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\;\frac{a}{b}\frac{b+1}{b}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;nbinom(n=a, p=b/(b+1))&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&lt;/figure&gt;&lt;figure class="tufte-table"&gt;&lt;label for="mn-046350-2" class="margin-toggle"&gt;&amp;#8853;&lt;/label&gt;&lt;input type="checkbox" id="mn-046350-2" class="margin-toggle"/&gt;&lt;span class="marginnote caption"&gt;&lt;span class="caption-label"&gt;Table&amp;nbsp;&lt;span class="tufte-num" data-kind="table" data-key="tab-appa-continuous" data-labeled="1" data-short="Continuous scalar distributions"&gt;A.2&lt;/span&gt;:&lt;/span&gt; &lt;span class="caption-text"&gt;Continuous univariate distributions in Hoff (2009) and their exact Python parameterizations.&lt;/span&gt;&lt;/span&gt;&lt;div class="table-wrapper"&gt;&#10;&lt;table&gt;&#10;&lt;thead&gt;&#10;&lt;tr&gt;&#10;&lt;th style="text-align: left"&gt;Distribution&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Support&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Density &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;p(x)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Mean &amp;amp; Variance&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Python (&lt;code&gt;scipy.stats&lt;/code&gt; / &lt;code&gt;numpy&lt;/code&gt;)&lt;/th&gt;&#10;&lt;/tr&gt;&#10;&lt;/thead&gt;&#10;&lt;tbody&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;beta&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{beta}(a, b)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;(0, 1)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Γ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Γ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;Γ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;msup&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)} x^{a-1}(1-x)^{b-1}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\frac{a}{a+b}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\;\frac{ab}{(a+b)^2(a+b+1)}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;beta(a, b)&lt;/code&gt; / &lt;code&gt;rng.beta(a, b)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;gamma&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{gamma}(a, b)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; (rate &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;∞&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;(0, \infty)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;msup&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/msup&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Γ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;msup&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;msup&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\frac{b^a}{\Gamma(a)} x^{a-1} e^{-bx}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\frac{a}{b}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mfrac&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\;\frac{a}{b^2}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;gamma(a=a, scale=1/b)&lt;/code&gt; / &lt;code&gt;rng.gamma(a, 1/b)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;inv-gamma&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{inv-gamma}(a, b)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;∞&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;(0, \infty)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;msup&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/msup&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Γ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;msup&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;msup&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\frac{b^a}{\Gamma(a)} x^{-(a+1)} e^{-b/x}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\frac{b}{a-1}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; (&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;a&amp;gt;1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;),&lt;/span&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mfrac&gt;&lt;msup&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\;\frac{b^2}{(a-1)^2(a-2)}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; (&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;a&amp;gt;2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;invgamma(a=a, scale=b)&lt;/code&gt; or &lt;code&gt;1 / rng.gamma(a, 1/b)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;normal&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{normal}(\theta, \sigma^2)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ℝ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbb{R}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mspace width="0.1667em"/&gt;&lt;mi&gt;exp&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;(&lt;/mo&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;(2\pi\sigma^2)^{-1/2}\exp\bigl(-\frac{(x-\theta)^2}{2\sigma^2}\bigr)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;θ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\theta&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\;\sigma^2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;norm(loc=theta, scale=sigma)&lt;/code&gt; / &lt;code&gt;rng.normal(theta, sigma)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;μ&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;t_\nu(\mu, \sigma^2)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ℝ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbb{R}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;∝&lt;/mo&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;[&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;μ&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;msup&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;]&lt;/mo&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\propto \bigl[1 + \frac{(x-\mu)^2}{\nu\sigma^2}\bigr]^{-(\nu+1)/2}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;μ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mu&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; (&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\nu&amp;gt;1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;),&lt;/span&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mfrac&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mrow&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;msup&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\;\frac{\nu}{\nu-2}\sigma^2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; (&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\nu&amp;gt;2&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;t(df=nu, loc=mu, scale=sigma)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&lt;/figure&gt;&lt;figure class="tufte-table"&gt;&lt;label for="mn-046350-3" class="margin-toggle"&gt;&amp;#8853;&lt;/label&gt;&lt;input type="checkbox" id="mn-046350-3" class="margin-toggle"/&gt;&lt;span class="marginnote caption"&gt;&lt;span class="caption-label"&gt;Table&amp;nbsp;&lt;span class="tufte-num" data-kind="table" data-key="tab-appa-matrix" data-labeled="1" data-short="Multivariate and matrix distributions"&gt;A.3&lt;/span&gt;:&lt;/span&gt; &lt;span class="caption-text"&gt;Multivariate and matrix-variate distributions in Hoff (2009). Note that multivariate_normal takes the covariance matrix Sigma (unlike scalar norm, which takes standard deviation), and invwishart takes S0 directly rather than S0 inverse.&lt;/span&gt;&lt;/span&gt;&lt;div class="table-wrapper"&gt;&#10;&lt;table&gt;&#10;&lt;thead&gt;&#10;&lt;tr&gt;&#10;&lt;th style="text-align: left"&gt;Distribution&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Support&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Density Kernel&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Mean&lt;/th&gt;&#10;&lt;th style="text-align: left"&gt;Python (&lt;code&gt;scipy.stats&lt;/code&gt; / &lt;code&gt;numpy&lt;/code&gt;)&lt;/th&gt;&#10;&lt;/tr&gt;&#10;&lt;/thead&gt;&#10;&lt;tbody&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;𝒩&lt;/mi&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;𝜽&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;Σ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathcal{N}_p(\boldsymbol{\theta}, \Sigma)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mi&gt;ℝ&lt;/mi&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbb{R}^p&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;∣&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;Σ&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;∣&lt;/mo&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mspace width="0.1667em"/&gt;&lt;mi&gt;exp&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;(&lt;/mo&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;𝐲&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;𝜽&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mi&gt;T&lt;/mi&gt;&lt;/msup&gt;&lt;msup&gt;&lt;mi mathvariant="normal"&gt;Σ&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;𝐲&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;𝜽&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\lvert \Sigma \rvert^{-1/2}\exp\bigl(-\frac{1}{2}(\mathbf{y}-\boldsymbol{\theta})^T \Sigma^{-1}(\mathbf{y}-\boldsymbol{\theta})\bigr)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝜽&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\boldsymbol{\theta}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;multivariate_normal(mean=theta, cov=Sigma)&lt;/code&gt; / &lt;code&gt;rng.multivariate_normal(theta, Sigma)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Wishart&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;Ψ&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{Wishart}(\nu, \Psi)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msubsup&gt;&lt;mi&gt;𝒮&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;+&lt;/mo&gt;&lt;mo lspace="0em" rspace="0em"&gt;+&lt;/mo&gt;&lt;/mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/msubsup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathcal{S}_{++}^p&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;∣&lt;/mo&gt;&lt;mi&gt;W&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;∣&lt;/mo&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mspace width="0.1667em"/&gt;&lt;mi&gt;exp&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;(&lt;/mo&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;mspace width="0.1667em"/&gt;&lt;mi mathvariant="normal"&gt;tr&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;msup&gt;&lt;mi mathvariant="normal"&gt;Ψ&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mi&gt;W&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\lvert W \rvert^{(\nu-p-1)/2}\exp\bigl(-\frac{1}{2}\operatorname{tr}(\Psi^{-1}W)\bigr)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mi mathvariant="normal"&gt;Ψ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\nu \Psi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;wishart(df=nu, scale=Psi)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;inv-Wishart&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msubsup&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msubsup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{inv-Wishart}(\nu, S_0^{-1})&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msubsup&gt;&lt;mi&gt;𝒮&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;+&lt;/mo&gt;&lt;mo lspace="0em" rspace="0em"&gt;+&lt;/mo&gt;&lt;/mrow&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/msubsup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathcal{S}_{++}^p&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo stretchy="false"&gt;∣&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;Σ&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;∣&lt;/mo&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mspace width="0.1667em"/&gt;&lt;mi&gt;exp&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;(&lt;/mo&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;mspace width="0.1667em"/&gt;&lt;mi mathvariant="normal"&gt;tr&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/msub&gt;&lt;msup&gt;&lt;mi mathvariant="normal"&gt;Σ&lt;/mi&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo fence="true" stretchy="true" minsize="1.2em" maxsize="1.2em"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\lvert \Sigma \rvert^{-(\nu+p+1)/2}\exp\bigl(-\frac{1}{2}\operatorname{tr}(S_0 \Sigma^{-1})\bigr)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mrow&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;msub&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\frac{1}{\nu - p - 1}S_0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; (&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\nu &amp;gt; p+1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/td&gt;&#10;&lt;td style="text-align: left"&gt;&lt;code&gt;invwishart(df=nu, scale=S0)&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&lt;/figure&gt;&lt;blockquote class="alert alert-warning"&gt;&#10;&lt;p class="alert-title"&gt;Warning&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;The Four Golden Coding Checks.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Scalar &lt;code&gt;norm&lt;/code&gt; / &lt;code&gt;rng.normal&lt;/code&gt; expects &lt;strong&gt;standard deviation&lt;/strong&gt; &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;σ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\sigma&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt; &lt;code&gt;multivariate_normal&lt;/code&gt; expects &lt;strong&gt;covariance&lt;/strong&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;Σ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\Sigma&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; (squared scale!).&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;gamma&lt;/code&gt; and &lt;code&gt;rng.gamma&lt;/code&gt; expect &lt;strong&gt;scale&lt;/strong&gt; &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;mtext&gt;rate&lt;/mtext&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;= 1/\text{rate}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; (&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mi mathvariant="normal"&gt;/&lt;/mi&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;1/b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;),&lt;/span&gt; whereas Hoff’s &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;gamma&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{gamma}(a, b)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; uses &lt;strong&gt;rate&lt;/strong&gt; &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;invgamma(a=a, scale=b)&lt;/code&gt; expects &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; directly (matching &lt;code&gt;1 / rng.gamma(shape=a, scale=1/b)&lt;/code&gt;).&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;invwishart(df=nu, scale=S0)&lt;/code&gt; expects &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;S_0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; directly (not &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msubsup&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msubsup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;S_0^{-1}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;),&lt;/span&gt; matching Hoff’s &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;inverse-Wishart&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;ν&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msubsup&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mrow&gt;&lt;mo lspace="0em" rspace="0em"&gt;−&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msubsup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\operatorname{inverse-Wishart}(\nu, S_0^{-1})&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>Mathematical Toolkit and Concept Map</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/appendix-b-toolkit/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/appendix-b-toolkit/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Six algebraic and probabilistic tools&lt;/span&gt; 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.&lt;/p&gt;&#10;&lt;p&gt;For a scalar precision &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;a &amp;gt; 0&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; and linear coefficient &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;mi&gt;ℝ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;b \in \mathbb{R}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Verified Errata and Parameterization Notes for Hoff (2009)</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/appendix-c-errata/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/appendix-c-errata/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Every classic textbook&lt;/span&gt; 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 &lt;em&gt;A First Course in Bayesian Statistical Methods&lt;/em&gt;&lt;label for="sn-cd17ed-2" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-cd17ed-2" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="hoff2009"&gt;Peter D. Hoff. &lt;cite&gt;A First Course in Bayesian Statistical Methods&lt;/cite&gt;. Springer Texts in Statistics. Springer, New York, 2009. ISBN 978-0-387-92299-7. &lt;span class="smallcaps"&gt;doi:&lt;/span&gt; &lt;a href="https://doi.org/10.1007/978-0-387-92407-6"&gt;10.1007/978-0-387-92407-6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;, we catalogued seven entries that commonly trip up readers implementing the formulas from scratch. All equations in this companion present the verified, corrected versions.&lt;/p&gt;</description></item><item><title>Bibliography</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/bibliography/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/bibliography/</guid></item><item><title>Index</title><link>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/general-index/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/bayesian-statistical-methods/general-index/</guid></item></channel></rss>