|
| 1 | +--- |
| 2 | +layout: proof |
| 3 | +mathjax: true |
| 4 | + |
| 5 | +author: "Joram Soch" |
| 6 | +affiliation: "BCCN Berlin" |
| 7 | +e_mail: "joram.soch@bccn-berlin.de" |
| 8 | +date: 2022-10-20 08:56:00 |
| 9 | + |
| 10 | +title: "Probability mass function of the beta-binomial distribution" |
| 11 | +chapter: "Probability Distributions" |
| 12 | +section: "Univariate discrete distributions" |
| 13 | +topic: "Beta-binomial distribution" |
| 14 | +theorem: "Probability mass function" |
| 15 | + |
| 16 | +sources: |
| 17 | + - authors: "Wikipedia" |
| 18 | + year: 2022 |
| 19 | + title: "Beta-binomial distribution" |
| 20 | + in: "Wikipedia, the free encyclopedia" |
| 21 | + pages: "retrieved on 2022-10-20" |
| 22 | + url: "https://en.wikipedia.org/wiki/Beta-binomial_distribution#As_a_compound_distribution" |
| 23 | + |
| 24 | +proof_id: "P364" |
| 25 | +shortcut: "betabin-pmf" |
| 26 | +username: "JoramSoch" |
| 27 | +--- |
| 28 | + |
| 29 | + |
| 30 | +**Theorem:** Let $X$ be a [random variable](/D/rvar) following a [beta-binomial distribution](/D/betabin): |
| 31 | + |
| 32 | +$$ \label{eq:betabin} |
| 33 | +X \sim \mathrm{BetBin}(n,\alpha,\beta) \; . |
| 34 | +$$ |
| 35 | + |
| 36 | +Then, the [probability mass function](/D/pmf) of $X$ is |
| 37 | + |
| 38 | +$$ \label{eq:betabin-pmf} |
| 39 | +f_X(x) = {n \choose x} \cdot \frac{\mathrm{B}(\alpha+x,\beta+n-x)}{\mathrm{B}(\alpha,\beta)} |
| 40 | +$$ |
| 41 | + |
| 42 | +where $\mathrm{B}(x,y)$ is the beta function. |
| 43 | + |
| 44 | + |
| 45 | +**Proof:** A [beta-binomial random variable](/D/betabin) is defined as a [binomial variate](/D/bin) for which the success probability is following a [beta distribution](/D/beta): |
| 46 | + |
| 47 | +$$ \label{eq:betabin-bin-beta} |
| 48 | +\begin{split} |
| 49 | +X \mid p &\sim \mathrm{Bin}(n, p) \\ |
| 50 | +p &\sim \mathrm{Bet}(\alpha, \beta) \; . |
| 51 | +\end{split} |
| 52 | +$$ |
| 53 | + |
| 54 | +Thus, we can combine the [law of marginal probability](/D/prob-marg) and the [law of conditional probability](/D/prob-cond) to derive the [probability](/D/prob) of $X$ as |
| 55 | + |
| 56 | +$$ \label{eq:betabin-pmf-s1} |
| 57 | +\begin{split} |
| 58 | +p(x) &= \int_\mathcal{P} \mathrm{p}(x,p) \, \mathrm{d}p \\ |
| 59 | +&= \int_\mathcal{P} \mathrm{p}(x \vert p) \, \mathrm{p}(p) \, \mathrm{d}p \; . |
| 60 | +\end{split} |
| 61 | +$$ |
| 62 | + |
| 63 | +Now, we can plug in the [probability mass function of the binomial distribution](/P/bin-pmf) and the [probability density function of the beta distribution](/P/beta-pdf) to get |
| 64 | + |
| 65 | +$$ \label{eq:betabin-pmf-s2} |
| 66 | +\begin{split} |
| 67 | +p(x) &= \int_0^1 {n \choose x} \, p^x \, (1-p)^{n-x} \cdot \frac{1}{\mathrm{B}(\alpha, \beta)} \, p^{\alpha-1} \, (1-p)^{\beta-1} \, \mathrm{d}p \\ |
| 68 | +&= {n \choose x} \cdot \frac{1}{\mathrm{B}(\alpha, \beta)} \, \int_0^1 p^{\alpha+x-1} \, (1-p)^{\beta+n-x-1} \, \mathrm{d}p \\ |
| 69 | +&= {n \choose x} \cdot \frac{\mathrm{B}(\alpha+x,\beta+n-x)}{\mathrm{B}(\alpha, \beta)} \, \int_0^1 \frac{1}{\mathrm{B}(\alpha+x,\beta+n-x)} \, p^{\alpha+x-1} \, (1-p)^{\beta+n-x-1} \, \mathrm{d}p \; . |
| 70 | +\end{split} |
| 71 | +$$ |
| 72 | + |
| 73 | +Finally, we recognize that the integrand is equal to the [probability density function of a beta distribution](/P/beta-pdf) and [because probability density integrates to one](/D/pdf), we have |
| 74 | + |
| 75 | +$$ \label{eq:betabin-pmf-qed} |
| 76 | +p(x) = {n \choose x} \cdot \frac{\mathrm{B}(\alpha+x,\beta+n-x)}{\mathrm{B}(\alpha,\beta)} = f_X(x) \; . |
| 77 | +$$ |
| 78 | + |
| 79 | +This completes the proof. |
0 commit comments