Taking the derivative of a conditional expectation. My text claims that the following is obvious given a Markov chain $Z_{n}$ defined by the sum $Z_{n+1}=\sum_{j=0}^{Z(n)} X^{n+1}_{j}$, given a double infinite sequence $X_{s,t}$ of iid rvs
$E(Z_{n+1}\mid Z_{n})=\mu Z_{n}$ 
The following motivation, which I cannot follow is given,
"confirm by differentiating the formula $ E(\theta^{Z_{n+1}}\mid Z_{n})=f(\theta)^{Z_{n}}$ $(1)$ and let $\theta =1$, where $f$ is the probability generating function"
I understand the identity given in the hint, but I dont know how to interpret the LHS of $(1)$ in a way which makes me able to take the derivatite w.r.t $\theta$. The book does not presuppose any measure thoery, hence the answer is not suppposed to contain any Radon-Nikodym derivative.
 A: I wouldn't say it is obvious, but I think this is more or less the argument.  First, prove the assertion that $E(\theta^{Z_{n+1}}\rvert Z_n)=f(\theta)^{Z_n}$
\begin{align}
f(\theta)^{Z_n}=\left(\sum_{x=0}^\infty p(x)\theta^x\right)^{Z_n}=\sum_{x_0,\ldots,x_{Z_n}}p(x_0,\ldots,x_{Z_n})\theta^{\sum_{i=0}^{Z_n} x_i}=\sum_{Z_{n+1}=0}^{\infty}p(Z_{n+1})\theta^{Z_{n+1}}=E(\theta^{Z_{n+1}}\rvert Z_n),
\end{align}
where the penultimate equality follows because all of the sequences are i.i.d.  This requires some thought to understand, but I think it makes sense, because almost by definition $p(\sum_{i=0}^{Z_n}x_i=Z_{n+1})=p(Z_{n+1})$.
Now perform the differentiation
\begin{align}
\frac{\partial}{\partial \theta}E(\theta^{Z_{n+1}}\rvert Z_n)=\frac{\partial}{\partial \theta}\sum_{Z_{n+1}=0}^{\infty}p(Z_{n+1}\rvert Z_n)\theta^{Z_{n+1}}=\sum_{Z_{n+1}=0}^{\infty}Z_{n+1}p(Z_{n+1}\rvert Z_n)\theta^{Z_{n+1}-1}.
\end{align}
Setting $\theta=1$ yields
\begin{align}
\frac{\partial}{\partial \theta}E(\theta^{Z_{n+1}}\rvert Z_n)\rvert_{\theta=1}=\sum_{Z_{n+1}=0}^{\infty}Z_{n+1}p(Z_{n+1}\rvert Z_n)=E(Z_{n+1}\rvert Z_n).
\end{align}
Plugging in the formula for $E(\theta^{Z_{n+1}}\rvert Z_n)$ derived previously, we find
\begin{align}
\frac{\partial}{\partial \theta}E(\theta^{Z_{n+1}}\rvert Z_n)\rvert_{\theta=1}=Z_n f(\theta)^{Z_n-1}f'(\theta)\rvert_{\theta=1}=\mu Z_n,
\end{align}
where the last equality follows from properties of the generating function.
