I am solving the following:
Let $Y1, Y2,…$ be a random sample from $\Gamma(p,a)$ distribution, where p and a are positive real numbers. $Y$ is damage in thousands of dollars caused to a car in an accident. Let $N(t)$ be the numbers of accident within t months staring Jan. 1. And assume ${N(t) , t >0}$ is a HPP with rate $\lambda$ and that $N(t)$ and $Y_K , k=1,2,...$ are independent.
What type process is $X(t)$? Find the moment generating function of $X(t)= \sum_{k=1}^{N(t)}Y_{k}$ and then use it to compute $E[X(t)]$ for $p=2, a=1, t=2, \lambda = 2$. Then compute $E[X(t)]$ using another method.
My solution so far:
$X(t)$ is a compound Poisson process. To find the m.g.f of $X(t)$ I should use the formula $$\Psi_{X(t)}(u)=g_{N(t)}(\Psi_Y(u))$$, where $\Psi_Y(u)$ is the m.g.f. of Y damage in thousands of dollars caused to a car in an accident. Then $$\Psi_{X(t)}(u)=e^{\lambda t(\Psi_Y(u)-1)}\\\Psi_Y(u)=\frac{1}{(1-au)^p}$$, since $\Psi_Y(u)$ is $\Gamma(p,a)$ distributed and $N(t)$ is a HPP with rate $\lambda$.
We can solve for $E[X(t)]$ in two ways. One way is the use the mgf, the second is to use the double expected value formula. Using double expected value formula, $$E[X(t)]=E_{N}[E_{Y}[Y(t)|N(t)=n]]=E_{N}[n*pa]=pa*E_{N}[n]=pa*\lambda t$$ Using mgfs, $$E[X(t)]=\Psi_{X(t)}'(0)\\ \Psi_{X(t)}(u)=\lambda t \Psi_{Y(u)}'e^{\lambda t(\Psi_Y(u)-1)}$$ Letting u=0 we have $$E[X(t)]=\Psi_{X(t)}'(0)=\lambda t \Psi_{Y(u)}'(0)=\lambda t * \frac{ap}{(1-au)^{p-1}}=\lambda t*ap$$ Then $$E[X^{2}(t)]=\Psi_{X(t)}''(0)=\lambda^2 t^2 \Psi_{Y(u)}(0)'^2e^{\lambda t(\Psi_Y(0)-1)}=\lambda^2 t^2 \Psi_{Y(u)}'(0)^2=\lambda^2 t^2 * (ap)^2= \lambda^2 t^2*a^2p^2$$ Lastly variance is $$Var[X(t)]=E[X(t)^2]-E[X(t)]^2=(\lambda^2 t^2*a^2p^2)-(\lambda t*ap)^2=0$$
I don't think I am computing the variance right, since it ends up being zero. Using the numbers provided $p=2, a=1, t=2, \lambda = 2$, I get $E[X(t)]=8$, and $Var[X(t)]=0$.
You made a mistake with the second derivative of the m.g .f... Keep in mind that the m.g.f. of Y depends on u, hence you need to apply the Produkt rule..(you only put u=0 once you computed the 2.derivative)