# how to get posterior distribution of beta with gamma prior

I have

$X_1, ..., X_n \sim beta(\theta,1)$ and $\theta \sim gamma(r, \lambda)$ and wish to compute the posterior distribution.

Since $f(\textbf{X} | \theta) = \theta^nx^{n(\theta-1)}$ and $\pi(\theta) = \frac{1}{\Gamma(r)\lambda^r}\theta^{r-1}e^{-\theta/\lambda}$, we get $f(\textbf{X} | \theta) \pi(\theta) = \theta^nx^{n(\theta-1)}\frac{1}{\Gamma(r)\lambda^r}\theta^{r-1}e^{-\theta/\lambda} = \frac{1}{\Gamma(r)\lambda^r}x^{n(\theta-1)}\theta^{n+r-1}e^{-\theta/\lambda}$

But I'm having trouble computing the marginal which is $$\int_0^\infty f(\textbf{X}|\theta)\pi(\theta)d\theta =\frac{1}{\Gamma(r)\lambda^r}\int_0^\infty x^{n(\theta-1)}\theta^{n+r-1}e^{-\theta/\lambda} d\theta$$

How do I do this integration? Is there a way I can conclude that posterior is gamma without doing the integration?

• Why are you using a gamma distribution for a prior? – Jon Jun 2 '18 at 15:33
• Also, how are you getting $f(x|\theta)$? $Beta(\theta, 1) \propto (x - 1)^{\theta-1} \times (1 - x)^{1-1} = (x - 1)^{\theta-1}$ – Jon Jun 2 '18 at 15:37
• I think it's $x^{\theta-1}$ not $(x-1)^{\theta-1}$ – MoneyBall Jun 3 '18 at 1:16
• You are correct, $Beta(\theta, 1) \propto x^{\theta-1}$ so where do you get $\theta^n$ from? (the $n$ I follow, but not $\theta$) – Jon Jun 4 '18 at 15:50