0

If we have a non-negative-integer valued discrete random variable $N$, as well as independent and identically-distributed random variables $X_1, X_2, \ldots$ (where $N \perp X_i$ as well), consider the sum $$ S = \sum_{i = 1}^{N} X_i $$ If we wanted to find the expectation $\textbf{E}\left[S\right]$, the approach I have seen used is to condition on the particular value of $N$, which is what is done in this question, for example.

However, my question is, doesn't the following simpler derivation suffice? $$ \begin{align*} \textbf{E}\left[S\right] &= \textbf{E}\left[\sum_{i = 1}^{N} X_i\right]\\ &= \textbf{E}\left[N \cdot X_i\right] && \text{Because all $X_i$ are i.i.d.}\\ &= \textbf{E}\left[N\right] \cdot \textbf{E}\left[X_i\right] && \text{Because expectation is multiplicative across independent r.v's} \end{align*} $$This gives us the correct answer, but doesn't require us to condition on the value of $N$; it instead just applies the fact that expectation is multiplicative across independent random variables. Is this approach incorrect? If not, is there a reason why we wouldn't use this approach over conditioning?

  • I think maybe your way assumes that $N$ and $X_1$ are independent which is different from just saying the $X_i$ are iid?? – SBK Oct 01 '24 at 16:03
  • @SBK Sorry, I forgot to say that we assume $N$ is independent of all $X_i$. – Christopher Miller Oct 01 '24 at 16:41
  • 3
    Oh wait I’m being stupid, the error is much clearer: You can’t replace the sum inside the expectation with $NX_i$ (or $NX_1$, which is what you probably mean). That would be like saying all the $X_i$ have literally the same value almost everywhere. – SBK Oct 01 '24 at 16:55
  • @SBK Oh, I think I see! So I can't replace $\sum_{i = 1}^N X_i$ with $N \cdot X_i$, because that assumes all $X_i$ take on the same value, which may not be true. All we're given is that all $X_i$ have the same distribution (so $\textbf{E}\left[X_i\right]$ is identical for all $i$), but that in no way implies that all the values of $X_i$ are equal. – Christopher Miller Oct 01 '24 at 17:06
  • What makes it hard to judge is the fact that the equalities you mention are all valid. This because in all cases both sides start with the expectation symbol. If I would meet this somewhere I would think things like: "...mmm, this guy might be taking the liberty to skip some steps". – drhab Oct 01 '24 at 17:52
  • Yes, the expectations of $\sum_{i=1}^N X_i$ and $N X_1$ are the same but those random variables do not share the same distribution so you can't make the logical jump you want to do. For example, if $N\sim Poisson(10)$ and $X_i \sim N(0,1)$, then $N X_1$ has 10 times the variance of $\sum_{i=1}^N X_i$. – JimB Oct 02 '24 at 04:16

1 Answers1

2

Your "simpler derivation" isn't really simpler to someone like me for which the identity $\ \mathbf{E}\left[\sum_\limits{i=1}^NX_i\right]=\mathbf{E}\big[N\cdot X_i\big]\ $ isn't at all obvious. While the identity does in fact hold when $\ N\ $ is independent of all the $\ X_i\ ,$ it doesn't necessarily do so if that condition isn't satisfied. So to be convinced that the identity holds when $\ N\ $ is independent of all the $\ X_i\ $ I'd need to see an argument containing a step that uses the independence condition itself, or a well known consequence of it, but which could fail when the independence condition does not hold. Nevertheless, it's certainly not necessary that such an argument must expand out the identity $\ \mathbf{E}[S]=$$\,\mathbf{E}[\mathbf{E}[S|N]]\ $ in terms of $\ \mathbf{E}[S|N=n]\ .$ Here's one that doesn't. It expands $\ S\ $ out in terms of the indicator random variables $\ \mathbb{I}_{\{N=n\}}\ $ instead. \begin{align} \mathbf{E}\left[\sum_{i=1}^NX_i\right]&=\mathbf{E}\left[\sum_{n=0}^\infty\mathbb{I}_{\{N=n\}}\sum_{i=1}^nX_i\right]\\ &=\sum_{n=0}^\infty\mathbf{E}\big[\mathbb{I}_{\{N=n\}}\big]\sum_{i=1}^n \mathbf{E}\big[X_i\big]\label{1}\tag{1}\\ &=\sum_{n=0}^\infty\mathbf{E}\big[\mathbb{I}_{\{N=n\}}\big]n\mathbf{E}\big[X_i\big]\label{2}\tag{2}\\ &=\mathbf{E}\left[X_i\sum_{i=1}^\infty n\mathbb{I}_{\{N=n\}}\right]\tag{3}\label{3}\\ &=\mathbf{E}\big[NX_i\big] \end{align} The equations \eqref{1} and \eqref{3} are where the independence condition needs to be invoked in the above argument.

Observe that if your aim is to prove $\ \mathbf{E}\left[\sum_\limits{i=1}^NX_i\right]=$$\,\mathbf{E}[N]\mathbf{E}\big[X_i\big]\ ,$ then after the step \eqref{2} in the above argument you could simply invoke the identity $\ \sum_\limits{n=0}^\infty\mathbf{E}\big[\mathbb{I}_{\{N=n\}}\big]n \mathbf{E}\big[X_i\big]=$$\,\mathbf{E}[N]\mathbf{E}\big[X_i\big]\ $ to establish the conclusion, whereas establishing $\ \mathbf{E}\left[\sum_\limits{i=1}^NX_i\right]=\mathbf{E}\big[NX_i\big]\ $ first and then invoking the identity $\ \mathbf{E}\big[NX_i\big]=\mathbf{E}[N]\mathbf{E}\big[X_i\big]\ $ to reach the conclusion takes two more steps than would otherwise be needed.