3Week 2 — Conjugate Priors and Analytical Posteriors
3.1 Overview
This week focuses on conjugate priors — special priors that yield posteriors in the same family of distributions as the prior.
Students will learn why conjugacy simplifies Bayesian inference, how to identify conjugate pairs for common likelihoods, and how to perform analytical posterior updates without simulation.
We will also introduce the concept of prior sensitivity analysis and noninformative (objective) priors.
3.2 Learning Goals
By the end of Week 2, you should be able to:
Define and identify conjugate priors for standard likelihood models.
Derive analytical posteriors for Binomial, Poisson, and Normal models.
Compute posterior summaries and predictive distributions.
Discuss the influence of priors on posterior inference.
Perform prior sensitivity analysis in R.
3.3 Lecture 1: The Concept of Conjugacy
3.3.1 1.1 Definition
A conjugate prior for a likelihood \(p(y \mid \theta)\) is a prior distribution \(p(\theta)\) such that the posterior \(p(\theta \mid y)\) belongs to the same family as the prior.
Formally: \[
p(\theta \mid y) \propto p(y \mid \theta)\, p(\theta)
\] If \(p(\theta \mid y)\) has the same functional form as \(p(\theta)\), then \(p(\theta)\) is conjugate to the likelihood.
3.3.2 1.2 Why Conjugacy Matters
Provides closed-form expressions for posterior means, variances, and credible intervals.
Facilitates sequential updating — easy to update priors as new data arrive.
Useful for educational and analytic illustration before moving to MCMC methods.
3.3.3 1.3 Examples of Conjugate Pairs
Likelihood
Conjugate Prior
Posterior Family
Binomial\((n,\theta)\)
Beta\((\alpha,\beta)\)
Beta\((\alpha+y, \beta+n-y)\)
Poisson\((\lambda)\)
Gamma\((a,b)\)
Gamma\((a+\sum y_i, b+n)\)
Normal\((\mu,\sigma^2)\) (known variance)
Normal\((\mu_0,\tau_0^2)\)
Normal\((\mu_1,\tau_1^2)\)
Exponential\((\lambda)\)
Gamma\((a,b)\)
Gamma\((a+n, b+\sum y_i)\)
Normal mean/variance (unknown \(\sigma^2\))
Normal–Inverse-Gamma
Normal–Inverse-Gamma
3.4 Lecture 2: Beta–Binomial and Gamma–Poisson Models
3.4.1 2.1 Beta–Binomial Model (Review and Generalization)
Let \(y \mid \theta \sim \text{Binomial}(n,\theta)\) and \(\theta \sim \text{Beta}(\alpha_0,\beta_0)\).
Then the posterior is: \[
\theta \mid y \sim \text{Beta}(\alpha_0 + y, \beta_0 + n - y).
\]
Predictive Probability for a Future Success:\[
p(\tilde{y}=1 \mid y) = E[\theta \mid y].
\]
Interpretation:
Each observation updates the Beta prior by adding one success or failure to the corresponding shape parameter.
3.4.2 2.2 Gamma–Poisson Model (Counts)
Suppose we model count data as \(y_i \sim \text{Poisson}(\lambda)\), with prior \(\lambda \sim \text{Gamma}(a_0, b_0)\)
(where the Gamma density is parameterized as \(p(\lambda) \propto \lambda^{a_0-1} e^{-b_0\lambda}\)).