# 7章章末 ## 4 ### Question Bayes factors when the prior distribution is improper: on page 183, we discuss Bayes factors for comparing two extreme models for the SAT coaching example. (a) Derive the Bayes factor, $p(H_2|y)/p(H_1|y)$, as a function of $y_1, \cdots , y_J$, $\sigma_1, \cdots, \sigma_J$, and $A$, for the models with $N(0,A^2)$ prior distributions. (b) Evaluate the Bayes factor in the limit $A \rightarrow \infty$. \(c\) For fixed $A$, evaluate the Bayes factor as the number of schools, $J$, increases. Assume for simplicity that $\sigma_1= \cdots=\sigma_J=\sigma$, and that the sample mean and variance of the $y_j$’s do not change. ### Solution (a) $H_1$(no pooling)の下では、$\theta_1, \cdots, \theta_J$の事後分布は、 \begin{align} p(\theta_1, \cdots, \theta_J|y_1, \cdots , y_J) \propto p(\theta_1, \cdots, \theta_J)p(y_1, \cdots , y_J|\theta_1, \cdots, \theta_J) \end{align} 事前分布$p(\theta_1, \cdots, \theta_J)$は$N(0, A^2)$であり、尤度は$N(y_j, \sigma_j^2)$であるから、 \begin{align} p(\theta_1, \cdots, \theta_J)p(y_1, \cdots , y_J|\theta_1, \cdots, \theta_J)=\prod_{j=1}^{J}N(\theta_j|0, A^2)\prod_{j=1}^{J}N(y_j|\theta_j, \sigma_j^2) \end{align} となる。 一方、$H_2$(complete pooling)の下では、$\theta_1= \cdots= \theta_J=\theta$の事後分布は、 \begin{align} p(\theta|y_1, \cdots , y_J) \propto p(\theta)p(y_1, \cdots , y_J|\theta) \end{align} 事前分布$p(\theta)$は$N(0, A^2)$であり、尤度は$N(y_j, \sigma_j^2)$であるから、 \begin{align} p(\theta)p(y_1, \cdots , y_J|\theta_1, \cdots, \theta_J)=N(\theta|0, A^2)\prod_{j=1}^{J}N(y_j|\theta_j, \sigma_j^2) \end{align} よってベイズファクター$p(H_2|y)/p(H_1|y)$は、 \begin{align} \frac{p(H_2|y)}{p(H_1|y)}=\frac{\int N(\theta|0, A^2)\prod_{j=1}^{J}N(y_j|\theta_j, \sigma_j^2)}{\int \prod_{j=1}^{J}N(\theta_j|0, A^2)\prod_{j=1}^{J}N(y_j|\theta_j, \sigma_j^2)} \end{align} (b)$A \rightarrow \infty$の時、分母の$\prod_{j=1}^{J}N(\theta_j|0, A^2)=\prod_{j=1}^{J}\frac{1}{\sqrt{2\pi A^2}}\exp(-\frac{\theta_j}{2A^2})$の部分が分子の$N(\theta|0, A^2)=\frac{1}{\sqrt{2\pi A^2}}\exp(-\frac{\theta}{2A^2})$よりも早く0に近づくので、ベイズファクターは発散する? \(c\)$A$を固定した上で、$J \rightarrow \infty$とするとき、分母の$\prod_{j=1}^{J}N(\theta_j|0, A^2)$の部分が分子の$N(\theta|0, A^2)$よりも早く0に近づくので、ベイズファクターは発散する?