Why a Random Sum Is a Mixture
A sum with a fixed number of terms has a distribution determined by the laws of those terms. If the number of terms is itself random, the total can have several different fixed-count distributions, depending on the realized count. Its overall distribution combines those possibilities, weighted by the probabilities of the corresponding counts.
The key condition is independence: the count must be independent of the sequence of summands. Then learning the count does not change the distribution of any fixed number of terms. We can condition on the count, use the appropriate fixed-sum law, and average over all possible counts.
Because \(N\) takes finite nonnegative integer values, it is finite with probability one. For each possible value \(n\), the conditional law of \(S_N\) given \(N=n\) is the law of a sum of exactly \(n\) iid terms. For \(n\geq 1\), that fixed-sum law is obtained by the \(n\)-fold convolution of the summand law; the \(n=0\) law is a point mass at zero.
The Mixture Formula
Proof. The events \(\{N=n\}\), \(n=0,1,2,\ldots\), are disjoint and their union has probability one. Therefore, for any Borel set \(A\), countable additivity gives $$ P(S_N\in A)=\sum_{n=0}^{\infty}P(S_N\in A,\ N=n). $$ On \(\{N=n\}\), the random sum equals \(X_1+\cdots+X_n\), with the empty-sum convention at \(n=0\). Independence of \(N\) from the entire summand sequence implies $$ P(S_N\in A,\ N=n) =P(N=n)P(X_1+\cdots+X_n\in A). $$ Substituting this into the countable sum proves the Borel-set formula. Taking \(A=(-\infty,x]\) gives the distribution-function formula. \(\square\)
The result is a mixture of probability distributions: first select a count \(n\) with probability \(p_n\), then use the fixed-count sum law for that \(n\). It applies whether the summands are discrete, continuous, or have a mixture of discrete and continuous parts.
For the density statement, the probability assigned to a Borel set \(A\) by positive counts is \(\sum_{n\geq1}p_n\int_A g_n(s)\,ds\). Since all terms are nonnegative, Tonelli’s theorem permits interchanging the sum and integral: $$ \sum_{n=1}^{\infty}p_n\int_Ag_n(s)\,ds =\int_A\sum_{n=1}^{\infty}p_ng_n(s)\,ds. $$ The proposed mixture is a density for that part of the law. Its total integral is \(\sum_{n\geq1}p_n=1-p_0\), so including the zero-count atom gives total probability one. This also shows why a random sum can be mixed even when each positive-count component has a density.
Worked Random-Sum Distributions
Worked Example: A Discrete Count and Bernoulli Summands
Suppose \(P(N=0)=1/2\), \(P(N=1)=1/3\), and \(P(N=2)=1/6\). Independently, let the \(X_i\) be iid Bernoulli random variables with \(P(X_i=1)=P(X_i=0)=1/2\). Find the mass function of \(S_N\).
If \(N=0\), then \(S_N=0\) with probability one. If \(N=1\), the sum has probabilities \(1/2\) at both 0 and 1. If \(N=2\), the possible sums are 0, 1, and 2, with probabilities \(1/4,1/2,1/4\), respectively. Mixing these laws gives $$ P(S_N=0)=\frac12+\frac13\cdot\frac12+\frac16\cdot\frac14 =\frac{12}{24}+\frac{4}{24}+\frac{1}{24} =\frac{17}{24}, $$ $$ P(S_N=1)=\frac13\cdot\frac12+\frac16\cdot\frac12 =\frac16+\frac{1}{12} =\frac14, $$ and $$ P(S_N=2)=\frac16\cdot\frac14=\frac{1}{24}. $$ There is no probability at any other value. As a check, the probabilities sum to \(17/24+6/24+1/24=1\). In particular, the probability at zero includes the entire \(N=0\) contribution, not just the chance that one or more Bernoulli summands equal zero.
Worked Example: A Point Mass Plus a Continuous Part
Let \(P(N=0)=1/4\), \(P(N=1)=1/2\), and \(P(N=2)=1/4\), independently of iid \(X_i\sim\operatorname{Uniform}(0,1)\). Find the atom and the density of the continuous part of \(S_N\).
The event \(N=0\) contributes an atom of probability \(1/4\) at \(S_N=0\). Given \(N=1\), the sum is uniform on \((0,1)\), with density 1 there. Given \(N=2\), convolution of the two uniform densities gives the triangular density \(s\) on \(0<s<1\) and \(2-s\) on \(1<s<2\). Thus the mixture density, away from endpoints where density values do not affect probabilities, is $$ g_{S_N}(s)= \begin{cases} \frac12+\frac14s, & 0<s<1,\\ \frac14(2-s), & 1<s<2,\\ 0, & \text{otherwise}. \end{cases} $$ The continuous part has total probability $$ \int_0^1\left(\frac12+\frac14s\right)\,ds +\int_1^2\frac14(2-s)\,ds =\left(\frac12+\frac18\right)+\frac18 =\frac34. $$ Together with the atom \(1/4\) at zero, the total is 1. The density describes the positive-count component; it does not represent the atom at zero.
Worked Example: Exponential Summands and Three Possible Counts
Suppose \(P(N=1)=1/2\), \(P(N=2)=1/3\), and \(P(N=3)=1/6\), independently of iid exponential summands with rate 2. Find the density of \(S_N\).
For one summand the density is \(g_1(s)=2e^{-2s}\) for \(s>0\). The fixed-count sums for two and three such summands have gamma densities $$ g_2(s)=4se^{-2s},\qquad g_3(s)=4s^2e^{-2s},\qquad s>0. $$ These are the fixed-count convolution laws. Weighting them by the probabilities of their counts gives $$ g_{S_N}(s) =\frac12(2e^{-2s})+\frac13(4se^{-2s})+\frac16(4s^2e^{-2s}) =e^{-2s}\left(1+\frac43s+\frac23s^2\right),\quad s>0. $$ There is no atom at zero because \(N\geq1\) with probability one and each exponential summand is positive with probability one. To check the density’s normalization, use \(\int_0^\infty e^{-2s}\,ds=1/2\), \(\int_0^\infty se^{-2s}\,ds=1/4\), and \(\int_0^\infty s^2e^{-2s}\,ds=1/4\). Then $$ \int_0^\infty g_{S_N}(s)\,ds =\frac12+\frac43\cdot\frac14+\frac23\cdot\frac14 =\frac12+\frac13+\frac16=1. $$
Common Pitfall: The Count Must Be Independent
Identical distribution of the summands alone is not enough to use the mixture formula with the unconditional fixed-sum laws. Independence of \(N\) and the entire sequence is what makes the conditional law given \(N=n\) match the unconditional law of a sum of \(n\) terms.
For a counterexample, take iid \(X_i\sim\operatorname{Bernoulli}(1/2)\) and define \(N=X_1\). Then \(N\) takes values 0 and 1 but is not independent of the summands. In fact, \(S_N=0\) when \(N=0\), while when \(N=1\), \(S_N=X_1=1\). Hence \(P(S_N=0)=P(S_N=1)=1/2\). If we incorrectly used the unconditional law of \(X_1\) for the \(N=1\) case, we would calculate \(P(S_N=0)=1/2+(1/2)(1/2)=3/4\), which is wrong: conditional on \(N=1\), \(X_1=1\) with probability one.
Write \(p_n=P(N=n)\), including \(n=0\) if it is possible.
For each \(n\), use the distribution of a sum of \(n\) iid summands; use a point mass at zero when \(n=0\).
Multiply each fixed-count law by \(p_n\) and add the resulting probabilities, distribution functions, or densities.
Verify that the component weights sum to one and account separately for atoms and continuous parts.
Why the Conditioning View Matters
Conditioning turns a random-length sum into a collection of fixed-length problems, for which convolution gives the relevant laws. The mixture formula then assembles those laws without requiring a new convolution rule for every possible count. It also makes the role of the count probabilities explicit: changing the law of \(N\) changes the mixture weights, even when the summand distribution stays the same.
A useful practical check is to ask whether the count-zero outcome has been included and whether any component has an atom. A density alone cannot describe a point mass, and omitting the empty sum can lose genuine probability at zero. For discrete laws, the corresponding check is that all possible values receive contributions from every count that can produce them.
Check Your Understanding
Use the mixture principle and the independence condition to answer the following.
- Write the distribution-function formula for \(S_N\), and explain what \(F_0\) represents.
- If \(P(N=0)>0\) and all positive-count sums have densities, where does the zero-count probability appear in the law of \(S_N\)?
- Suppose a fixed-count sum has mass \(q_n(k)\) at \(k\). How does it contribute to \(P(S_N=k)\)?
- Why does the mixture formula use the unconditional fixed-count law when \(N\) is independent of the summands?
- What can go wrong if \(N\) depends on \(X_1\), even though the \(X_i\) are iid?