For k=1,2… let Xk be independent and identically-distributed random variables with E(Xk)= $\mu$ and V(Xk)= $\sigma^2$ and let N be independent of the Xk with mean $\lambda$ and variance $\lambda^2$.
$$\sum_{k=0}^N Xk = T$$
By conditioning on N, find E(T).
My working was E($\sum_{k=0}^N Xk) = E(T)$
Then because they are independent you can swap the Expected value and the sum, so you get
$$\sum_{k=0}^N E(Xk) = T$$
So since E(Xk) =$\mu$ the answer should be N$\mu$?
But the answer is $\lambda$$\mu$ instead.
Please help! I think it is something to do with the fact that N is a random variable, but I am not sure where the $\lambda$ comes from
Best Answer
What you did was almost correct. However, you forgot that $N$ is a random a variable too, so $N\mu$ is not a result, but another random variable
Similar to what you did, let's find the conditional mean of $T$ given $N$, which is a random variable by itself, and reach your result:
$$E(T \mid N) = E(\sum_{k=0}^N X_k) = \sum_{k=0}^N E(X_k) = \sum_{k=0}^N \mu = N\mu$$
Now, by applying the law of total expectation:
$$E(T) = E(E(T \mid N)) = E(N\mu) = E(N)\mu = \lambda\mu $$