# Variance of the sum of a Poisson-distributed random number of (normally distributed) random variables

Suppose I have a fruit stand where I sell oranges. Every day I have an average of $\lambda$ people (Poisson distributed) each buying a normally distributed weight quantity of oranges with mean $\mu$ and standard deviation $\sigma$.

What's the mean and variance of the number of pounds of oranges I sell per day?

OK, the mean is trivial: $\lambda \cdot \mu$. But how do I calculate the variance?

Strangely enough I've come up with an answer through trial and error that seems to fit really well with my Monte Carlo simulations, but I can't convince myself that it's actually the correct answer in theory. If someone can point me to the "right" answer, I'll post the one I got empirically for comparison.

-
(1) Is this for some kind of study? (2) Why not post your empirical answer first? – Glen_b Feb 13 '14 at 0:35
It's for a particular business problem I'm trying to solve, and I've only been withholding my empirical answer because I want the discussion to be about the actual right answer, not about my guess. At least, that's my story! – MikeK Feb 13 '14 at 1:08
Also, thanks gung for cleaning up my work! – MikeK Feb 13 '14 at 1:21

This is a compound Poisson distribution

The law of total variance gets you the answer.

Note that this answer doesn't rely on the normality of the $X$'s at all; it applies to any distribution with mean $\mu$ and variance $\sigma^2$.

In the following, $N$ is the Poisson r.v., $X$'s are individual components, $Y$ is the sum of components, $Y|N$ is the sum of components given a specific count of terms, $N$:

$$\text {Var}_{Y}(Y)=E_{N}\left[\text {Var}_{{Y|N}}(Y)\right]+\text {Var}_{N}\left[E_{{Y|N}}(Y)\right]$$

Substituting in:

$$=\text {E}_{N}\left[N\text {Var}_{X}(X)\right]+\text {Var}_{N}\left[N\text {E}_{X}(X)\right]\,$$

$$=\text {E}_{N}\left[N\sigma^2\right]+\text {Var}_{N}\left[N \mu\right]\,$$

$$=\sigma^2\text {E}_{N}\left[N\right]+\mu^2\text {Var}_{N}\left[N \right]\,$$

$$=\sigma^2\lambda+\mu^2\lambda$$

$$=(\sigma^2+\mu^2)\lambda$$

(... which is also $\lambda E(X^2)$)

-
Thanks--I need to spend some time to digest that, but it looks like you've pointed me in the right direction. – MikeK Feb 13 '14 at 1:22
I took it a bit further for you. – Glen_b Feb 13 '14 at 1:29
Thanks! Yes, that's exactly the answer I had arrived at empirically. – MikeK Feb 13 '14 at 1:32

Here's the answer I got through trial and error, which seems to come close to Monte Carlo simulated estimates in every scenario I have tried.

$\text{Var} = λ(μ^2+σ^2)$

(Edit: Yes, this agrees with Glen_b's updated answer, much to my delight!)

-
+1 That's actually correct, and exact, not approximate. I'd have put it in the question, myself. – Glen_b Feb 13 '14 at 1:31

By the law of the product of variances, if two random variables are independent, the variance of their product $\ D(X*Y)$ = $\ E(X)^2*D(X)+E(Y)^2*D(Y)+D(X)*D(Y)$ which is $\ E(X^2)*E(Y^2)-E(X)^2*E(Y)^2$.

So, if the distributions are Poisson and Normal, I'd guess it's $\lambda*σ^2$.

-
I was thinking along the same lines, but this is not the product of two random variables; it's the sum of a random number of random variables. Those conditions have different variances (though they have the same expected values). – MikeK Feb 13 '14 at 1:11
It's relatively easy to see that the Poisson-sum-of-normals must have bigger variance than this by pondering the situation where $\sigma=0$. Then you have a random variable that's a constant ($\mu$) times a Poisson, which means the variance when $\sigma=0$ is $\mu^2\lambda$; whatever the answer is, it must be at least that, and it must become that when $\sigma=0$. – Glen_b Feb 13 '14 at 1:38