Uniform-alternative binomial Bayes factor (source code)

= Uniform-alternative binomial Bayes factor
{title2=$B_{01}(y)=(n+1)\binom ny2^{-n}$}

For a <binomial distribution> count, compare a point null $\theta=1/2$ with the uniform alternative <prior distribution> on $(0,1)$. The alternative <Bayesian model evidence> is
$$
\binom ny\int_0^1\theta^y(1-\theta)^{n-y}\,d\theta=\frac1{n+1},
$$
so the exact <Bayes factor> favouring the point null is $(n+1)\binom ny2^{-n}$. With standardized deviation $z=2(y-n/2)/\sqrt n$, the local <normal distribution> approximation is $B_{01}\approx\sqrt{2n/\pi}e^{-z^2/2}$. At fixed $z$ the frequentist <p-value> remains approximately constant, while the factor grows like $\sqrt n$. This demonstrates the prior-width mechanism behind the <Jeffreys-Lindley paradox for a Gaussian point null> in a discrete sampling model.