Posterior Mean and Distribution of a Binomial and Beta Probability

91 Views Asked by At

Let $X\sim Bin(m,\theta)$ and $X = \{X_1, ..., X_n \}$ be a random sample of $X$. Assume $\Theta$ follows a beta distribution with hyperparameters $\alpha$ and $\beta$.

I have proven that the posterior distribution of $\Theta$, given by $f_{\Theta|X}(\theta|x)$, is a beta distribution with parameters $\alpha + X_1...+X_n$ and $\beta+nm-X_1-...-X_n$.

Now, I need to (i) find the posterior mean of $X$, as well as (ii) compute the posterior pmf of $X_{n+1}$ (i.e., to compute $f_{X_{n+1}|X_1,...,X_n}(x_{n+1}|x_1,...,x_n$)).

For (i), it is my understanding that the posterior mean of $X$ can be calculated by $\int_o^1E[X|\theta]*f_{\Theta|X}(\theta|x) d\theta$. However, this seems to be extremely difficult/impossible to compute since now I have $m\theta$ (from the binomian distribution) intertwined with a complex beta distribution. May I know my understanding is correct, or if there is a better way to compute this?

Meanwhile for (ii), I am truly at a loss. May I know if there is any advice on how to compute this posterior pmf?

I am new to and weak in my Bayesian statistics, any help would really be appreciated!

1

There are 1 best solutions below

0
On BEST ANSWER

We know that the posterior predictive distribution must be binomial; i.e., $$X_{n+1} \mid (X_1, \ldots, X_n) \sim \operatorname{Binomial}(m,?).$$ After all, the samples $X_1, \ldots, X_n$ given $\theta$ are binomial with parameters $m$ and $\theta$, and $m$ is a fixed parameter. But we don't know the posterior binomial success probability. We can take an educated guess: it will have the posterior distribution of $\theta$ given the sample $X_1, \ldots, X_n$; and in such a case, it should follow that $$\operatorname{E}[X_{n+1} \mid X_1, \ldots, X_n] = \operatorname{E}[m\theta \mid X_1, \ldots, X_n] = m \operatorname{E}[\theta \mid X_1, \ldots, X_n].$$ and since we know the mean of a beta distribution with parameters $a$ and $b$ is simply $a/(a+b)$, we should have $$\operatorname{E}[X_{n+1} \mid X_1, \ldots, X_n] = \frac{m (\alpha + X_1 + \cdots + X_n)}{\alpha + \beta + mn}.$$

Now, can we actually show this is true by computing the integral you proposed? Yes. For the sake of convenience, let $\alpha^* = \alpha + \sum X_i$ and $\beta^* = \beta + mn - \sum X_i$ be the posterior hyperparameters for $\theta$. Then

$$\begin{align} \operatorname{E}[X_{n+1} \mid X_1, \ldots, X_n] &= \int_{\theta = 0}^1 \operatorname{E}[X_{n+1} \mid \theta] f(\theta \mid X_1, \ldots, X_n) \, d\theta \\ &= \int_{\theta=0}^1 m\theta \frac{\Gamma(\alpha^* + \beta^*)}{\Gamma(\alpha^*)\Gamma(\beta^*)} \theta^{\alpha^* - 1} (1-\theta)^{\beta^* - 1} \, d\theta \\ &= m \frac{\Gamma(\alpha^* + \beta^*)}{\Gamma(\alpha^*)} \int_{\theta=0}^1 \frac{1}{\Gamma(\beta^*)} \theta^{\alpha^*} (1-\theta)^{\beta^* - 1} \, d\theta \\ &= m \frac{\Gamma(\alpha^* + \beta^*)}{\Gamma(\alpha^*)} \frac{\Gamma(\alpha^*+1)}{\Gamma(\alpha^* + \beta^* + 1)}\underset{=1}{\underbrace{\int_{\theta=0}^1 \frac{\Gamma(\alpha^* + \beta^* + 1)}{\Gamma(\alpha^* + 1) \Gamma(\beta^*)} \theta^{\alpha^*} (1-\theta)^{\beta^* - 1} \, d\theta }} \\ &= m \frac{\alpha^*}{\alpha^* + \beta^*}, \end{align}$$ as claimed. But this is totally unnecessary: the moment we recognize that $\operatorname{E}[X_{n+1} \mid \theta] = m\theta$, we could have simply written $$ \int_{\theta = 0}^1 \operatorname{E}[X_{n+1} \mid \theta] f(\theta \mid X_1, \ldots, X_n) \, d\theta = m \int_{\theta=0}^1 \theta f(\theta \mid X_1, \ldots, X_n) \, d\theta = m \operatorname{E}[\theta \mid X_1, \ldots, X_n].$$ That is precisely what we said should be true from the very start.

As an exercise, what is the posterior predictive variance?