Bayesian statistics: Write up expression for posterior density

52 Views Asked by At

Assume that each $Y_i$ has a Poisson distribution with mean $\lambda_i$ where: $$log(\lambda_i)=\alpha+\beta x_i$$ Moreover, we assume $Y_1,...,Y_n$ are independent (given the parameters). For the Bayessian approach, we are going to use the prior for $(\alpha,\beta)$, where $\alpha$ and $\beta$ are independent, and $\alpha \sim N(3,25)$ and $\beta \sim N(0,1)$.

Now I have to write up an unnormalized expression for posterior density $p(\alpha,\beta|y)$? But how to deal with this? I think I first I have to find the likelihood by finding the probability mass function? But how do I do that, and then I think I have to use the Bayes’ rule: $$p(\lambda \mid y)=\frac{p(\lambda) p(y \mid \lambda)}{p(y)}$$Where $p(\lambda \mid y)$ is proportional to $p(\lambda) p(y \mid \lambda) \propto p(\lambda) p(y \mid \lambda) $. But I'm not sure how to deal with this when I know the distribution of $\alpha $ and $\beta$ ($\alpha \sim N(3,25)$ and $\beta \sim N(0,1)$)

1

There are 1 best solutions below

0
On

By independence, $p(\alpha,\beta)\propto p(\alpha)p(\beta)$. Assuming $x_i$ is fixed, and $Y_i|\alpha,\beta\sim \text{Poiss}(\lambda_i)$ and $Y_1,...,Y_n$ are independent (conditional on $\alpha,\beta$), we have likelihood $$p(Y_1,...,Y_n|\alpha,\beta)\propto \exp(-\sum_i \lambda_i)\Pi_{i}{\lambda_{i}}^{Y_i}\\ = \exp(- n\alpha-\beta\sum_i x_i)\Pi_{i}{(\alpha+\beta x_i)}^{Y_i} .$$ Now use Bayes': $$p(\alpha,\beta|Y_1,...,Y_n)\propto p(Y_1,...,Y_n|\alpha,\beta)p(\alpha)p(\beta)\\ $$