Why the Sum Requires an Integral
For independent discrete random variables, the probability that a sum equals a particular value is found by adding the probabilities of all compatible pairs of summand values. For continuous random variables, an individual value has probability zero, so the corresponding operation is an integral over compatible values. The main practical task is identifying which values are compatible: the supports of the two summands determine the limits of integration.
Let \(X\) and \(Y\) be independent continuous random variables with densities \(f_X\) and \(f_Y\), and write \(S=X+Y\). Independence gives the joint density \(f_X(x)f_Y(y)\). We will use this product structure to find a density for \(S\), and then see how its limits change when the supports are shifted or bounded.
Deriving the Continuous Convolution Formula
The integral can be understood by conditioning on \(X\). Given \(X=x\), the sum is \(x+Y\), so its conditional density at \(s\) is \(f_Y(s-x)\). Averaging this conditional density over the possible values of \(X\) suggests integrating against \(f_X(x)\). The following argument verifies the resulting density directly, without relying on informal pointwise conditioning.
Proof. Let \(A\) be any Borel subset of the real line. Independence and the product density give
The integrand is nonnegative, so Tonelli’s theorem justifies changing the order of integration. For each fixed \(x\), make the translation \(s=x+y\), which has \(dy=ds\). Then
The last change of order is again justified by Tonelli’s theorem. The expression in braces is measurable and nonnegative, and its integral over the real line is one, as follows by taking \(A=\mathbb R\). Thus it is a density of \(S\), up to equality almost everywhere. Interchanging the roles of \(X\) and \(Y\) gives the alternative integral. \(\square\)
The theorem guarantees a density almost everywhere. If finite versions of the input densities are used, changing either density on a Lebesgue-null set leaves the convolution integral unchanged at each fixed \(s\): a changed set for \(f_X\) is null in \(x\), and a changed set \(N\) for \(f_Y\) affects only \(x\in s-N\), also a null set. This pointwise invariance is useful when evaluating the displayed integral; the defining property of a density, however, is still equality almost everywhere.
Finding the Limits from the Supports
Suppose \(X\) has density zero outside an interval \((a,b)\), and \(Y\) has density zero outside \((c,d)\). In the convolution integral, a contribution requires both \(a<x<b\) and \(c<s-x<d\). The second pair of inequalities is equivalent to \(s-d<x<s-c\). Their intersection gives the limits
Accordingly, the integral is zero if the lower limit is at least the upper limit. Endpoints can be included or excluded without changing the integral. The same reasoning applies to infinite endpoints. When the support is not a single interval, use the original constraints rather than forcing the limits into this interval formula.
Worked Example: Two Exponentials with the Same Lower Endpoint
Let \(X\sim\operatorname{Exp}(2)\) and \(Y\sim\operatorname{Exp}(5)\) be independent, where an exponential distribution with rate \(\lambda\) has density \(\lambda e^{-\lambda x}\) for \(x>0\). Both supports require nonnegative values. For a fixed \(s>0\), \(x>0\) and \(s-x>0\), so \(0<x<s\). If \(s\leq 0\), no such values exist and the density is zero.
For \(s>0\), the convolution is
This expression is nonnegative for \(s>0\), since \(e^{-2s}>e^{-5s}\). Its integral is \(\frac{10}{3}(\frac12-\frac15)=1\), confirming the normalization. Thus the density is zero for \(s\leq0\) and has the displayed form for \(s>0\).
Worked Example: Shifted Exponentials and a Shifted Lower Limit
Let \(X=1+U\) and \(Y=-2+V\), where \(U\sim\operatorname{Exp}(3)\), \(V\sim\operatorname{Exp}(2)\), and \(U,V\) are independent. Then \(X\) has density \(3e^{-3(x-1)}\) for \(x>1\), while \(Y\) has density \(2e^{-2(y+2)}\) for \(y>-2\). The sum cannot be below \(-1\). For \(s>-1\), the constraints \(x>1\) and \(s-x>-2\) give \(1<x<s+2\).
Therefore
The density is zero for \(s\leq-1\). To check its integral, set \(t=s+1\), so \(t>0\): \(\int_{-1}^{\infty}f_S(s)\,ds=6(\frac12-\frac13)=1\). The support constraints, not just the familiar exponential shapes, produce the shifted integration interval.
Worked Example: Bounded Supports with Nonuniform Densities
Let \(X\) and \(Y\) be independent, with densities \(f_X(x)=2x\) for \(0<x<1\), and \(f_Y(y)=2(1-y)\) for \(0<y<1\), each zero elsewhere. Both are valid densities: each integrates to one on \((0,1)\). Their sum has support within \((0,2)\). The constraints \(0<x<1\) and \(0<s-x<1\) yield \(0<x<s\) when \(0<s<1\), and \(s-1<x<1\) when \(1\leq s<2\).
For \(0<s<1\), calculate
For \(1\leq s<2\), put \(t=2-s\), so \(0<t\leq1\). In the integral from \(s-1=1-t\) to \(1\), set \(z=1-x\). Then \(0<z<t\), \(x=1-z\), and \(1-(s-x)=t-z\). Hence
The density is zero outside \((0,2)\). It is nonnegative on each interval. Its integral is \(2\int_0^1(2s^2-\frac23s^3)\,ds=2(\frac23-\frac16)=1\): the two pieces have equal integrals after the substitution \(t=2-s\). The change in the integration limits at \(s=1\) occurs because the overlap of the two support intervals changes there.
Common Pitfalls and a Useful Check
- Using the full real line as though every value contributes. Writing the convolution over all \(x\) is valid, but the integrand is zero unless both support constraints hold. For calculation, find their intersection first.
- Using the wrong translated constraint. The second density is evaluated at \(s-x\), so its support condition is on \(s-x\), not on \(x-s\). Solve that condition explicitly before setting the limits.
- Conditioning without accounting for the distribution of the conditioning variable. The conditional density \(f_Y(s-x)\) must be averaged over \(X\), which contributes the factor \(f_X(x)\,dx\).
- Assuming a formula on part of the support applies everywhere. With bounded supports, the overlap can change as \(s\) changes. Recompute the intersection when its endpoints switch.
A useful final check is to verify that the proposed density is nonnegative, vanishes outside the possible range of the sum, and integrates to one. These checks do not replace a correct derivation, but they often reveal a missing factor, an incorrect sign, or a support limit that was not adjusted.
Check Your Understanding
For each question, identify the support constraints before attempting the integral.
- If \(X\) and \(Y\) are independent and both have densities supported on \((0,\infty)\), what are the convolution limits for a fixed \(s>0\)?
- If the supports are \(1<x<4\) and \(-2<y<3\), write the constraints on \(x\) in the convolution for \(S=X+Y=s\).
- Why does the convolution formula include \(f_X(x)\) as well as the conditional density \(f_Y(s-x)\)?
- For densities supported on \((a,b)\) and \((c,d)\), derive the lower and upper integration limits for a fixed \(s\).
- Name three checks that can help identify an error in a proposed density for a sum.