n class="math inline">\(N \in \mathbb{N}\)</span>, <span class="math inline">\(\alpha \in \mathbb{R}^+\)</span>, and <span class="math inline">\(\beta \in \mathbb{R}^+\)</span>, then for <span class="math inline">\(n \in {0,\ldots,N}\)</span>, <span class="math display">\[
\text{BetaBinomial}(n~|~N,\alpha,\beta) = \binom{N}{n}
\frac{\mathrm{B}(n+\alpha, N -n +   \beta)}{\mathrm{B}(\alpha,\beta)},
\]</span> where the beta function <span class="math inline">\(\mathrm{B}(u,v)\)</span> is defined for <span clas