# Finding out variance of the sum of lengths of phone calls which have poisson distribution $(\lambda)$

Let N be the number of phone calls made by the customers of a phone company in a given hour. Suppose $$N\sim Poisson(\beta)$$, where $$\beta > 0$$ is known.

Let $$X_i$$ be the length of the i'th phone call, for i = 1,2, . . . ,N. We assume $$X_i$$'s are independent of each other and also independent of N. We further assume $$X_i\sim Exponetial(\lambda)$$,

where $$\lambda > 0$$ is known. Let Y be the sum of the lengths of the phone calls i-e $$Y=\displaystyle\sum_{i=1}^N X_i$$

Find E(Y) and Var(Y).

Answer: I computed E(Y) as follows:

The Law of total expectation gives

\begin{align*}E[Y] &= \displaystyle\sum_{n=0}^\infty E[Y|N=n]P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty E\left[\displaystyle\sum_{i=1}^N X_i|N=n\right] P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty E\left[ \displaystyle\sum_{i=1}^N X_i\right] P_N(n)\\ &= \displaystyle\sum_{n=0}^\infty\displaystyle\sum_{i=1}^N E[X_i]P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty \displaystyle\sum_{i=1}^N E[X_i]\dfrac{e^{-\beta}\beta^n}{n!}\\ &=\displaystyle\sum_{n=0}^\infty \displaystyle\sum_{i=1}^N \dfrac{1}{\lambda}\dfrac{e^{-\beta}\beta^n}{n1}\\ &=\dfrac{e^{-\beta}}{\lambda}\displaystyle\sum_{n=0}^\infty \dfrac{n\beta^n}{n!} \because \displaystyle\sum_{n=0}^\infty \dfrac{nX^n}{n!}= Xe^X\\ E[Y]&= \dfrac{\beta}{\lambda}\end{align*}

Now let us find Var(Y):

The Law of total expectation gives:

\begin{align*}E[Y^2]&=E[Y^2|N=n]P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty E\left[\left(\displaystyle\sum_{i=1}^NX_i\right)^2|N=n\right]P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty E\left[\left(\displaystyle\sum_{i=1}^nX_i\right)^2\right]P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty E\left[\displaystyle\sum_{i=1}^nX^2_i + \displaystyle\sum_{j,k:j\not= k}X_jX_k\right]P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty\left\{\displaystyle\sum_{i=1}^n E[X^2_i] + \displaystyle\sum_{j,k:j\not=k}E[X_jX_k]\right\}P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty\left\{\displaystyle\sum_{i+1}^n E[X^2_i] + \displaystyle\sum_{j,k:j\not=k}E[X_j]E[X_k]\right\}P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty\left\{\displaystyle\sum_{i=1}^n \dfrac{2}{\lambda^2} + \displaystyle\sum_{j,k:j\not=k}\dfrac{1}{\lambda^2}\right\}P_N(n)\\ &=\displaystyle\sum_{n=0}^\infty\left[\dfrac{2n}{\lambda^2} +\dfrac{n(n-1)}{\lambda^2}\right]\dfrac{e^{-\beta}\beta^n}{n!}\\ &=\dfrac{e^{-\beta}}{\lambda^2}\displaystyle\sum_{n=0}^\infty \dfrac{n\beta^n}{n!} + \dfrac{e^{-\beta}}{\lambda^2}\displaystyle\sum_{n=0}^\infty\dfrac{n^2\beta^n}{n!}\\ E[Y^2]&=\dfrac{1}{\lambda}\cdot\dfrac{\beta}{\lambda} +\dfrac{e^{-\beta}}{\lambda^2}\left(\beta e^{\beta} + \beta^2 e^{\beta}\right)\\ &=\dfrac{\beta^2 + 2\beta}{\lambda^2}\\ Var[Y]&=E[Y^2] - [E[Y]]^2\\ &=\dfrac{\beta^2 + 2\beta}{\lambda^2} - \dfrac{\beta^2}{\lambda^2}\\ &=\dfrac{2\beta}{\lambda^2} \end{align*}

• keep conditioning on n, and expand out the squared term, then you will have terms of form E[X_i X_j|N]. can you come up with what these evaluate too? Commented Oct 16, 2022 at 7:44
• Use the law of total variance en.wikipedia.org/wiki/Law_of_total_variance, which makes the variance of $Y$ quite easy to obtain. The distribution of $Y$ here is called a Tweedie distribution. Commented Oct 16, 2022 at 7:45
• Given that you know the mean and variance of $X_i$ and the mean and variance of $N$, there is no need to sum any infinite series. See stats.stackexchange.com/questions/586046/… for a similar example. The same method is applicable here. Commented Oct 16, 2022 at 8:20

As mentioned by Gordon Smyth, you can use the law of total variance. Note that $$E[X_i]=\frac{1}{\lambda}$$, $$V[X_i]=\frac{1}{\lambda^2}$$, and $$E[N]=V[N]=\beta$$.
\begin{align*} V[Y] &= V\big[E[Y|N]\big] + E\big[V[Y|N]\big]\\ &\stackrel{\perp}{=}V\bigg[\sum_{i=1}^{N}E[X_i]\bigg]+E\bigg[\sum_{i=1}^{N}V[X_i]\bigg]\\ &\stackrel{id}{=}V\bigg[\frac{N}{\lambda}\bigg]+E\bigg[\frac{N}{\lambda^2}\bigg]\\ &=\frac{V[N]}{\lambda^2}+\frac{E[N]}{\lambda^2}\\ &=\frac{\beta}{\lambda^2}+\frac{\beta}{\lambda^2}\\ &=\frac{2\beta}{\lambda^2}\end{align*}
• $\dfrac{2\beta}{\lambda^2}$ is the answer for the Var[Y] as given by author. What is wrong with your answer? Commented Oct 16, 2022 at 11:43