Why Sums Need a Distribution Calculation
Knowing the separate distributions of two random variables does not by itself specify the distribution of their sum unless we also know how the variables relate. When the variables are independent, the distribution of \(S=X+Y\) can be calculated by combining every possible way that \(X\) and \(Y\) can produce the same sum. This calculation is called convolution.
Convolution is useful whenever a total is built from independent components: for example, a total claim amount from two independent policies, or the total time spent on two independent tasks. The formula differs in appearance for discrete and continuous variables, but the underlying idea is the same: collect all component outcomes that add to the specified total.
Why the Discrete Formula Works
For a fixed value \(s\), the event \(S=s\) can occur through any pair of values satisfying \(X+Y=s\). In particular, for each possible value \(x\) of \(X\), the only matching value of \(Y\) is \(s-x\). These possibilities for \(X\) are mutually exclusive, so their probabilities add. Independence gives the probability of each pair as the product of its marginal probabilities:
The sum can have more than one nonzero term. A frequent error is to count only one pair that produces \(s\), or to multiply \(p_X(s)\) by \(p_Y(s)\). Neither operation accounts for all the ways the two values can add to \(s\).
Worked Example: Combining Two Discrete Components
A hypothetical insurer models two independent supplementary payments, \(X\) and \(Y\), in units of $100. Suppose \(X=0\) with probability \(0.25\) and \(X=2\) with probability \(0.75\). Suppose \(Y=-1\) with probability \(0.60\) and \(Y=1\) with probability \(0.40\). Find the probability mass function of \(S=X+Y\), and calculate \(P(S\geq 1)\).
Method and assumptions. The variables are discrete and independent, so use the discrete convolution formula. List each pair and its sum; the probability of each pair is the product of its component probabilities.
| \(X\) | \(Y\) | \(S=X+Y\) | Pair probability |
|---|---|---|---|
| 0 | -1 | -1 | \(0.25(0.60)=0.15\) |
| 0 | 1 | 1 | \(0.25(0.40)=0.10\) |
| 2 | -1 | 1 | \(0.75(0.60)=0.45\) |
| 2 | 1 | 3 | \(0.75(0.40)=0.30\) |
The distinct sums are \(-1,1,3\). The value \(S=1\) comes from two different pairs, so their probabilities must be added:
Therefore, $$ P(S\geq 1)=P(S=1)+P(S=3)=0.55+0.30=0.85. $$ As a check, the full probability mass function sums to \(0.15+0.55+0.30=1.00\). The common mistake this method avoids is using just one decomposition for \(S=1\), which would miss either the pair \((0,1)\) or the pair \((2,-1)\).
Why the Continuous Formula Works
For continuous variables, a single point such as \(S=s\) has probability zero, so we calculate a density instead of adding point probabilities. A short change-of-variables argument gives the formula. Assume \(X\) and \(Y\) are independent and have densities. Transform the pair \((X,Y)\) to \((X,S)\), where \(S=X+Y\). The inverse transformation is \(x=x\), \(y=s-x\), and its Jacobian determinant has absolute value \(1\). Consequently the joint density of \(X\) and \(S\) is \(f_X(x)f_Y(s-x)\); integrating out \(x\) gives the marginal density of \(S\):
The factorization in the second line is exactly where independence is used. Without independence, the joint density need not equal the product of the marginal densities, and this convolution formula cannot be used as written. The integral may be taken over the whole real line because densities are zero outside their supports; in a calculation, it is often simpler to integrate only where both factors are nonzero.
Worked Example: Convolving Two Exponential Densities
Let \(X\) and \(Y\) be independent, with \(X\) having an exponential distribution of rate \(1\) and \(Y\) an exponential distribution of rate \(2\). Thus \(f_X(x)=e^{-x}\) for \(x>0\), \(f_Y(y)=2e^{-2y}\) for \(y>0\), and each density is zero otherwise. Find the density of \(S=X+Y\), then calculate \(P(S\leq\ln 2)\).
Method and assumptions. Both variables have densities and are independent, so use continuous convolution. Since both variables are positive, a sum \(s\) is possible only for \(s>0\). For such an \(s\), both \(x>0\) and \(s-x>0\) require \(0<x<s\).
For \(s\leq 0\), the density is zero. To obtain the requested probability, integrate the density from \(0\) to \(\ln 2\):
Thus the density is \(2(e^{-s}-e^{-2s})\) for \(s>0\), and the requested probability is \(0.2500\) to four decimal places. As a check, the cumulative distribution function for \(s>0\) is \(1-2e^{-s}+e^{-2s}\), which at \(s=\ln 2\) is \(1-1+\tfrac14=0.25\). A common mistake is to integrate the density but mis-evaluate the exponential terms at the endpoint; here \(e^{-\ln 2}=1/2\) and \(e^{-2\ln 2}=1/4\).
Using Supports to Set Up the Integral
A continuous convolution is often easiest when its integration interval is identified before the integrand is simplified. For a given \(s\), the integrand is nonzero only when \(x\) is in the support of \(X\) and \(s-x\) is in the support of \(Y\). The intersection of those conditions determines the actual limits. This is not a new probability rule; it is a way to apply the formula without integrating regions where the integrand is zero.
Worked Example: Sum of Two Uniform Variables
Let \(X\) and \(Y\) be independent, with \(X\) uniform on \((0,1)\) and \(Y\) uniform on \((0,2)\). Find the density of \(S=X+Y\) and calculate \(P(S\leq 1)\).
Method and assumptions. The densities are \(f_X(x)=1\) for \(0<x<1\) and \(f_Y(y)=1/2\) for \(0<y<2\), and zero otherwise. In the convolution integrand, both factors are nonzero when \(0<x<1\) and \(0<s-x<2\). The latter condition is equivalent to \(s-2<x<s\). Thus the integration interval is the intersection of \((0,1)\) and \((s-2,s)\).
The support of the sum is \(0<s<3\). For \(0<s<1\), the intersection is \((0,s)\), giving
For \(1\leq s<2\), the intersection is \((0,1)\), so
For \(2\leq s<3\), the intersection is \((s-2,1)\). Therefore,
The density is zero outside \(0<s<3\). Because \(S\leq1\) lies in the first part of the density, $$ P(S\leq1)=\int_0^1\frac{s}{2}\,ds=\left[\frac{s^2}{4}\right]_0^1=0.25. $$ To check the piecewise density, its total integral is \(1/4+1/2+1/4=1\): the three parts integrate respectively to \(1/4\), \(1/2\), and \(1/4\). The common mistake avoided here is using the full support \((0,3)\) as the integration interval for every \(s\); the allowable \(x\)-values change with \(s\).
Checks and Common Exam Traps
Convolution calculations are easier to audit if the result is checked against the model before moving on. For discrete variables, the possible sums must come from adding values in the two supports, and all resulting probabilities must add to one. For continuous variables, the density must be nonnegative, vanish outside the possible range of the sum, and integrate to one.
Identify whether the variables are discrete or have densities, and verify that independence is given or otherwise justified.
For a discrete value \(s\), include every pair \(x,s-x\). For a density at \(s\), retain every \(x\) for which both component densities are nonzero.
Multiply the component probabilities or densities, then sum or integrate. Check the support and total probability or total density area.
- Multiplying matching marginal probabilities is not convolution. The probability of a sum collects all pairs whose values add to the target.
- Independence matters. A covariance of zero alone does not establish independence, so it does not justify replacing a joint probability or density by a product.
- Support determines the limits. In a continuous problem, the integration range depends on the target value \(s\), even though the convolution formula is written over the whole real line.
- Do not confuse a density value with a probability. For continuous \(S\), \(f_S(s)\) is a density; probabilities come from integrating the density over an interval.
Check Your Understanding
Use the stated independence assumptions and check each result against the possible sums or support.
- Independent discrete variables have \(P(X=-1)=0.4\), \(P(X=1)=0.6\), \(P(Y=0)=0.5\), and \(P(Y=3)=0.5\). Find the mass function of \(S=X+Y\). (Answer: \(P(S=-1)=0.20,\ P(S=1)=0.30,\ P(S=2)=0.20,\ P(S=4)=0.30\).)
- Independent variables are each uniform on \((0,1)\). Use convolution to find \(f_{X+Y}(s)\). (Answer: \(f_{X+Y}(s)=s\) for \(0<s<1\), \(f_{X+Y}(s)=2-s\) for \(1\leq s<2\), and \(0\) otherwise.)
- Independent variables have densities \(f_X(x)=3e^{-3x}\) for \(x>0\) and \(f_Y(y)=e^{-y}\) for \(y>0\), each zero otherwise. Find the density of \(S=X+Y\). (Answer: \(f_S(s)=\frac{3}{2}(e^{-s}-e^{-3s})\) for \(s>0\), and \(0\) otherwise.)
- For the variables in Question 3, calculate \(P(S\leq\ln 2)\). (Answer: \(0.3125\).)
- Suppose \(X\) and \(Y\) have densities but are dependent. Is \(\int_{-\infty}^{\infty}f_X(x)f_Y(s-x)\,dx\) necessarily the density of \(X+Y\)? (Answer: No; without independence the joint density need not factor into the product of the marginal densities.)