# Conditional probability question about gamma and beta distribution

I am now reading a paper which has a time series model given by $$y_t|\theta_t\sim N(0,\theta_t^{-1}),\\ \theta_t=e^{r_t}\theta_{t-1}\eta_t,\\ \theta_0|Y_0\sim \text{Gamma}(a_0,b_0),\\ \eta_t\sim \text{Beta}(wa_{t-1},(1-w)a_{t-1}),$$ where $Y_t$ is the information available at time $t$, and as I understand $r_t$ is deterministic. The Gamma distribution is defined as $$f(x;\alpha,\beta)=\frac{x^{\alpha-1}\beta^\alpha\exp(-x\beta)}{\Gamma(\alpha)}.$$ The paper says if we combine the transition equation of $\theta_t$ with the prior, then we have that $$\theta_1|Y_0\sim \text{Gamma}(wa_0,e^{-r_1}b_0).$$ Bayes' theorem then delivers $$\theta_1|Y_1\sim \text{Gamma}(wa_0+\frac{1}{2},e^{-r_1}b_0+\frac{1}{2}y_1^2).$$ I am not sure how I can get the distribution of $\theta_1|Y_0$. Thanks for any help!

-
Though it is not hugely informative, you might check the wikipedia page on conjugate priors, this would be the normal known mean unknown variance case. you know that $\theta = \frac 1 {\sigma^2}$ , so the likelihood is $\propto e^{-.5 x^2 \theta}$, looking gamma-like in $\theta$.? – mike Jan 15 '14 at 14:39
Hi @mike I added more stuff from the paper to the question. What I have in mind is the first distribution might not be the result of Bayes' updating? – Mathlover Jan 15 '14 at 14:52

Let $c\gt0$, $S$ with distribution gamma $(a,b)$, and $U$ with distribution beta $(wa,(1-w)a)$ and independent of $S$. Then $cSU$ has distribution gamma $(wa,b/c)$.
First, the distribution of $cX$ is gamma $(v,b/c)$ if and only if the distribution of $X$ is gamma $(v,b)$ hence one can assume without loss of generality that $c=1$. Second, the distribution of $SU$ has density $$f(z)=\int_0^1f_U(u)f_S(u^{-1}z)u^{-1}\mathrm du,$$ where $f_U$ denotes the density of $U$ and $f_S$ the density of $S$. By hypothesis, $$f_U(u)\propto u^{wa-1}(1-u)^{(1-w)a-1},\qquad f_S(s)\propto s^{a-1}\mathrm e^{-bs},$$ hence, after some compulsory simplifications, $$f(z)\propto z^{a-1}\int_0^1u^{-(1-w)a-1}(1-u)^{(1-w)a-1}\mathrm e^{-bz/u}\mathrm du.$$ The change of variable $u=1/(1+x)$ yields $x$ in $(0,+\infty)$ and $\mathrm du=\mathrm dx/(1+x)^2$ hence $$f(z)\propto z^{a-1}\mathrm e^{-bz}\int_0^\infty x^{(1-w)a-1}\mathrm e^{-bzx}\mathrm dx.$$ Finally, the change of variable $\xi=bzx$ yields $\xi$ in $(0,+\infty)$ and $\mathrm dx=\mathrm d\xi/(bz)$ hence $$f(z)\propto z^{a-1}\mathrm e^{-bz}\int_0^\infty \xi^{(1-w)a-1}z^{1-(1-w)a}\mathrm e^{-\xi}z^{-1}\mathrm d\xi\propto z^{wa-1}\mathrm e^{-bz},$$ which proves the claim.