A property of compound Poisson processes Let $S_{N}=\sum_{i=1}^{N}X_{i}$, where $X_{i}$ are i.i.d random variables with pdf $f$ and distribution $F$ and $N$ is a r.v. following a Poisson($\lambda$) which is independent of the $X_{i}$'s. Let $Y$ be a r.v. with distribution $F$ and independent of $S_{N}$. Let $h$ be a measurable real function.
I need to show that $$E[S_{N}h(S_{N})]=\lambda E[Yh(S_{N}+Y)]$$
I have tried to compute the right-hand side by conditioning to $N=k$, say, but I don't get anyhing. Also I try it starting from the left-hand side but I don't know how to get the r.v. $Y$ in the formula.
If anybody could help me I would be very thankful.
 A: $\newcommand{\e}{\operatorname E}$In the special case in which $\Pr(X_i=1)=1,$ the proposition says
$$
\e(Nh(N)) = \lambda \e(h(N+1)).
$$
This is called the Robbins Lemma, after Herbert Robbins, who introduced it in the 1950s for use in empirical Bayes methods in statistics.
\begin{align}
& \e(S_N h(S_N)) \\[8pt]
= {} & \e(\e(S_Nh(S_N)\mid N)) \\[8pt]
= {} & \sum_{n=1}^\infty \e(S_n h(S_n))\Pr(N=n)  
\end{align}
(We don't need a term for $n=0,$ since in that case the term is $0.$)
\begin{align}
= {} & \sum_{n=1}^\infty \e(S_n h(S_n)) \cdot \frac{e^{-\lambda}\lambda^n}{n!} \\[8pt]
= {} & \sum_{n=0}^\infty \e(S_{n+1} h(S_{n+1})) \cdot \frac{e^{-\lambda} \lambda^{n+1}}{(n+1)!} \\[8pt]
= {} & \lambda \sum_{n=0}^\infty \e\left(\frac{S_{n+1} h(S_{n+1})}{n+1} \right) \cdot\frac{e^{-\lambda} \lambda^n}{n!} \\[8pt]
= {} & \lambda \sum_{n=0}^\infty \sum_{k=1}^{n+1} \e\left( \frac{X_k h(S_{n+1})}{n+1} \right) \cdot\frac{e^{-\lambda} \lambda^n}{n!} \\[8pt]
= {} & \lambda \sum_{n=0}^\infty \sum_{k=1}^{n+1} \e\left( \frac{X_{n+1} h(S_{n+1})}{n+1} \right) \cdot\frac{e^{-\lambda} \lambda^n}{n!}
\end{align}
This last step holds since every term in this sum has the same expected value. Since there are $n+1$ terms, the sum is $n+1$ times the value of any one term, so we get
\begin{align}
= {} & \lambda \sum_{n=0}^\infty \e\left( X_{n+1} h(S_{n+1}) \right) \cdot\frac{e^{-\lambda} \lambda^n}{n!}
\end{align}
Can you finish this in a few seconds?
