This is my first time posting an actual homework question. Usually I have more local resources such as office hours and student peers but this time I am a little short on those. I also need to rest but I can't so I'm spinning my wheels a lot more than I ordinarily would.
I have a hierarchical model of $m$ different binomials with $m$ different sample sizes, whose $m$ different $p$ parameters are governed by a population beta distribution. The beta distribution, of course, also has a prior.
I constructed what I think is the correct joint posterior distribution for this model:
$$P(p_1, p_2,\dots,p_{m}, \alpha,\beta|\mathbf X)\propto \pi(\alpha, \beta)\prod_{i=1}^{m} P(p_i|\alpha, \beta)P(x_i|p_i)$$ $$\propto\pi(\alpha, \beta) \prod_{i=1}^{m}p_i^{x_i+\alpha-1}(1-p_i)^{n_i-x_i+\beta-1} $$
The problem I am facing is that if I want to compute
$$P(\alpha,\beta|\mathbf X)$$
It seems as though, since I have m parameters to remove I am looking at m integrals (integrals because the beta is continuous).
This can't possibly be what I am expected to do unless one of the following is true:
I got the joint posterior incorrect
I should be doing this by sampling
There is an easier trick to mathematically computing a marginal posterior on this
I have the wrong idea of what marginalizing m parameters from a population distribution amounts to (eg. we just integrate once since they are all from the same distribution; I can't see what to make of the individual p parameters in that case)