Sums of Random Variables and Convolution
Suppose you know exactly how long a coffee order takes to prepare. Separately, you also know how long it takes to walk to the counter. But you want the distribution of the total time a customer spends. If the two times are random and independent, their sum is a new random variable. Its law is not simply "add the two distributions." Instead, it is a genuine integral (or sum) that blends the two shapes together. This blending operation is called convolution. It is one of the most-used tools in all of probability. Convolution matters because sums are everywhere. Total insurance claims are sums of individual claims. Sample means are (rescaled) sums of observations. Random walk positions are sums of steps. Noise in a signal is often a sum of independent contributions. Whenever a model is additive and the pieces are independent, the convolution formula applies. It is the exact, computable machine that produces the distribution of the whole from the distributions of the parts. The big picture is that convolution is a bilinear, commutative, associative operation on distributions. It is the same operation that appears in Fourier analysis, signal processing, and combinatorics (generating functions). It converts a two-dimensional joint-distribution question ("what is , integrated over a diagonal region") into a one-dimensional formula. This is the first serious payoff of understanding joint distributions and independence together, rather than as separate topics. This article states and proves the discrete and continuous convolution formulas from first principles. It works two asymmetric numerical examples: a mixed pair of discrete distributions, and a mixed pair of continuous ones. It shows exactly what breaks when independence is dropped. Finally, it points forward to the tools — characteristic functions and the Central Limit Theorem — that make convolution tractable for sums of many variables at once.
- If are independent, the distribution of is the convolution of the distributions of and .
- Discrete case: , summing over the joint support.
- Continuous case: , an integral over the diagonal .
- Convolution is commutative and associative, so sums of many independent variables reduce to repeated pairwise convolution.
- Independence is essential: without it the joint density does not factor, and the formula is provably false.
- Key idea: summing independent random variables slices the joint distribution along diagonals, and convolution is the formula for the mass or density along each slice.
Where this lives today
Convolution of distributions is the working engine behind an enormous range of applied and theoretical results. In statistics, the distribution of a sample sum or sample mean of independent observations is a repeated convolution, and this underlies exact tests (e.g. exact distributions of sums of independent chi-squared or gamma variables) as well as the asymptotic machinery of the Central Limit Theorem. In signal processing and electrical engineering, convolution of probability densities is the probabilistic shadow of convolution of signals: adding independent noise sources to a signal literally convolves their density functions, and this is why engineers routinely move to the frequency domain via Characteristic Functions (Fourier transforms), where convolution becomes ordinary multiplication. In actuarial science and risk management, aggregate claim distributions are convolutions of individual claim-size distributions (compounded further over a random number of claims), and numerical convolution (or its transform-domain shortcut) is a standard computational tool. In statistical physics, sums of independent microscopic contributions (e.g. random walks, occupation numbers) are analyzed via convolution, connecting directly to the derivation of the Bivariate Normal Distribution as a stable limit of many small independent additive effects. In cryptography and coding theory, convolution of distributions over finite groups (a generalization of the real-line case) governs the analysis of linear feedback shift registers and differential cryptanalysis, where XOR-sums of independent bit-strings convolve mod-2 distributions. Finally, in pure probability, convolution stability (Poisson+Poisson=Poisson, Normal+Normal=Normal, Gamma+Gamma=Gamma with matching rate) is the first hint of the deeper theory of infinitely divisible distributions and stable laws.
Ask the tutor: Can you show me how to convolve two Gamma distributions with different shape parameters but the same rate, step by step?
Let and be independent random variables defined on a common probability space .
Discrete case. If and take values in a countable set (e.g. or ) with probability mass functions and , then the convolution is the function
the sum ranging over all for which both and are defined (equivalently, over all , with the convention off the support).
Continuous case. If and have probability density functions and (with respect to Lebesgue measure), the convolution is the function
whenever this integral exists (it always exists for a.e. when are densities, by Tonelli's theorem). In either case, if , then has mass function (discrete case) or density function (continuous case). This is the content of the Central Limit Theorem's main computational prerequisite, and it uses Independence of Random Variables essentially.
Intuition
Picture the joint distribution of as mass or density spread over the plane. The event (discrete) or (continuous) is exactly the set of points lying on, or infinitesimally near, the diagonal line . To find the total probability of landing on that diagonal, you sweep along it: for each possible value of , the partner value must be , and independence tells you the joint mass or density at that point is simply the product . Summing or integrating that product over all is precisely the convolution formula — it is a weighted average of shifted and flipped, with weights . This "flip and slide" picture is why convolution is often visualized as sliding one density past another: as increases, the diagonal line moves outward, and the convolution integral tracks how much of the joint mass currently intersects it.
Building the picture with a discrete lattice
For discrete variables the same idea appears as a lattice sum: fix , and the achievable pairs trace a discrete anti-diagonal.
Let be independent random variables on and let .
(a) Discrete case. Suppose and take values in a countable set closed under addition considerations (in practice ), with mass functions , . Then for every ,
(b) Continuous case. Suppose and are jointly such that each has a density, and respectively, with respect to Lebesgue measure. Then has a density , and
Proof of (a). Fix . The event is the disjoint union, over all possible values of , of the events :
This is a genuine disjoint union: if satisfies and simultaneously with this is impossible, so distinct give disjoint events. Also every outcome with has equal to some , so the union covers the event. Since is countable, countable additivity of gives
Independence of and means, by definition, that for all Borel (here, all) sets , ; applying this with , gives
Substituting proves (a). The sum is absolutely convergent (all terms are nonnegative and the total sum over all is , shown below), so there is no issue of rearrangement.
Proof of (b). Because are independent with densities , their joint density is the product . This itself requires justification: independence gives, for all Borel ,
by Fubini–Tonelli (the integrand is nonnegative and measurable, so Tonelli applies unconditionally). Since the class of "rectangles" is a -system generating the Borel -algebra on , and both sides are measures in agreeing on this -system with total mass , the uniqueness of extension of measures (Dynkin's – theorem) shows
So is indeed a joint density of . Now compute the CDF of . Fix and let , a Borel (in fact closed) subset of . Then
By Tonelli's theorem (integrand nonnegative, measurable) we may integrate first in for fixed , restricting to , and then in :
The map is absolutely continuous in (it is a CDF shifted), with for a.e. (for each fixed , by the Lebesgue differentiation theorem applied to , since ). We now differentiate with respect to . Because is a fixed integrable function and integrates to , Fubini's theorem justifies differentiating under the integral sign in (the derivative is dominated, after integrating over a neighborhood of , by an integrable envelope obtained from type bounds; rigorously this is the standard theorem that if then is absolutely continuous in with derivative for a.e. — this is a direct consequence of Fubini's theorem applied to
the last equality by Tonelli, swapping the order of the (nonnegative) double integral). This last display shows where ; since this holds for all , is absolutely continuous with density , i.e. almost everywhere.
∎Convolution of mass functions (or densities) is commutative, , and associative,
for independent (and likewise for densities). Consequently, if are mutually independent, the distribution of is obtained by convolving all individual distributions together, in any order or grouping.
Commutativity is immediate from the formula: substituting in gives , the same sum with roles swapped (the continuous case is identical with a change of variables in the integral, using that Lebesgue measure is translation- and reflection-invariant). For associativity, write ; since is independent of (a standard consequence of mutual independence — the pair is independent of whenever are jointly independent, provable via the same -system argument used above applied to products of three sets), and are independent, so 's mass function is by the Theorem applied twice. Symmetrically one gets for . Since as random variables, the two expressions are equal. Induction extends this to variables.
∎Worked examples
Example 1 (discrete, asymmetric parameters): sum of two independent Poissons with different rates. Let and be independent, with and (deliberately unequal, to avoid masking errors with symmetry). We compute the distribution of using the convolution formula and show . By the Theorem, for ,
(The sum truncates to since for .) Factor out and multiply and divide by :
using the binomial theorem in the last step. With , this says exactly. Let's verify a specific numeric value directly, without shortcuts, to make sure the formula is being used correctly: compute two ways. Direct convolution sum ():
Compute term by term ( factored out at the end):
- :
- :
- :
- :
Sum: (this equals , confirming the binomial identity numerically). So
This is exactly 's formula at : . Numerically, , so . This matches direct evaluation of the Poisson(7) pmf at 3, confirming the convolution computation is internally consistent.
Example 2 (continuous, asymmetric parameters): sum of an Exponential and a Uniform. Let with (density for , else ), independent of (density for , else ). These are deliberately of different families with mismatched shapes. Find the density of . By the Theorem,
The indicator restricts to , intersected with . We split into cases based on . Case : no overlap ( and are incompatible), so . Case : the constraint (since ) and gives integration range :
Case : the constraint becomes and , so the range is :
So altogether,
Sanity checks. Continuity at : from the middle branch, ; from the top branch, . They agree, as they must since is continuous (the convolution of a bounded density with an function is continuous). Total mass check:
First integral: . Second integral: . Sum: . The total integrates to exactly , confirming is a genuine density.
The convolution formula uses independence essentially, in the step (discrete) or (continuous). Drop independence and the formula becomes false. Take and let (perfectly dependent, definitely not independent), both with marginal pmf . The true distribution of is
Now apply the convolution formula as if were independent, using their correct marginal pmfs :
The convolution formula predicts , but the true value is . The two disagree completely: the formula is not merely imprecise here, it is wrong by the maximal possible amount. This shows that knowing the two marginal distributions is never enough to determine the distribution of the sum without an assumption like independence (or, more generally, exact knowledge of the joint law).
Scope, edge cases & common traps
| Situation | What to do |
|---|---|
| independent, both discrete on | Use , sum over valid only |
| independent, both continuous | Use ; watch support limits carefully |
| independent, one discrete one continuous | is typically neither purely discrete nor continuous (mixed); needs a separate mixture treatment, not the formulas above directly |
| dependent | Convolution formula is false in general; must use the actual joint distribution |
| Sum of more than two variables | Convolve pairwise, associativity guarantees consistent answer (see Corollary) |
| Support of | Always check where the shifted/reflected density overlaps — get integration bounds right (Example 2) |
The mathematician behind it
Origins · 1 minSiméon Denis Poisson and how this was discovered
Poisson developed much of the analytic apparatus — generating functions, limits of binomial sums, and the distribution now named for him — that makes convolution identities like "Poisson + Poisson = Poisson" both natural and checkable by direct calculation, as in the worked example above. His broader work spanned potential theory, mechanics, and probability, and the convolution-stability of the Poisson family remains one of the cleanest illustrations of how summing independent random effects can preserve a distributional shape exactly, a phenomenon later generalized and explained systematically through characteristic functions.
Why is it called "convolution" and not just "sum of distributions"?
The word describes the operation's shape, not its outcome: you are not adding the two functions and pointwise, you are "folding" one function over and sliding it across the other while integrating the product at each position. The term comes from the Latin convolvere, "to roll together," matching exactly the flip-and-slide picture used in the Intuition section. This same operation appears throughout mathematics — in Fourier analysis, image processing, and PDE theory — precisely because "distribution of a sum of independent effects" and "smoothing one function by another" turn out to be the same mathematical operation.
Does the convolution formula work if X and Y are independent but one is discrete and the other continuous?
Not with the formulas given here as stated, no. If is discrete and is continuous, is typically a mixture: conditional on , the variable is continuous with density , so the overall density of is . This is a valid and useful formula, but it's a different object from either pure case in the Theorem — it's sometimes called a "mixed convolution," and it is still built from the same independence argument used in the proof.
Is convolution the only way to find the distribution of X+Y?
No. Other standard tools include moment generating functions or Characteristic Functions, where convolution of densities corresponds to multiplication of transforms — often much easier algebraically, especially for sums of many variables. There is also the direct CDF approach ( computed as a double integral over the region ), which is essentially the proof technique used here before differentiating. For special families (Normal, Gamma, Poisson, Binomial with common parameter), convolution stability lets you skip the integral entirely and recognize the answer's family by pattern matching, as in Example 1.
Why does the proof need Fubini/Tonelli rather than just "obviously" swapping integrals?
Swapping the order of integration in a double integral is not automatic; it requires either nonnegativity of the integrand (Tonelli) or absolute integrability (Fubini). Densities are nonnegative, so Tonelli applies without extra hypotheses, which is exactly why the proof invokes it explicitly rather than asserting the swap is "clear." Skipping this step is a common way rigor is lost when this proof is stated informally, even though for well-behaved densities the swap does turn out to be valid.
Does the convolution formula assume X and Y have the same distribution?
No — this is a common misconception from seeing too many symmetric examples. The Theorem and both worked examples here deliberately use different distributions and different parameters ( with ; with ) to show the formula applies to any pair of independent random variables, discrete or continuous, regardless of whether they share a distributional family or parameter values.
How does convolution connect to the Central Limit Theorem?
The Central Limit Theorem describes the limiting shape of repeated convolutions: as you convolve the same distribution with itself many times (rescaling appropriately), the result converges to a Normal density, regardless of the original shape (subject to finite variance). Directly computing an -fold convolution is usually intractable by hand, which is exactly why Characteristic Functions are introduced next — they convert convolution into multiplication, making the limiting behavior as tractable via pointwise convergence of a product of transforms.
Can convolution be negative, or exceed reasonable bounds, if I mess up the formula?
If you correctly restrict the integration/summation to the true overlap of supports and use genuine nonnegative densities or mass functions, the convolution is automatically nonnegative and integrates/sums to exactly (as verified numerically in both worked examples). If your computed "density" comes out negative somewhere, or fails to integrate to 1, that is a reliable signal you have mismatched support limits or misapplied independence — treat it as an error flag rather than patching the formula.