Don van den Bergh, Alexander Ly, Eric-Jan Wagenmakers
17th September, 2019
Don van den Bergh, Alexander Ly, Eric-Jan Wagenmakers
\[ x_{ki} \overset{\tiny{\text{i.i.d.}}}{\sim} \mathcal{N}\left(\mu_k, \sigma^2_k\right) \enspace , \]
\[ \begin{aligned} \mathcal{H}_0 &: \sigma^2_1 = \sigma^2_2 \\[.5em] \mathcal{H}_1 &: \sigma^2_1 \neq \sigma^2_2 \enspace . \end{aligned} \]
\[ p(\mathbf{y{}} \mid \mathcal{M}) = \int_{\Theta} p(\mathbf{y}\mid \theta, \mathcal{M}) \, p(\theta \mid \mathcal{M}) \, \mathrm{d}\theta \]
\[ \widehat{\text{elpd}}^{\mathcal{M}}_{\text{loo}} = \frac{1}{n} \sum_{i=1}^n \text{log}\int_{\Theta} p(\mathbf{y}_i \mid \mathbf{y}_{-i}, \theta) \, p(\theta \mid \mathbf{y}_{-i}) \, \mathrm{d}\theta \]
\[ \underbrace{\frac{p(\mathcal{M}_1 \mid \mathbf{d})}{p(\mathcal{M}_0 \mid \mathbf{d})}}_{\text{Posterior odds}} = \underbrace{\frac{p(\mathbf{d} \mid \mathcal{M}_1)}{p(\mathbf{d} \mid \mathcal{M}_0)}}_{\text{Bayes factor}} \hspace{.25em} \underbrace{\frac{p(\mathcal{M}_1)}{p( \mathcal{M}_0)}}_{\text{Prior odds}} \]
\[ \begin{aligned} \pi(\phi) &\propto 1 \\[.5em] \pi(\sigma_1^2) &\sim \text{Inverse-Gamma}(\alpha, \beta) \\[.5em] \pi(\sigma_2^2) &\sim \text{Inverse-Gamma}(\alpha, \beta) \\[.5em] \end{aligned} \]
\[ \begin{aligned} \pi(\phi) &\propto 1 \\[.5em] \pi(\sigma^2) &\sim \text{Inverse-Gamma}(\alpha, \beta) \end{aligned} \]
\[ \begin{aligned} \text{BF}_{10} &= \frac{p(\mathbf{d} \mid \mathcal{M}_1)}{p(\mathbf{d} \mid \mathcal{M}_0)} \\[.5em] &= \frac{\int_{\sigma_1}\int_{\sigma_2}\int_{\phi} f(\mathbf{d} \mid \phi, \sigma_1, \sigma_2) \, \pi(\phi, \sigma_1, \sigma_2) \, \mathrm{d}\phi \, \mathrm{d}\sigma_1 \mathrm{d} \sigma_2}{\int_{\sigma}\int_{\phi}f(\mathbf{d} \mid \phi, \sigma) \, \pi(\phi, \sigma) \, \mathrm{d}\phi \, \mathrm{d}\sigma} \\[.5em] &= \frac{\frac{1}{2} \frac{\beta^\alpha}{\Gamma(\alpha)} \Gamma\left(\frac{n_1}{2} + \alpha\right) \Gamma\left(\frac{n_2}{2} + \alpha\right) \left(\beta + \frac{n_1 s_1^2}{2} \right)^{-\frac{n_1}{2} - \alpha} \left(\beta + \frac{n_2 s_2^2}{2} \right)^{-\frac{n_2}{2} - \alpha}}{\Gamma\left(\frac{n}{2} + \alpha\right) \left(\beta + \frac{n_1 s_1^2 + n_2 s_2^2}{2} \right)^{-\frac{n}{2} - \alpha}} \enspace , \end{aligned} \]
We call the resulting Bayes factor a default Bayes factor (Jeffreys, 1961; Bayarri et al. 2012; Ly, 2018)
\[ \begin{aligned} \sigma_1^2 &= \rho \sigma^2 \\[.5em] \sigma_2^2 &= (1 - \rho) \sigma^2 \end{aligned} \]
\[ \begin{aligned} \mathcal{H}_0 &: \rho = 0.50 \\[.5em] \mathcal{H}_1 &: \rho \neq 0.50 \end{aligned} \]
\[ \text{BF}_{10} = \frac{p(\mathbf{d} \mid \mathcal{M}_1)}{p(\mathbf{d} \mid \mathcal{M}_0)} = \frac{\int_{\rho} \int_{\phi} f(\mathbf{d} \mid \phi, \rho) \, \pi(\phi) \, \pi(\rho) \, \mathrm{d}\phi \, \mathrm{d}\rho}{\int_{\phi} f(\mathbf{d} \mid \phi, \rho = 0.50) \, \pi(\phi) \, \mathrm{d}\phi}\enspace . \]
\[ \rho = \frac{\sigma_1^2}{\sigma_1^2 + \sigma_2^2} \sim \text{Beta}(\alpha, \alpha) \]
\[ \delta \equiv \frac{\sigma_1}{\sigma_2} \sim \text{GeneralizedBetaPrime}(\alpha, 2, 1) \]
The Bayes factor in favour of \(\mathcal{H}_1\) is given by: \[ \text{BF}_{10} = \frac{\text{B}\left({\frac{n_2 - 1}{2} + \alpha},\ {\frac{n_1 - 1}{2} + \alpha}\right) \,_2F_1\left({\frac{n - 2}{2}};{\frac{n_2 - 1}{2} + \alpha};{\frac{n - 2}{2} + 2\alpha};{1 - \frac{n_2 s_2^2}{n_1 s_1^2}}\right)}{\text{B}\left({\alpha},\ {\alpha}\right) \left(1 + \frac{n_2 s_2^2}{n_1 s_1^2}\right)^{\frac{2 - n}{2}}} \]
Note that the data only enter through the ratio \(\frac{n_2 s_2^2}{n_1 s_1^2}\)
\[ x_{ki} \overset{\tiny{\text{i.i.d.}}}{\sim} \mathcal{N}(\mu_k, \rho_k \sigma^2) \]
\[ \begin{align*} \mathcal{H}_0&: \rho_k = \frac{1}{k} \hspace{1em} \forall k \in \{1, \ldots, k\} \\ \mathcal{H}_1&: \mathbf{\rho} \sim \text{Dirichlet}(\alpha_1, \ldots, \alpha_k) \end{align*} \]
\[ \mathcal{H}_r: \rho_1 = \rho_2 > \rho_3, \rho_4, \rho_5 = \rho_6 > \rho_7 \]
\[ \begin{align*} \mathcal{H}_0&: \rho_i = \rho_j \hspace{1em} \forall (i, j) \hspace{5em} p(\mathcal{M}_0 \mid y) = 0.00\\ \mathcal{H}_f&: \rho_i \neq \rho_j \hspace{1em} \forall (i, j) \hspace{5em} p(\mathcal{M}_f \mid y) = 0.00\\ \mathcal{H}_r&: \rho_i < \rho_j \hspace{1em} \forall (i < j) \hspace{4.25em} p(\mathcal{M}_r \mid y) = 1.00\\ \end{align*} \]
Thank you for your attention!