# Characteristic Function of a Conditioned Random Varaible

Let $(X_j)$ be iid random variables and $N \sim \mathrm{Poisson}(\lambda)$, independent of $X_j\, \forall j$. Define $S_n:=\sum_j^n\,X_j$ and consider $S_N$.

Find the characteristic function of $S_N$. Then find $\mathbb{E}S_N$ and $\operatorname{Var}(S_N)$.

I can find $\mathbb{E}S_N$ and $\operatorname{Var}(S_N)$ from the first and second moments, once I have the characteristic function. The last bit is what is tripping me up. Here is what I have so far:

\begin{align*} \varphi_{S_N}(t) &= \varphi_{\sum_j^N\,X_j}(t)\\ &= \mathbb{E}e^{it\sum_j^N\,X_j}\\ &= \mathbb{E}e^{it\sum_j^N\,X_j}\sum_j^N\mathbb{1}_{\{N=n\}}\\ &= \sum_{n=0}^\infty\,\mathbb{E}e^{it\sum_{j-1}^N\,X_j}\mathbb{P}(N=n)\\ &= \sum_{n=0}^\infty\,(\varphi_{X_1}(t))^n\lambda^n\frac{e^{-\lambda}}{n!}\\ &= e^{-\lambda}\sum_{n=0}^\infty\,(\varphi_{X_1}(t))^n\frac{\lambda^n}{n!}\\ &= e^{-\lambda} + \sum_{n=1}^\infty\,(\varphi_{X_1}(t))^n\frac{\lambda^n}{n!} \end{align*}

Have I made an error, or gone off in the wrong direction? Thanks in advance.

• Where you wrote $S_N:=\sum_j^n\,X_j$, did you mean $S_N:=\sum_{j=1}^N X_j$, with a capital $N$? $\qquad$ Commented Jun 15, 2016 at 2:13
• It should be $S_n:=\sum_j^n\,X_j$. I've edited the question to reflect the correction. Commented Jun 15, 2016 at 2:21
• Lines 3-4 are frankly bizarre but after them, lines 5-6 are right on track. Forget line 7, again quite wrong, and conclude using $$\sum_{n=0}^\infty e^{-\lambda} (\varphi_{X_1}(t))^n\frac{\lambda^n}{n!}=e^{-\lambda}e^{\lambda\varphi_{X_1}(t)}.$$
– Did
Commented Jun 15, 2016 at 5:34

## 3 Answers

I think earlier in your calculation some things got confusing. You should just find:

$$\phi_S(t)=E[e^{it \sum_{j=1}^N X_j}]=\sum_{n=0}^\infty E \left [e^{it \sum_{j=1}^N X_j} \mid N=n \right ] P[N=n] \\ = \sum_{n=0}^\infty E \left [ e^{it \sum_{j=1}^n X_j} \right ] P[N=n] \\ = \sum_{n=0}^\infty \phi_X(t)^n P[N=n]$$

using the total expectation formula and the fact that $X_j$ are iid.

Now the point is to make the result look more familiar:

$$\phi_S(t)=\sum_{n=0}^\infty \frac{e^{-\lambda} \phi_X(t)^n \lambda^n}{n!} = e^{-\lambda} \sum_{n=0}^\infty \frac{(\phi_X(t) \lambda)^n}{n!}.$$

You should recognize sums like that one.

$\newcommand{\E}{\operatorname{E}}\newcommand{\var}{\operatorname{var}}$The law of total expectation tells you that $$\E(e^{itS_N}) = \E(\E(e^{itS_N}\mid N)).$$ So you have \begin{align} \varphi_{S_N}(t) = \E(e^{itS_N}) & = \E(\E(e^{itS_N}\mid N)) = \E\left( \E\left( e^{\sum_{j=1}^N it X_j } \mid N \right) \right) \\[10pt] & = \E\left( \E \left( \prod_{j=1}^N e^{it X_j} \mid N \right) \right) & & \text{by independence} \\[10pt] & = \E\left( (\varphi_X(t))^N \right) = \sum_{n=0}^\infty (\varphi_X(t))^n \Pr(N=n) \\[10pt] & = \sum_{n=0}^\infty (\varphi_X(t))^n \frac{\lambda^n e^{-\lambda}}{n!} = e^{-\lambda} \sum_{n=0}^\infty \frac{\left( \varphi_X(t) \lambda \right)^n}{n!} \\[10pt] & = e^{-\lambda} e^{\varphi_X(t)\lambda} = e^{\lambda(\varphi_X(t) - 1)}. \end{align}

You derailed on the third line.   Backtrack and try this:

\begin{align} \varphi_{S_N}(t) = &~ \mathsf E(\mathscr e^{\imath t S_N}) \\[1ex]=&~ \mathsf E(\mathscr e^{\imath t \sum_{k=1}^N X_k}) \\[1ex]=&~ \mathsf E(\prod_{k=1}^N\mathscr e^{\imath t X_k}) & \because~e^{a+b+c+\ldots}=e^a\cdot e^b\cdot e^c\cdots \\[1ex]=&~ \mathsf E(\mathsf E(\prod_{k=1}^N \mathscr e^{\imath t X_k}\mid N)) & \textsf{Law of Iterated Expectation} \end{align}

Then just apply independence and identicallity of your random variables and everything should fall into place.