Proof: Cross-validated log Bayes factor for binomial observations
Theorem: Let $y$ be the number of successes resulting from $n$ independent trials with unknown success probability $p$, such that $y$ follows a binomial distribution:
\[\label{eq:Bin} y \sim \mathrm{Bin}(n,p) \; .\]Moreover, assume two statistical models, one assuming that $p$ is 0.5 (null model), the other imposing a beta distribution as the prior distribution on the model parameter $p$ (alternative):
\[\label{eq:Bin-m01} \begin{split} m_0 &: \; y \sim \mathrm{Bin}(n,p), \; p = 0.5 \\ m_1 &: \; y \sim \mathrm{Bin}(n,p), \; p \sim \mathrm{Bet}(\alpha_0, \beta_0) \; . \end{split}\]Then, the cross-validated log Bayes factor in favor of $m_1$ against $m_0$ is
\[\label{eq:Bin-cvLBF} \mathrm{cvLBF}_{10} = S \cdot \log B(y, n-y) - \sum_{i=1}^S \log B \left( y_1^{(i)}, n_1 - y_1^{(i)} \right) + n \log(2)\]where $y_1^{(i)}$ are the training data with $n_1$ data points in the $i$-th cross-validation fold, $S$ is the number of data subsets and $B(x,y)$ is the beta function.
Proof: The relationship between log Bayes factor and log model evidences also holds for cross-validated log bayes factor (cvLBF) and cross-validated log model evidences (cvLME):
\[\label{eq:cvLBF-cvLME} \mathrm{cvLBF}_{12} = \mathrm{cvLME}(m_1) - \mathrm{cvLME}(m_2) \; .\]The cross-validated log model evidences of $m_0$ and $m_1$ are given by
\[\label{eq:Bin-cvLME-m01} \begin{split} \mathrm{cvLME}(m_0) &= -n \log(2) + \sum_{i=1}^S \left[ \log {n_2 \choose y_2^{(i)}} \right] \\ \mathrm{cvLME}(m_1) &= S \cdot \log B(y, n-y) + \sum_{i=1}^S \left[ \log {n_2 \choose y_2^{(i)}} - \log B \left( y_1^{(i)}, n_1 - y_1^{(i)} \right) \right] \end{split}\]Subtracting the two cvLMEs from each other, the cvLBF emerges as
\[\label{eq:Bin-cvLBF-qed} \begin{split} \mathrm{cvLBF}_{10} &= \mathrm{cvLME}(m_1) - \mathrm{LME}(m_0) \\ &= \left( S \cdot \log B(y, n-y) + \sum_{i=1}^S \left[ \log {n_2 \choose y_2^{(i)}} - \log B \left( y_1^{(i)}, n_1 - y_1^{(i)} \right) \right] \right) \\ &- \left( -n \log(2) + \sum_{i=1}^S \left[ \log {n_2 \choose y_2^{(i)}} \right] \right) \\ &= S \cdot \log B(y, n-y) - \sum_{i=1}^S \log B \left( y_1^{(i)}, n_1 - y_1^{(i)} \right) + n \log(2) \; . \end{split}\]Metadata: ID: P531 | shortcut: bin-cvlbf | author: JoramSoch | date: 2026-03-26, 18:08.