# The posterior distribution of the Poisson-Gamma Model

I am trying to figure out why the following holds true and would like to ask for your help.

Given the following Bayesian model: $$y_i \sim \text{Poisson}(\mu_i \theta_i)\\\mu_i \sim \text{Gamma}(\alpha, \beta) \\\alpha \sim \text{Exponential}(a)\\\beta \sim \text{Gamma}(b,c)$$ for available observations $$y_i$$ with $$i=1,...,n$$ and parameters $$\theta_i, a, b, c$$ fixed the posterior distribution of the parameters $$\mu_i, \alpha, \beta$$ is:

$$\pi(\{\mu_i\}, \alpha, \beta | \{y_i\},\{\theta_i\},a,b,c) \propto \prod_{i=1}^n [f(y_i | \mu_i, \theta_i\pi(\mu_i|\alpha, \beta)]\pi(\alpha|a)\pi(\beta|b,c)$$

How is this equation derived?

Bayes's Rule (ignoring fixed parameters) implies $$\pi(\{\mu_i\}, \alpha, \beta \mid \{y_i\}, \{\theta_i\}, a, b, c) \propto f(\{y_i\} \mid \{\mu_i\}, \{\theta_i\} , \alpha, \beta, a, b, c) \cdot \pi(\{\mu_i\}, \alpha, \beta\mid \{\theta_i\}, a, b, c).$$
The first term decomposes as $$f(\{y_i\} \mid \{\mu_i\}, \{\theta_i\} , \alpha, \beta, a, b, c) = f(\{y_i\} \mid \{\mu_i\}, \{\theta_i\}) = \prod_{i=1}^n f(y_i \mid \mu_i, \theta_i).$$
The second term decomposes as $$\pi(\{\mu_i\}, \alpha, \beta\mid \{\theta_i\}, a, b, c) = \underbrace{\pi(\{\mu_i\} \mid \alpha, \beta)}_{= \prod_{i=1}^n \pi(\mu_i \mid \alpha, \beta)} \pi(\alpha \mid a) \pi(\beta \mid b,c).$$