Why Random Sums Need Two Sources of Variation
A total formed from a random number of contributions varies for two reasons: the contributions themselves may vary, and the number of contributions may vary. Examples include a total claim amount from a random number of claims or the total amount of a randomly sized group of measurements. A useful moment calculation must account for both sources.
Let \(N\) be a nonnegative integer-valued random variable, and let \(X_1,X_2,\ldots\) be independent and identically distributed random variables, independent of \(N\). The sum is defined to be zero when \(N=0\). The key formulas express its mean in terms of the mean count and the mean contribution, and its variance in terms of both the summand variance and count variance.
Independence of the count and summands is essential. It means, for example, that learning the realized count does not change the distribution of any summand. The separate topic of dependent counts and summands requires different formulas.
The Mean of a Random Sum
For the mean, it is enough to assume \(E[N]<\infty\) and \(E[|X_1|]<\infty\). These conditions ensure the total has a finite absolute first moment. The result does not require the summands to be nonnegative.
To prove the formula, represent the random sum as an infinite series whose \(i\)th term is included precisely when \(N\ge i\):
Here \(\mathbf{1}_{\{N\ge i\}}\) is one if \(N\ge i\) and zero otherwise. The sum is finite almost surely because \(N\) is integer-valued with finite expectation. Moreover, by the monotone convergence theorem and independence,
For a nonnegative integer-valued \(N\), \(N=\sum_{i=1}^{\infty}\mathbf{1}_{\{N\ge i\}}\), so another application of monotone convergence gives \(\sum_{i=1}^{\infty}P(N\ge i)=E[N]\). The displayed absolute expectation is therefore finite. We may consequently interchange expectation and the series, giving
The middle equality uses independence between \(X_i\) and \(N\). This establishes the mean formula. \(\square\)
The Variance of a Random Sum
A variance calculation needs finite second moments for both the count and the summands. Conditional on \(N=k\), the sum contains exactly \(k\) iid terms, so its conditional mean and variance are \(k\mu\) and \(k\sigma^2\), respectively. Averaging the conditional variance captures summand-to-summand variation; the variance of the conditional mean captures variation in the count.
For a complete derivation, condition on \(N\). Given \(N=k\), independence of the summands gives
Thus \(E[S_N\mid N]=N\mu\) and \(\operatorname{Var}(S_N\mid N)=N\sigma^2\). The assumed second moments make \(S_N\) square-integrable: conditionally, \(E[S_N^2\mid N]=N\sigma^2+N^2\mu^2\), whose expectation is finite. The law of total variance therefore applies:
The conditional mean also gives \(E[S_N]=E[N\mu]=E[N]\mu\), in agreement with the mean result. This proves both formulas under the stated assumptions. \(\square\)
The variance has a direct interpretation:
\(E[N]\sigma^2\) is the expected number of summands multiplied by the variance of one summand.
\(\operatorname{Var}(N)\mu^2\) is the count variance multiplied by the squared mean contribution.
An equivalent expression, useful when a distribution is described by raw moments, follows by substituting \(\sigma^2=E[X_1^2]-\mu^2\):
The two terms in the main variance formula are nonnegative. If the summands have mean zero, variation in the count adds no variance term. If the summands are constant, their own variance is zero, but count variation can still make the total variable.
Worked Calculations
Worked Example: Binomial Count and Exponential Contributions
Suppose \(N\sim\operatorname{Binomial}(8,0.2)\), and independently \(X_i\sim\operatorname{Exponential}(2)\), where 2 is the rate. Find the mean and variance of \(S_N\).
For the count, \(E[N]=8(0.2)=1.6\) and \(\operatorname{Var}(N)=8(0.2)(0.8)=1.28\). An exponential distribution with rate 2 has \(\mu=1/2\) and \(\sigma^2=1/2^2=1/4\). The random-sum mean is
Its variance is
Both sources contribute: \(0.4\) comes from the exponential contributions, and \(0.32\) comes from variation in the binomial count.
Worked Example: Geometric Count and Gamma Contributions
Let \(P(N=k)=(1-q)q^k\) for \(k=0,1,\ldots\), with \(q=0.25\). Independently, let each \(X_i\) have a Gamma distribution with shape 2 and scale 3. Find the mean and variance of the total.
For this geometric count, \(E[N]=q/(1-q)\) and \(\operatorname{Var}(N)=q/(1-q)^2\). Substitution gives
A Gamma distribution with shape 2 and scale 3 has mean \(2(3)=6\) and variance \(2(3^2)=18\). Hence
The variance exceeds the contribution-variation term \(6\) because the random count adds \(16\).
Worked Example: A Finite-Support Count and Bernoulli Contributions
Suppose \(P(N=0)=0.2\), \(P(N=1)=0.5\), and \(P(N=3)=0.3\). Independently, let \(X_i\sim\operatorname{Bernoulli}(0.4)\). Calculate the mean and variance of \(S_N\).
First find the count moments directly:
A Bernoulli\((0.4)\) variable has \(\mu=0.4\) and \(\sigma^2=0.4(0.6)=0.24\). Therefore
As a check, \(E[S_N^2\mid N]=N(0.24)+N^2(0.4)^2\), so \(E[S_N^2]=1.4(0.24)+3.2(0.16)=0.848\). Subtracting the squared mean gives \(0.848-(0.56)^2=0.5344\), as required.
A Common Mistake and Why the Formula Matters
A frequent error is to write \(\operatorname{Var}(S_N)=E[N]\sigma^2\) and stop there. That calculation treats the number of contributions as though it were fixed at its average. The omitted term, \(\operatorname{Var}(N)\mu^2\), accounts for variation in the count. For example, if every contribution equals a constant \(c\), then \(S_N=cN\), so its variance must be \(c^2\operatorname{Var}(N)\). The full formula gives exactly that result because \(\sigma^2=0\) and \(\mu=c\).
At the other extreme, when \(\mu=0\), the count-variation term vanishes. This does not mean the count is irrelevant: \(E[N]\sigma^2\) still depends on the average number of contributions. These checks help diagnose whether a calculation has included the right sources of variation.
The formulas are useful whenever a total combines a random count with repeated contributions. They reduce a potentially complicated distributional calculation to four quantities: \(E[N]\), \(\operatorname{Var}(N)\), \(E[X_1]\), and \(\operatorname{Var}(X_1)\). For the moment calculations here, it is not necessary to find the full distribution of \(S_N\).
Check Your Understanding
Use the independence assumptions and moment formulas carefully.
- State the conditions under which the mean formula for \(S_N\) holds, including the integrability condition on \(X_1\).
- If \(N\) is constant and equal to \(m\), simplify the variance formula and explain why the count-variation term disappears.
- Suppose \(E[N]=3\), \(\operatorname{Var}(N)=2\), \(E[X_1]=5\), and \(\operatorname{Var}(X_1)=4\). Find \(E[S_N]\) and \(\operatorname{Var}(S_N)\).
- If \(X_i=c\) with probability one, express \(S_N\) in terms of \(N\) and verify its variance using the random-sum formula.
- Explain why the formula \(E[N]\operatorname{Var}(X_1)\) alone does not generally equal \(\operatorname{Var}(S_N)\).