Statistics Graduate Level Quiz: Conjugate Priors
10 questions · exam conditions
0:00
Conjugate PriorsQuestion 1 of 10

Independent event counts satisfy YiλPoisson(tiλ)Y_i\mid\lambda\sim\mathrm{Poisson}(t_i\lambda), where tit_i is exposure. The prior is λGamma(2,3)\lambda\sim\mathrm{Gamma}(2,3) under the shape-rate parameterization. The observed total count is 1414 and the total exposure is 55. For a future exposure of 22, what is the posterior predictive probability of observing no events?

(810)16\left(\frac{8}{10}\right)^{16}
(89)16\left(\frac{8}{9}\right)^{16}
(35)16\left(\frac{3}{5}\right)^{16}
exp(4)\exp(-4)
← Back to quizzes

Statistics Graduate Level Quiz

Statistics Graduate Level Quiz: Conjugate Priors

Practice Conjugate Priors in Statistics Graduate Level with focused quiz questions that help you check what you know, review explanations, and build confidence with test-style prompts.

What this quiz covers

This quiz focuses on Conjugate Priors, giving you a quick way to practice the rules, question types, and explanations that matter most for Statistics Graduate Level.

How to use this quiz

Try each quiz question before looking at the correct answer. Use the explanations to review missed ideas, then come back to similar questions until the pattern feels familiar.

All questions

Question 1

Independent event counts satisfy YiλPoisson(tiλ)Y_i\mid\lambda\sim\mathrm{Poisson}(t_i\lambda), where tit_i is exposure. The prior is λGamma(2,3)\lambda\sim\mathrm{Gamma}(2,3) under the shape-rate parameterization. The observed total count is 1414 and the total exposure is 55. For a future exposure of 22, what is the posterior predictive probability of observing no events?

  1. (810)16\left(\frac{8}{10}\right)^{16} (correct answer)
  2. (89)16\left(\frac{8}{9}\right)^{16}
  3. (35)16\left(\frac{3}{5}\right)^{16}
  4. exp(4)\exp(-4)
Explanation: When you see a Bayesian predictive problem with Poisson likelihoods and a Gamma prior, your roadmap is: update the prior, then marginalize over the posterior to get a negative binomial predictive distribution. Posterior update: With nn observations, the conjugate update gives λyGamma ⁣(α+yi,  β+ti)\lambda \mid \mathbf{y} \sim \mathrm{Gamma}\!\left(\alpha + \sum y_i,\; \beta + \sum t_i\right). Here, the shape-rate prior is Gamma(2,3)\mathrm{Gamma}(2, 3), total count is 1414, and total exposure is 55, so the posterior is Gamma(2+14,  3+5)=Gamma(16,8)\mathrm{Gamma}(2+14,\; 3+5) = \mathrm{Gamma}(16, 8). Posterior predictive for zero events: For future exposure t=2t^* = 2, the predictive probability of Y=0Y^* = 0 is: P(Y=0)=0e2λ816Γ(16)λ15e8λdλ=816Γ(16)Γ(16)(8+2)16=(810)16P(Y^*=0) = \int_0^\infty e^{-2\lambda} \cdot \frac{8^{16}}{\Gamma(16)}\lambda^{15}e^{-8\lambda}\,d\lambda = \frac{8^{16}}{\Gamma(16)}\cdot\frac{\Gamma(16)}{(8+2)^{16}} = \left(\frac{8}{10}\right)^{16} This is the MGF/Laplace transform trick: integrating gives (ββ+t)α\left(\frac{\beta}{\beta + t^*}\right)^\alpha. That confirms answer A. Why the distractors fail: Choice B uses β+t=9\beta + t^* = 9 instead of 1010, suggesting a prior rate of 44 rather than 33 — a miscalculation in the posterior update. Choice C appears to use only the MLE (λ^=14/5\hat{\lambda} = 14/5) and ignores the prior entirely, substituting it directly. Choice D, e4e^{-4}, treats the posterior mean λ^=16/8=2\hat{\lambda} = 16/8 = 2 as fixed and computes e22e^{-2 \cdot 2}, ignoring uncertainty in λ\lambda. Study tip: Always verify both parameters of the posterior Gamma — the shape collects counts, the rate collects exposures. A one-off error in either cascades through the entire predictive calculation.

Question 2

Suppose X1,,X5μX_1,\ldots,X_5\mid\mu are independent N(μ,2)N(\mu,2) variables and their sample mean is 33. The prior distribution is μN(1,4)\mu\sim N(1,4). Which distribution is the posterior distribution of μ\mu, with the second parameter denoting variance?

  1. N(3111,411)N\left(\frac{31}{11},\frac{4}{11}\right) (correct answer)
  2. N(1311,411)N\left(\frac{13}{11},\frac{4}{11}\right)
  3. N(2313,213)N\left(\frac{23}{13},\frac{2}{13}\right)
  4. N(3,25)N\left(3,\frac{2}{5}\right)
Explanation: When you see a Bayesian inference question with a normal likelihood and normal prior, your first instinct should be to apply the normal-normal conjugate update formulas. The posterior is also normal, with updated mean and variance determined by precision-weighting. Here's the setup: you have n=5n = 5 observations from N(μ,σ2)N(\mu, \sigma^2) with known variance σ2=2\sigma^2 = 2, sample mean xˉ=3\bar{x} = 3, and prior μN(μ0,τ2)=N(1,4)\mu \sim N(\mu_0, \tau^2) = N(1, 4). The posterior mean and variance formulas are: μpost=μ0τ2+nxˉσ21τ2+nσ2,σpost2=11τ2+nσ2\mu_{\text{post}} = \frac{\frac{\mu_0}{\tau^2} + \frac{n\bar{x}}{\sigma^2}}{\frac{1}{\tau^2} + \frac{n}{\sigma^2}}, \qquad \sigma^2_{\text{post}} = \frac{1}{\frac{1}{\tau^2} + \frac{n}{\sigma^2}} Plugging in: the posterior precision is 14+52=14+104=114\frac{1}{4} + \frac{5}{2} = \frac{1}{4} + \frac{10}{4} = \frac{11}{4}, giving posterior variance 411\frac{4}{11}. The posterior mean is 411(14+152)=411314=3111\frac{4}{11}\left(\frac{1}{4} + \frac{15}{2}\right) = \frac{4}{11} \cdot \frac{31}{4} = \frac{31}{11}. This confirms A is correct. B is wrong because using xˉ=1\bar{x} = 1 (the prior mean) instead of 3 in the numerator yields 1311\frac{13}{11} — a classic mix-up of prior mean and data. C uses incorrect precision values, likely from mixing up σ2\sigma^2 and nn, producing a wrong variance of 213\frac{2}{13}. D simply reports the MLE result N(3,25)N(3, \frac{2}{5}), ignoring the prior entirely — this is what you'd get with no Bayesian updating. Always derive the posterior variance first (it's simpler), then use it as a factor in computing the posterior mean to avoid arithmetic errors.

Question 3

Let X1,,X8X_1,\ldots,X_8 be independent N(μ,σ2)N(\mu,\sigma^2) observations, where μ\mu is known. Suppose i=18(Xiμ)2=20\sum_{i=1}^{8}(X_i-\mu)^2=20. The prior is inverse-gamma with density proportional to (σ2)31exp(4/σ2)(\sigma^2)^{-3-1}\exp(-4/\sigma^2). What is the posterior mean of σ2\sigma^2?

  1. 73\frac{7}{3} (correct answer)
  2. 74\frac{7}{4}
  3. 22
  4. 145\frac{14}{5}
Explanation: When you see a Bayesian estimation problem like this, your goal is to identify the posterior distribution by combining the likelihood with the prior, then read off the posterior mean. The prior here is inverse-gamma: (σ2)α01exp(β0/σ2)(\sigma^2)^{-\alpha_0-1}\exp(-\beta_0/\sigma^2), which matches Inv-Gamma(α0,β0)\text{Inv-Gamma}(\alpha_0, \beta_0) with α0=3\alpha_0 = 3 and β0=4\beta_0 = 4. The likelihood for n=8n = 8 normal observations with known μ\mu contributes a factor of (σ2)n/2exp ⁣((Xiμ)22σ2)=(σ2)4exp(10/σ2)(\sigma^2)^{-n/2}\exp\!\left(-\frac{\sum(X_i-\mu)^2}{2\sigma^2}\right) = (\sigma^2)^{-4}\exp(-10/\sigma^2), since (Xiμ)2=20\sum(X_i-\mu)^2 = 20 gives 20/2=1020/2 = 10. Multiplying prior and likelihood, the posterior is proportional to (σ2)(3+4)1exp ⁣(4+10σ2)(\sigma^2)^{-(3+4)-1}\exp\!\left(-\frac{4+10}{\sigma^2}\right), which is Inv-Gamma(αn,βn)\text{Inv-Gamma}(\alpha_n, \beta_n) with αn=3+4=7\alpha_n = 3 + 4 = 7 and βn=4+10=14\beta_n = 4 + 10 = 14. The mean of an Inv-Gamma(α,β)\text{Inv-Gamma}(\alpha, \beta) distribution is βα1\frac{\beta}{\alpha - 1}, so the posterior mean is 1471=146=73\frac{14}{7-1} = \frac{14}{6} = \frac{7}{3}, confirming answer A. Choice B, 7/47/4, mistakenly divides βn\beta_n by αn\alpha_n itself rather than αn1\alpha_n - 1. Choice C, 22, likely comes from naively dividing the sum of squares by nn: 20/8=2.520/8 = 2.5, or some similar shortcut ignoring the prior entirely. Choice D, 14/514/5, uses αn2=5\alpha_n - 2 = 5 in the denominator, confusing the mean formula with the mode formula β/(α+1)\beta/(\alpha+1). Your key memory aid: for Inv-Gamma, the posterior parameters update as αn=α0+n/2\alpha_n = \alpha_0 + n/2 and βn=β0+12(Xiμ)2\beta_n = \beta_0 + \frac{1}{2}\sum(X_i-\mu)^2, and the mean is always βn/(αn1)\beta_n/(\alpha_n - 1).

Question 4

Bernoulli trials with success probability pp are observed until the rrth success occurs. The stopping time is N=nN=n, so the observed sequence contains rr successes and nrn-r failures. If the prior is pBeta(α,β)p\sim\mathrm{Beta}(\alpha,\beta), which statement correctly describes the posterior distribution conditional on the observed stopped sequence?

  1. It is not beta because a random sample size destroys beta-binomial conjugacy after conditioning.
  2. It is Beta(α+n,β+r)\mathrm{Beta}(\alpha+n,\beta+r) because the total stopping time updates the success parameter.
  3. It is Beta(α+r,β+n)\mathrm{Beta}(\alpha+r,\beta+n) because every attempted trial updates the failure parameter.
  4. It is Beta(α+r,β+nr)\mathrm{Beta}(\alpha+r,\beta+n-r) because the stopping rule adds no factor depending on pp. (correct answer)
Explanation: When you see a Bayesian updating problem with a stopping rule, the key question is: does the stopping rule introduce any factor involving pp that wasn't already accounted for? If not, the posterior is unchanged by the rule. In the negative binomial (inverse sampling) setting, the likelihood of the observed sequence — exactly rr successes and nrn-r failures in a specific order ending in a success — is proportional to pr(1p)nrp^r(1-p)^{n-r}. The stopping rule determines which sequences are possible, but the binomial coefficient (the counting factor) doesn't depend on pp. So when you multiply the Beta prior pα1(1p)β1p^{\alpha-1}(1-p)^{\beta-1} by the likelihood, you get pα+r1(1p)β+(nr)1p^{\alpha+r-1}(1-p)^{\beta+(n-r)-1}, which is exactly Beta(α+r,β+nr)\mathrm{Beta}(\alpha+r,\,\beta+n-r). The posterior updates by adding successes to α\alpha and failures to β\beta — the same rule as in fixed-nn binomial sampling. Answer D is correct. Answer A is wrong because the stopping rule doesn't break conjugacy — it only changes the support of NN, not the functional form of the likelihood in pp. Answer B incorrectly adds the total trials nn to α\alpha, confusing total observations with successes. Answer C adds rr (successes) to β\beta and nn to α\alpha, reversing the roles of successes and failures entirely. A useful principle to remember: the posterior depends only on the likelihood's functional form in pp, not on the sampling design. This is sometimes called the likelihood principle, and it's why fixed-nn and stopped-NN sampling yield identical Beta posteriors given the same sufficient statistics (r,nr)(r, n-r).

Question 5

A binomial success probability has mixture prior 12Beta(1,1)+12Beta(10,2)\frac12\mathrm{Beta}(1,1)+\frac12\mathrm{Beta}(10,2). Two trials are observed, and both are failures. Which expression is the posterior distribution of pp?

  1. 329Beta(1,3)+2629Beta(10,4)\frac{3}{29}\mathrm{Beta}(1,3)+\frac{26}{29}\mathrm{Beta}(10,4)
  2. 12Beta(1,3)+12Beta(10,4)\frac12\mathrm{Beta}(1,3)+\frac12\mathrm{Beta}(10,4)
  3. 2629Beta(1,3)+329Beta(10,4)\frac{26}{29}\mathrm{Beta}(1,3)+\frac{3}{29}\mathrm{Beta}(10,4) (correct answer)
  4. 2629Beta(1,2)+329Beta(10,3)\frac{26}{29}\mathrm{Beta}(1,2)+\frac{3}{29}\mathrm{Beta}(10,3)
Explanation: When you see a mixture prior combined with binomial data, your key tool is Bayes' theorem applied component-wise: each Beta component updates independently via conjugacy, but the mixing weights must also be updated to reflect how likely each component made the observed data. With prior π(p)=12Beta(1,1)+12Beta(10,2)\pi(p) = \frac{1}{2}\mathrm{Beta}(1,1) + \frac{1}{2}\mathrm{Beta}(10,2) and data of 2 failures (0 successes), each Beta(α,β)(\alpha, \beta) component updates to Beta(α+0, β+2)(\alpha + 0,\ \beta + 2), giving Beta(1,3)(1,3) and Beta(10,4)(10,4) respectively. So far every answer using those updated kernels is on the right track — the real differentiator is the updated weights. The new weight for component kk is proportional to the old weight times the marginal likelihood of the data under that component: wkp(datacomponent k)w_k \cdot p(\text{data} \mid \text{component } k). For a Beta(α,β)(\alpha,\beta) prior with n=2n=2 trials and s=0s=0 successes, the marginal likelihood is B(α,β+2)/B(α,β)=β(β+1)(α+β)(α+β+1)B(\alpha, \beta+2)/B(\alpha,\beta) = \frac{\beta(\beta+1)}{(\alpha+\beta)(\alpha+\beta+1)}. Computing: component 1 gives 1223=13\frac{1\cdot2}{2\cdot3}=\frac{1}{3}, component 2 gives 231213=126\frac{2\cdot3}{12\cdot13}=\frac{1}{26}. Weighting equally: unnormalized weights are 1213=16\frac{1}{2}\cdot\frac{1}{3}=\frac{1}{6} and 12126=152\frac{1}{2}\cdot\frac{1}{26}=\frac{1}{52}. The total is 16+152=29156\frac{1}{6}+\frac{1}{52}=\frac{29}{156}, yielding posterior weights 2629\frac{26}{29} and 329\frac{3}{29}. This confirms C. Choice A reverses the weights — a classic trap of forgetting that the uniform Beta(1,1)(1,1) component assigns higher probability to low-pp outcomes (like two failures) than the Beta(10,2)(10,2) component does, so it should receive the larger posterior weight. Choice B keeps the original equal weights, ignoring the data's role in reweighting altogether. Choice D uses the correct weights but fails to properly update the Beta parameters (adding only 1 to β\beta instead of 2). Study tip: In mixture-prior problems, always update both the kernel parameters (via conjugacy) and the mixing weights (via marginal likelihoods). Forgetting either step produces a plausible-looking but wrong answer.

Question 6

A Bernoulli success probability has prior distribution pBeta(3,5)p\sim\mathrm{Beta}(3,5). After observing 77 successes in 1010 trials, two additional conditionally independent Bernoulli trials will be conducted. What is the posterior predictive probability that exactly one of the two additional trials is a success?

  1. 80171\frac{80}{171} (correct answer)
  2. 4081\frac{40}{81}
  3. 59\frac{5}{9}
  4. 80153\frac{80}{153}
Explanation: When you see a Bayesian prediction problem, your goal is to update the prior with observed data, then integrate over uncertainty in the parameter to get the predictive distribution. Your prior is Beta(3,5)\text{Beta}(3,5). After observing 7 successes in 10 trials, the posterior is Beta(3+7,5+3)=Beta(10,8)\text{Beta}(3+7, 5+3) = \text{Beta}(10, 8), with posterior mean 1018=59\frac{10}{18} = \frac{5}{9}. Now you need P(exactly 1 success in 2 trials)P(\text{exactly 1 success in 2 trials}). With two conditionally independent trials given pp, this equals 2p(1p)2p(1-p). You take the posterior expectation: P(X=1)=2E[p(1p)]=2(E[p]E[p2])P(X=1) = 2\,E[p(1-p)] = 2\bigl(E[p] - E[p^2]\bigr) For Beta(α,β)\text{Beta}(\alpha,\beta) with α=10,β=8\alpha=10, \beta=8: E[p]=1018E[p] = \frac{10}{18} and E[p2]=α(α+1)(α+β)(α+β+1)=10111819=110342E[p^2] = \frac{\alpha(\alpha+1)}{(\alpha+\beta)(\alpha+\beta+1)} = \frac{10 \cdot 11}{18 \cdot 19} = \frac{110}{342}. So: 2 ⁣(1018110342)=2 ⁣(190342110342)=280342=160342=801712\!\left(\frac{10}{18} - \frac{110}{342}\right) = 2\!\left(\frac{190}{342} - \frac{110}{342}\right) = 2 \cdot \frac{80}{342} = \frac{160}{342} = \frac{80}{171} This confirms A is correct. Choice B, 4081\frac{40}{81}, comes from mistakenly using 259492 \cdot \frac{5}{9} \cdot \frac{4}{9}, treating the posterior mean as if pp were known — ignoring posterior variance. Choice C, 59\frac{5}{9}, is just the posterior mean of pp itself, not the predictive probability for one-of-two. Choice D, 80153\frac{80}{153}, likely stems from an incorrect posterior, such as Beta(10,7)\text{Beta}(10,7), miscounting the prior failures. Study tip: Never plug in the posterior mean as a point estimate for predictive calculations — you must account for E[p2]E[p^2], where posterior variance creates a meaningful correction.

Question 7

Let θ=p/(1p)\theta=p/(1-p) denote the odds of success in a binomial model. A beta-prime prior on θ\theta has density proportional to θa1(1+θ)(a+b)\theta^{a-1}(1+\theta)^{-(a+b)}. If a=3a=3 and b=4b=4 and the data contain 55 successes in 88 trials, what is the posterior distribution of θ\theta?

  1. BetaPrime(7,8)\mathrm{BetaPrime}(7,8)
  2. BetaPrime(8,12)\mathrm{BetaPrime}(8,12)
  3. BetaPrime(5,3)\mathrm{BetaPrime}(5,3)
  4. BetaPrime(8,7)\mathrm{BetaPrime}(8,7) (correct answer)
Explanation: When working with conjugate priors on transformed parameters, your goal is to track how the likelihood updates the prior's exponents by expressing everything in a common kernel form. The beta-prime distribution with parameters (a,b)(a, b) has density proportional to θa1(1+θ)(a+b)\theta^{a-1}(1+\theta)^{-(a+b)}. Now consider the binomial likelihood in terms of the odds θ=p/(1p)\theta = p/(1-p). Since p=θ/(1+θ)p = \theta/(1+\theta), the likelihood for ss successes in nn trials becomes proportional to ps(1p)ns=θs(1+θ)np^s(1-p)^{n-s} = \theta^s(1+\theta)^{-n}. Multiplying the prior by the likelihood gives the posterior kernel: θ(a1)+s(1+θ)(a+b)+(n)=θ(a+s)1(1+θ)(a+s+b+ns)\theta^{(a-1)+s}(1+\theta)^{-(a+b)+(-n)} = \theta^{(a+s)-1}(1+\theta)^{-(a+s+b+n-s)} Wait — collecting exponents carefully: the combined exponent of (1+θ)(1+\theta) is (a+b+n)-(a+b+n). So the posterior is BetaPrime(a+s,b+ns)\mathrm{BetaPrime}(a+s,\, b+n-s). With a=3a=3, b=4b=4, s=5s=5, n=8n=8: posterior parameters are a+s=3+5=8a+s = 3+5 = 8 and b+(ns)=4+3=7b+(n-s) = 4+3 = 7, giving BetaPrime(8,7)\mathrm{BetaPrime}(8,7), which is answer D. Choice A, BetaPrime(7,8)\mathrm{BetaPrime}(7,8), reverses the two parameters — a sign you've mixed up which count updates which exponent. Choice B, BetaPrime(8,12)\mathrm{BetaPrime}(8,12), incorrectly adds the full n=8n=8 to bb rather than only the failures ns=3n-s=3. Choice C, BetaPrime(5,3)\mathrm{BetaPrime}(5,3), ignores the prior entirely, using only the data. The key study tip: always convert the likelihood into θ\theta-and-(1+θ)(1+\theta) form before pattern-matching to the conjugate kernel — successes update aa, and failures (not total trials) update bb.

Question 8

Counts from three unit-exposure periods are conditionally independent Poisson(λ)\mathrm{Poisson}(\lambda) variables. The prior is λGamma(4,2)\lambda\sim\mathrm{Gamma}(4,2) under the shape-rate parameterization, and the observed counts have sum 55. Let TT be the total count over two future unit-exposure periods. Which pair gives the posterior predictive mean and variance of TT?

  1. (185,185)\left(\frac{18}{5},\frac{18}{5}\right)
  2. (185,12625)\left(\frac{18}{5},\frac{126}{25}\right) (correct answer)
  3. (95,5425)\left(\frac{9}{5},\frac{54}{25}\right)
  4. (187,16249)\left(\frac{18}{7},\frac{162}{49}\right)
Explanation: Bayesian updating with conjugate priors is the core concept here. When you observe Poisson data with a Gamma prior, the posterior is also Gamma — and predicting future Poisson counts requires layering the posterior uncertainty over the sampling uncertainty. Posterior first. With prior λGamma(4,2)\lambda \sim \mathrm{Gamma}(4, 2) (shape α=4\alpha=4, rate β=2\beta=2) and n=3n=3 observations summing to s=5s=5, the conjugate update gives λxGamma(α+s,β+n)=Gamma(9,5)\lambda \mid \mathbf{x} \sim \mathrm{Gamma}(\alpha + s,\, \beta + n) = \mathrm{Gamma}(9, 5). The posterior mean is 9/59/5 and variance is 9/259/25. Predictive distribution for TT. For m=2m=2 future unit-exposure periods, TλPoisson(2λ)T \mid \lambda \sim \mathrm{Poisson}(2\lambda). Use the law of total expectation and total variance: E[T]=E[E[Tλ]]=E[2λ]=295=185E[T] = E[E[T\mid\lambda]] = E[2\lambda] = 2 \cdot \frac{9}{5} = \frac{18}{5} Var(T)=E[Var(Tλ)]+Var(E[Tλ])=E[2λ]+Var(2λ)=185+4925=9025+3625=12625\mathrm{Var}(T) = E[\mathrm{Var}(T\mid\lambda)] + \mathrm{Var}(E[T\mid\lambda]) = E[2\lambda] + \mathrm{Var}(2\lambda) = \frac{18}{5} + 4\cdot\frac{9}{25} = \frac{90}{25}+\frac{36}{25} = \frac{126}{25} This confirms B. Why the distractors fail: A gives the correct mean but sets variance equal to the mean — the Poisson-only variance, ignoring posterior uncertainty about λ\lambda. C reports the posterior mean and a scaled variance but forgets to multiply by m=2m=2 when computing E[T]E[T]. D uses incorrect update parameters, as if the prior rate weren't added to nn. Study tip: On predictive problems, always decompose variance via E[Var]+Var[E]E[\text{Var}]+\text{Var}[E] — the two terms capture sampling noise and parameter uncertainty separately. Forgetting the second term is the most common trap.

Question 9

Consider the normal linear model yβN(Xβ,2I)y\mid\boldsymbol\beta\sim N(X\boldsymbol\beta,2I). The prior is βN(m0,V0)\boldsymbol\beta\sim N(\boldsymbol m_0,V_0), where m0=(0,1)T\boldsymbol m_0=(0,1)^{\mathsf T} and V0=diag(1,2)V_0=\operatorname{diag}(1,2). Suppose XTX=(4223)X^{\mathsf T}X=\begin{pmatrix}4&2\\2&3\end{pmatrix} and XTy=(6,5)TX^{\mathsf T}y=(6,5)^{\mathsf T}. Which posterior mean vector and covariance matrix pair is correct?

  1. (correct answer)
Explanation: When you encounter Bayesian linear regression questions, your first move should be to write down the posterior update formulas. For the model yβN(Xβ,σ2I)y \mid \boldsymbol\beta \sim N(X\boldsymbol\beta, \sigma^2 I) with prior βN(m0,V0)\boldsymbol\beta \sim N(\boldsymbol m_0, V_0), the posterior covariance and mean are: Vn=(V01+1σ2XX)1,mn=Vn(V01m0+1σ2Xy)V_n = \left(V_0^{-1} + \frac{1}{\sigma^2}X^\top X\right)^{-1}, \qquad \boldsymbol m_n = V_n\left(V_0^{-1}\boldsymbol m_0 + \frac{1}{\sigma^2}X^\top y\right) Here σ2=2\sigma^2 = 2. First compute V01=diag(1,1/2)V_0^{-1} = \text{diag}(1, 1/2) and 12XX=(2113/2)\frac{1}{2}X^\top X = \begin{pmatrix}2&1\\1&3/2\end{pmatrix} . Adding these gives Vn1=(3112)V_n^{-1} = \begin{pmatrix}3&1\\1&2\end{pmatrix} . Inverting (determinant =5= 5) yields $$V_n = \frac{1}{5}\begin{pmatrix}2&-1\-1&3\end{pmatrix} Next, compute $$V_0^{-1}\boldsymbol m_0 = (0, 1/2)^\top$$ and $$\frac{1}{2}X^\top y = (3, 5/2)^\top$$. Their sum is $$(3, 3)^\top$$. Then $$\boldsymbol m_n = \frac{1}{5}\begin{pmatrix}2&-1\\-1&3\end{pmatrix}\begin{pmatrix}3\\3\end{pmatrix} = \frac{1}{5}\begin{pmatrix}3\\6\end{pmatrix} $$, confirming **answer C** is correct. Answer A has the right covariance but uses $$(4/5, 7/5)^\top$$ for the mean — this comes from incorrectly omitting the prior mean contribution $$V_0^{-1}\boldsymbol m_0$$. Answer B flips the covariance matrix (swapping the (1,1) and (2,2) entries), meaning $$V_n^{-1}$$ was inverted incorrectly. Answer D appears to use $$\sigma^2 = 1$$ instead of $$\sigma^2 = 2$$, a classic trap when the variance isn't 1. Always read $$\sigma^2$$ carefully — forgetting to divide $$X^\top X$$ and $$X^\top y$$ by $$\sigma^2$$ is the single most common computational error in these problems.

Question 10

For a normal sample with both parameters unknown, use the conjugate prior μσ2N(m0,σ2/κ0)\mu\mid\sigma^2\sim N(m_0,\sigma^2/\kappa_0) and σ2IG(α0,β0)\sigma^2\sim\mathrm{IG}(\alpha_0,\beta_0), where the inverse-gamma density contains exp(β0/σ2)\exp(-\beta_0/\sigma^2). Let m0=2m_0=2, κ0=1\kappa_0=1, α0=3\alpha_0=3, and β0=5\beta_0=5. For n=4n=4 observations, suppose xˉ=6\bar{x}=6 and i=14(xixˉ)2=12\sum_{i=1}^4(x_i-\bar{x})^2=12. Which posterior parameter tuple (κn,mn,αn,βn)(\kappa_n,m_n,\alpha_n,\beta_n) is correct?

  1. (5,265,5,11)\left(5,\frac{26}{5},5,11\right)
  2. (5,265,5,875)\left(5,\frac{26}{5},5,\frac{87}{5}\right) (correct answer)
  3. (5,225,5,875)\left(5,\frac{22}{5},5,\frac{87}{5}\right)
  4. (5,265,7,1195)\left(5,\frac{26}{5},7,\frac{119}{5}\right)
Explanation: When you encounter a Normal-Normal-Inverse-Gamma conjugate update, you need four update formulas memorized cold. Starting from prior parameters (κ0,m0,α0,β0)(\kappa_0, m_0, \alpha_0, \beta_0) with data summary (n,xˉ,S=(xixˉ)2)(n, \bar{x}, S = \sum(x_i - \bar{x})^2), the posterior parameters are: κn=κ0+n,mn=κ0m0+nxˉκn\kappa_n = \kappa_0 + n, \quad m_n = \frac{\kappa_0 m_0 + n\bar{x}}{\kappa_n} αn=α0+n2,βn=β0+S2+κ0n(xˉm0)22κn\alpha_n = \alpha_0 + \frac{n}{2}, \quad \beta_n = \beta_0 + \frac{S}{2} + \frac{\kappa_0 n(\bar{x}-m_0)^2}{2\kappa_n} Plugging in κ0=1,m0=2,α0=3,β0=5,n=4,xˉ=6,S=12\kappa_0=1, m_0=2, \alpha_0=3, \beta_0=5, n=4, \bar{x}=6, S=12: κn=1+4=5,mn=(1)(2)+(4)(6)5=265\kappa_n = 1+4 = 5, \quad m_n = \frac{(1)(2)+(4)(6)}{5} = \frac{26}{5} αn=3+2=5,βn=5+6+(1)(4)(16)10=11+6410=11+325=875\alpha_n = 3 + 2 = 5, \quad \beta_n = 5 + 6 + \frac{(1)(4)(16)}{10} = 11 + \frac{64}{10} = 11 + \frac{32}{5} = \frac{87}{5} This confirms B (5,26/5,5,87/5)(5, 26/5, 5, 87/5) is correct. Choice A gets βn=11\beta_n = 11, which omits the crucial third term in the β\beta update — the penalty for the prior mean differing from xˉ\bar{x}. This is the most common trap. Choice C computes mnm_n incorrectly as 22/522/5, likely by using κ0xˉ+nm0\kappa_0 \bar{x} + n m_0 instead of the correct weighting. Choice D inflates αn\alpha_n to 7 by adding nn rather than n/2n/2, and consequently produces the wrong βn\beta_n. Your key study tip: the βn\beta_n formula has three additive pieces — prior β0\beta_0, half the sample variance S/2S/2, and a shrinkage term capturing prior-data conflict. Missing any one piece yields a wrong answer, and exams love to isolate exactly that mistake.