I have the following Poisson mass function:
$$p(y| \theta) = \frac{\theta^y e^{\theta}}{y!} $$
Which has a corresponding likelihood for n independent realizations of y as follows:
$$\frac{e^{-n\theta}\theta^{\sum^n_{i=1}y_i}}{\prod_{i=1}^ny_i!}$$
Now I have that the prior is $1/\theta$, so I think that the posterior would be: $$p(\theta| y)=\frac{e^{-n\theta}\theta^{(\sum^n_{i=1}{y_i})-1}}{\prod_{i=1}^ny_i!}$$ a. Can you please tell me if this is correct?
I am also supposed to simulate 1000 observations from that posterior in R, but what I don't understand is how to do that. I mean, the posterior is giving me a probability, not an observation, so how I am supposed to create observations from that posterior? I can't use rpois() because because the posterior is not exactly a poisson, is it?
Thank you.
[self-study]
tag & read its wiki. $\endgroup$