# Gamma/Poisson Posterior Distrib Given Prior:

I need to find the model over a period of length t. This is what I've done:

Based on the Bayes' theorem, the relationship between the prior, the posterior, and the likelihood function is $p(\theta|x) = \frac{p(x|\theta)p(\theta)}{\int p(x|\theta^{})p(\theta^{})}$.

Before computing the posterior $p(\lambda|x)$ with prior $g(\lambda;r,\alpha) = \frac{\alpha^{r} \lambda^{r-1} e^{-\lambda\alpha}}{\Gamma(r)}$ and Poisson pmf $p(x|\lambda(t))= \frac{e^{{-\lambda}t}(\lambda*t)^x }{x!}$

After canceling some terms in the numerator and denominator, $p(\lambda(t)|x)= \frac{ (\alpha+t)^{r+x} \lambda^{r+x-1} e^{-\lambda(\alpha+t)}}{\Gamma(r+x)} = Gamma(\lambda; r + x, \alpha+t)$.

Now we know that $E[X(t)] = \frac{r+x}{\alpha+t}$. However I am trying to calculate: $E[X(t^∗+t)−X(t)|X(t)]$ and not sure how to approach this problem.

• How long is the period from $t$ to $t^*+t$? See if you can figure out how that applies if you were to rewrite your first sentence. Also, you should put the "self-study" tag on for homework or self-study problems. Feb 10, 2018 at 2:23
• The period from $t$ to $t^*+t$ is $t*$. Do I just re-derive posterior? Feb 10, 2018 at 2:48
• You don't have to rederive it... $t$ is just a variable indicating the length of the period. If the length of the period is $t^*$, just use $t^*$ instead if $t$. Feb 10, 2018 at 2:52
• @jbowman I posted what I think may be the solution below - would love your thoughts on it. Feb 10, 2018 at 2:54

I am thinking of doing this: $g(\lambda;r,\alpha) = A= \frac{\alpha^{r} \lambda^{r-1} e^{-\lambda\alpha}}{\Gamma(r)}$ and Poisson pmf $p(x|\lambda(t))= B = \frac{e^{{-\lambda}t}(\lambda t^*)^x }{x!}$ and using $p(\lambda(t)|x)= C= \frac{ (\alpha+t)^{r+x} \lambda^{r+x-1} e^{-\lambda(\alpha+t)}}{\Gamma(r+x)} = Gamma(\lambda; r + x, \alpha+t)$. and now recalculating/solving for $p(\theta|x) = \frac{p(x|\theta)p(\theta)}{\int p(x|\theta^{})p(\theta^{})}$.
So using the simplified notation, I would obtain: $\frac{AB}C$ which would be another Gamma at which point the $E[X=t^*]$ is $r/\alpha$
• But doesn't seeing the first $t$ give info about the true value of $\lambda$ so we have to use the posterior distribution of $\lambda$ Feb 10, 2018 at 3:13
• Please ignore my confusing initial comment here. To clear up a little confusion in your original post, you have $E[X(t)] = \frac{r+x}{\alpha+t}$. This isn't quite right, it's $E[\lambda|X,t]$. So, after you've seen the first $(x,t)$, you have the $x$ and $t$ necessary to plug into $\frac{r+x}{\alpha+t}$ to get the posterior mean of $\lambda$. Now, for $X(t^*+t)-X(t)$, that's the same (distributionally) as $X(t^*)$, so will have mean $\lambda t^*$. You can plug the expression for $E[\lambda|x,t]$ right in to find $E[X(t+t^*)-X(t)]$. Feb 10, 2018 at 16:49