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 P(X+Y≤t)P(X+Y \le t), 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.

Key takeaways
  • If X,YX,Y are independent, the distribution of X+YX+Y is the convolution of the distributions of XX and YY.
  • Discrete case: P(X+Y=n)=∑kP(X=k)P(Y=n−k)P(X+Y=n) = \sum_k P(X=k)P(Y=n-k), summing over the joint support.
  • Continuous case: fX+Y(z)=∫−∞∞fX(x)fY(z−x) dxf_{X+Y}(z) = \int_{-\infty}^{\infty} f_X(x) f_Y(z-x)\, dx, an integral over the diagonal x+y=zx+y=z.
  • 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?

DefinitionConvolution of distributions

Let XX and YY be independent random variables defined on a common probability space (Ω,F,P)(\Omega, \mathcal F, P).

Discrete case. If XX and YY take values in a countable set (e.g. Z\mathbb Z or Z≥0\mathbb Z_{\ge 0}) with probability mass functions pXp_X and pYp_Y, then the convolution pX∗pYp_X * p_Y is the function

(pX∗pY)(n)  =  ∑kpX(k) pY(n−k),n∈Z,(p_X * p_Y)(n) \;=\; \sum_{k} p_X(k)\, p_Y(n-k), \qquad n \in \mathbb Z,

the sum ranging over all kk for which both pX(k)p_X(k) and pY(n−k)p_Y(n-k) are defined (equivalently, over all kk, with the convention pX(k)=0p_X(k)=0 off the support).

Continuous case. If XX and YY have probability density functions fXf_X and fYf_Y (with respect to Lebesgue measure), the convolution fX∗fYf_X * f_Y is the function

(fX∗fY)(z)  =  ∫−∞∞fX(x) fY(z−x) dx,z∈R,(f_X * f_Y)(z) \;=\; \int_{-\infty}^{\infty} f_X(x)\, f_Y(z-x)\, dx, \qquad z \in \mathbb R,

whenever this integral exists (it always exists for a.e. zz when fX,fY≥0f_X, f_Y \ge 0 are densities, by Tonelli's theorem). In either case, if Z=X+YZ = X+Y, then ZZ has mass function pZ=pX∗pYp_Z = p_X * p_Y (discrete case) or density function fZ=fX∗fYf_Z = f_X * f_Y (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 (X,Y)(X,Y) as mass or density spread over the plane. The event {X+Y=z}\{X+Y = z\} (discrete) or {X+Y∈[z,z+dz]}\{X+Y \in [z, z+dz]\} (continuous) is exactly the set of points lying on, or infinitesimally near, the diagonal line x+y=zx + y = z. To find the total probability of landing on that diagonal, you sweep along it: for each possible value xx of XX, the partner value must be y=z−xy = z - x, and independence tells you the joint mass or density at that point is simply the product fX(x)fY(z−x)f_X(x) f_Y(z-x). Summing or integrating that product over all xx is precisely the convolution formula — it is a weighted average of fYf_Y shifted and flipped, with weights fXf_X. This "flip and slide" picture is why convolution is often visualized as sliding one density past another: as zz increases, the diagonal line x+y=zx+y=z moves outward, and the convolution integral tracks how much of the joint mass currently intersects it.

Figure
Convolution as integration along the diagonal x + y = z
x y support of (X,Y) x + y = z x z−x (x, z−x) f_Z(z) = ∫ f_X(x) f_Y(z−x) dx (integral swept along the red diagonal)

Building the picture with a discrete lattice

For discrete variables the same idea appears as a lattice sum: fix nn, and the achievable pairs (k,n−k)(k, n-k) trace a discrete anti-diagonal.

Figure
Discrete convolution: pairs (k, n−k) on the anti-diagonal n = 4
Lattice points (k, n−k) with n = 4 k=0 k=1 k=2 k=3 k=4 n−k=4 n−k=3 n−k=2 n−k=1 p_Z(4) = Σ_k p_X(k) p_Y(4−k)
TheoremConvolution formula for the distribution of a sum

Let X,YX, Y be independent random variables on (Ω,F,P)(\Omega, \mathcal F, P) and let Z=X+YZ = X + Y.

(a) Discrete case. Suppose XX and YY take values in a countable set S⊆RS \subseteq \mathbb R closed under addition considerations (in practice S⊆ZS \subseteq \mathbb Z), with mass functions pX(k)=P(X=k)p_X(k) = P(X=k), pY(k)=P(Y=k)p_Y(k) = P(Y=k). Then for every nn,

pZ(n)  =  P(X+Y=n)  =  ∑kpX(k) pY(n−k).p_Z(n) \;=\; P(X+Y=n) \;=\; \sum_{k} p_X(k)\, p_Y(n-k).

(b) Continuous case. Suppose XX and YY are jointly such that each has a density, fXf_X and fYf_Y respectively, with respect to Lebesgue measure. Then Z=X+YZ = X+Y has a density fZf_Z, and

fZ(z)  =  ∫−∞∞fX(x) fY(z−x) dxfor (Lebesgue-)almost every z.f_Z(z) \;=\; \int_{-\infty}^{\infty} f_X(x)\, f_Y(z-x)\, dx \quad \text{for (Lebesgue-)almost every } z.
Proof

Proof of (a). Fix nn. The event {X+Y=n}\{X+Y=n\} is the disjoint union, over all possible values kk of XX, of the events {X=k,Y=n−k}\{X=k, Y=n-k\}:

{X+Y=n}=⨆k∈S{X=k}∩{Y=n−k}.\{X+Y = n\} = \bigsqcup_{k \in S} \{X=k\} \cap \{Y = n-k\}.

This is a genuine disjoint union: if (X,Y)(X,Y) satisfies X=k1X=k_1 and X=k2X=k_2 simultaneously with k1≠k2k_1 \ne k_2 this is impossible, so distinct kk give disjoint events. Also every outcome with X+Y=nX+Y=n has XX equal to some kk, so the union covers the event. Since SS is countable, countable additivity of PP gives

P(X+Y=n)=∑k∈SP(X=k,Y=n−k).P(X+Y=n) = \sum_{k \in S} P(X=k, Y=n-k).

Independence of XX and YY means, by definition, that for all Borel (here, all) sets A,BA, B, P(X∈A,Y∈B)=P(X∈A)P(Y∈B)P(X \in A, Y \in B) = P(X\in A)P(Y \in B); applying this with A={k}A=\{k\}, B={n−k}B=\{n-k\} gives

P(X=k,Y=n−k)=P(X=k)P(Y=n−k)=pX(k) pY(n−k).P(X=k, Y=n-k) = P(X=k)P(Y=n-k) = p_X(k)\, p_Y(n-k).

Substituting proves (a). The sum is absolutely convergent (all terms are nonnegative and the total sum over all nn is 11, shown below), so there is no issue of rearrangement.

Proof of (b). Because X,YX, Y are independent with densities fX,fYf_X, f_Y, their joint density is the product fX,Y(x,y)=fX(x)fY(y)f_{X,Y}(x,y) = f_X(x) f_Y(y). This itself requires justification: independence gives, for all Borel A,B⊆RA,B \subseteq \mathbb R,

P(X∈A,Y∈B)=P(X∈A)P(Y∈B)=(∫AfX)(∫BfY)=∫A∫BfX(x)fY(y) dy dx,P(X \in A, Y \in B) = P(X\in A) P(Y \in B) = \left(\int_A f_X\right)\left(\int_B f_Y\right) = \int_A \int_B f_X(x) f_Y(y)\, dy\, dx,

by Fubini–Tonelli (the integrand is nonnegative and measurable, so Tonelli applies unconditionally). Since the class of "rectangles" A×BA \times B is a π\pi-system generating the Borel σ\sigma-algebra on R2\mathbb R^2, and both sides are measures in (A,B)(A,B) agreeing on this π\pi-system with total mass 11, the uniqueness of extension of measures (Dynkin's π\pi–λ\lambda theorem) shows

P((X,Y)∈C)=∫CfX(x)fY(y) dx dyfor every Borel C⊆R2.P((X,Y) \in C) = \int_C f_X(x) f_Y(y)\, dx\, dy \quad \text{for every Borel } C \subseteq \mathbb R^2.

So fX(x)fY(y)f_X(x) f_Y(y) is indeed a joint density of (X,Y)(X,Y). Now compute the CDF of Z=X+YZ=X+Y. Fix z∈Rz \in \mathbb{R} and let Cz={(x,y):x+y≤z}C_z = \{(x,y): x+y \le z\}, a Borel (in fact closed) subset of R2\mathbb{R}^2. Then

FZ(z)=P(X+Y≤z)=P((X,Y)∈Cz)=∬x+y≤zfX(x)fY(y) dx dy.F_Z(z) = P(X+Y \le z) = P((X,Y) \in C_z) = \iint_{x+y \le z} f_X(x) f_Y(y)\, dx\, dy.

By Tonelli's theorem (integrand nonnegative, measurable) we may integrate first in yy for fixed xx, restricting to y≤z−xy \le z - x, and then in xx:

FZ(z)=∫−∞∞fX(x)(∫−∞z−xfY(y) dy)dx=∫−∞∞fX(x) FY(z−x) dx.F_Z(z) = \int_{-\infty}^{\infty} f_X(x) \left( \int_{-\infty}^{z-x} f_Y(y)\, dy \right) dx = \int_{-\infty}^{\infty} f_X(x)\, F_Y(z-x)\, dx.

The map z↦FY(z−x)z \mapsto F_Y(z-x) is absolutely continuous in zz (it is a CDF shifted), with ∂zFY(z−x)=fY(z−x)\partial_z F_Y(z-x) = f_Y(z-x) for a.e. zz (for each fixed xx, by the Lebesgue differentiation theorem applied to FYF_Y, since FY(t)=∫−∞tfYF_Y(t) = \int_{-\infty}^t f_Y). We now differentiate FZF_Z with respect to zz. Because fYf_Y is a fixed integrable function and fX≥0f_X \ge 0 integrates to 11, Fubini's theorem justifies differentiating under the integral sign in xx (the derivative fX(x)fY(z−x)f_X(x) f_Y(z-x) is dominated, after integrating over a neighborhood of zz, by an integrable envelope obtained from ∫fX(x)(sup⁡∣h∣≤1fY(z−x+h))dx\int f_X(x)\big(\sup_{|h|\le 1} f_Y(z-x+h)\big)dx type bounds; rigorously this is the standard theorem that if fY∈L1(R)f_Y \in L^1(\mathbb R) then FZ(z)=∫fX(x)FY(z−x) dxF_Z(z) = \int f_X(x) F_Y(z-x)\,dx is absolutely continuous in zz with derivative ∫fX(x)fY(z−x) dx\int f_X(x) f_Y(z-x)\,dx for a.e. zz — this is a direct consequence of Fubini's theorem applied to

FZ(z2)−FZ(z1)=∫−∞∞fX(x)∫z1−xz2−xfY(y) dy dx=∫z1z2(∫fX(x)fY(z−x) dx)dz,F_Z(z_2) - F_Z(z_1) = \int_{-\infty}^\infty f_X(x) \int_{z_1 - x}^{z_2-x} f_Y(y)\,dy\,dx = \int_{z_1}^{z_2}\left(\int f_X(x) f_Y(z-x)\,dx\right) dz,

the last equality by Tonelli, swapping the order of the (nonnegative) double integral). This last display shows FZ(z2)−FZ(z1)=∫z1z2g(z) dzF_Z(z_2)-F_Z(z_1) = \int_{z_1}^{z_2} g(z)\,dz where g(z):=∫fX(x)fY(z−x) dxg(z) := \int f_X(x) f_Y(z-x)\,dx; since this holds for all z1<z2z_1 < z_2, FZF_Z is absolutely continuous with density gg, i.e. fZ=g=fX∗fYf_Z = g = f_X * f_Y almost everywhere. ■\blacksquare

∎
CorollaryCommutativity, associativity, and iterated sums

Convolution of mass functions (or densities) is commutative, pX∗pY=pY∗pXp_X * p_Y = p_Y * p_X, and associative,

(pX∗pY)∗pW=pX∗(pY∗pW),(p_X * p_Y) * p_W = p_X * (p_Y * p_W),

for independent X,Y,WX, Y, W (and likewise for densities). Consequently, if X1,…,XnX_1, \dots, X_n are mutually independent, the distribution of X1+⋯+XnX_1 + \cdots + X_n is obtained by convolving all nn individual distributions together, in any order or grouping.

Proof

Commutativity is immediate from the formula: substituting j=n−kj = n-k in ∑kpX(k)pY(n−k)\sum_k p_X(k) p_Y(n-k) gives ∑jpY(j)pX(n−j)\sum_j p_Y(j) p_X(n-j), the same sum with roles swapped (the continuous case is identical with a change of variables u=z−xu = z-x in the integral, using that Lebesgue measure is translation- and reflection-invariant). For associativity, write S=X+YS = X+Y; since WW is independent of (X,Y)(X,Y) (a standard consequence of mutual independence — the pair (X,Y)(X,Y) is independent of WW whenever X,Y,WX,Y,W are jointly independent, provable via the same π\pi-system argument used above applied to products of three sets), SS and WW are independent, so (S+W)(S+W)'s mass function is pS∗pW=(pX∗pY)∗pWp_S * p_W = (p_X * p_Y)*p_W by the Theorem applied twice. Symmetrically one gets pX∗(pY∗pW)p_X * (p_Y * p_W) for X+(Y+W)X + (Y+W). Since (X+Y)+W=X+(Y+W)(X+Y)+W = X+(Y+W) as random variables, the two expressions are equal. Induction extends this to nn variables. ■\blacksquare

∎

Worked examples

Example 1 (discrete, asymmetric parameters): sum of two independent Poissons with different rates. Let X∼Poisson(λ)X \sim \mathrm{Poisson}(\lambda) and Y∼Poisson(μ)Y \sim \mathrm{Poisson}(\mu) be independent, with λ=2\lambda = 2 and μ=5\mu = 5 (deliberately unequal, to avoid masking errors with symmetry). We compute the distribution of Z=X+YZ = X+Y using the convolution formula and show Z∼Poisson(λ+μ)=Poisson(7)Z \sim \mathrm{Poisson}(\lambda+\mu) = \mathrm{Poisson}(7). By the Theorem, for n=0,1,2,…n = 0, 1, 2, \dots,

pZ(n)=∑k=0npX(k) pY(n−k)=∑k=0ne−λλkk!⋅e−μμn−k(n−k)!.p_Z(n) = \sum_{k=0}^{n} p_X(k)\, p_Y(n-k) = \sum_{k=0}^{n} e^{-\lambda} \frac{\lambda^k}{k!} \cdot e^{-\mu} \frac{\mu^{n-k}}{(n-k)!}.

(The sum truncates to k=0,…,nk=0,\dots,n since pY(n−k)=0p_Y(n-k)=0 for n−k<0n-k<0.) Factor out e−(λ+μ)e^{-(\lambda+\mu)} and multiply and divide by n!n!:

pZ(n)=e−(λ+μ)n!∑k=0n(nk)λkμn−k=e−(λ+μ)n!(λ+μ)n,p_Z(n) = \frac{e^{-(\lambda+\mu)}}{n!} \sum_{k=0}^n \binom{n}{k} \lambda^k \mu^{n-k} = \frac{e^{-(\lambda+\mu)}}{n!} (\lambda + \mu)^n,

using the binomial theorem in the last step. With λ+μ=7\lambda+\mu = 7, this says Z∼Poisson(7)Z \sim \mathrm{Poisson}(7) exactly. Let's verify a specific numeric value directly, without shortcuts, to make sure the formula is being used correctly: compute pZ(3)=P(X+Y=3)p_Z(3) = P(X+Y=3) two ways. Direct convolution sum (λ=2,μ=5\lambda=2,\mu=5):

pZ(3)=∑k=03e−22kk!⋅e−553−k(3−k)!.p_Z(3) = \sum_{k=0}^3 e^{-2}\frac{2^k}{k!}\cdot e^{-5}\frac{5^{3-k}}{(3-k)!}.

Compute term by term (e−2e−5=e−7e^{-2}e^{-5} = e^{-7} factored out at the end):

  • k=0k=0: 200!⋅533!=1⋅1256=20.8333\frac{2^0}{0!}\cdot\frac{5^3}{3!} = 1 \cdot \frac{125}{6} = 20.8333
  • k=1k=1: 211!⋅522!=2⋅12.5=25\frac{2^1}{1!}\cdot\frac{5^2}{2!} = 2 \cdot 12.5 = 25
  • k=2k=2: 222!⋅511!=2⋅5=10\frac{2^2}{2!}\cdot\frac{5^1}{1!} = 2 \cdot 5 = 10
  • k=3k=3: 233!⋅500!=86⋅1=1.3333\frac{2^3}{3!}\cdot\frac{5^0}{0!} = \frac{8}{6}\cdot 1 = 1.3333

Sum: 20.8333+25+10+1.3333=57.166720.8333 + 25 + 10 + 1.3333 = 57.1667 (this equals 73/3!=343/6=57.16‾7^3/3! = 343/6 = 57.1\overline{6}, confirming the binomial identity numerically). So

pZ(3)=e−7⋅57.1667=e−7⋅733!.p_Z(3) = e^{-7} \cdot 57.1667 = e^{-7}\cdot \frac{7^3}{3!}.

This is exactly Poisson(7)\mathrm{Poisson}(7)'s formula at n=3n=3: e−773/3!≈0.0009119×57.1667≈0.05213e^{-7}7^3/3! \approx 0.0009119 \times 57.1667 \approx 0.05213. Numerically, e−7≈0.00091188e^{-7} \approx 0.00091188, so pZ(3)≈0.00091188×57.1667≈0.052126p_Z(3) \approx 0.00091188 \times 57.1667 \approx 0.052126. 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 X∼Exponential(λ)X \sim \mathrm{Exponential}(\lambda) with λ=2\lambda = 2 (density fX(x)=2e−2xf_X(x) = 2e^{-2x} for x≥0x \ge 0, else 00), independent of Y∼Uniform(0,1)Y \sim \mathrm{Uniform}(0,1) (density fY(y)=1f_Y(y) = 1 for 0≤y≤10 \le y \le 1, else 00). These are deliberately of different families with mismatched shapes. Find the density of Z=X+YZ = X+Y. By the Theorem,

fZ(z)=∫−∞∞fX(x)fY(z−x) dx=∫0∞2e−2x 1{0≤z−x≤1} dx.f_Z(z) = \int_{-\infty}^\infty f_X(x) f_Y(z-x)\, dx = \int_{0}^{\infty} 2e^{-2x}\, \mathbf{1}\{0 \le z-x \le 1\}\, dx.

The indicator restricts xx to z−1≤x≤zz - 1 \le x \le z, intersected with x≥0x \ge 0. We split into cases based on zz. Case z<0z < 0: no overlap (x≥0x\ge 0 and x≤z<0x \le z <0 are incompatible), so fZ(z)=0f_Z(z) = 0. Case 0≤z≤10 \le z \le 1: the constraint x≥max⁡(0,z−1)=0x \ge \max(0, z-1) = 0 (since z−1≤0z - 1 \le 0) and x≤zx \le z gives integration range [0,z][0, z]:

fZ(z)=∫0z2e−2x dx=[−e−2x]0z=1−e−2z.f_Z(z) = \int_0^z 2e^{-2x}\, dx = \left[-e^{-2x}\right]_0^z = 1 - e^{-2z}.

Case z>1z > 1: the constraint becomes x≥z−1>0x \ge z-1 > 0 and x≤zx \le z, so the range is [z−1,z][z-1, z]:

fZ(z)=∫z−1z2e−2x dx=[−e−2x]z−1z=e−2(z−1)−e−2z=e−2z(e2−1).f_Z(z) = \int_{z-1}^{z} 2e^{-2x}\,dx = \left[-e^{-2x}\right]_{z-1}^{z} = e^{-2(z-1)} - e^{-2z} = e^{-2z}\left(e^2 - 1\right).

So altogether,

fZ(z)={0z<0,1−e−2z0≤z≤1,(e2−1)e−2zz>1.f_Z(z) = \begin{cases} 0 & z<0,\\ 1 - e^{-2z} & 0\le z\le 1,\\ (e^2-1)e^{-2z} & z>1. \end{cases}

Sanity checks. Continuity at z=1z=1: from the middle branch, 1−e−2≈1−0.135335=0.8646651-e^{-2} \approx 1 - 0.135335 = 0.864665; from the top branch, (e2−1)e−2=e0−e−2=1−e−2≈0.864665(e^2-1)e^{-2} = e^0 - e^{-2} = 1 - e^{-2} \approx 0.864665. They agree, as they must since fZf_Z is continuous (the convolution of a bounded density with an L1L^1 function is continuous). Total mass check:

∫01(1−e−2z) dz+∫1∞(e2−1)e−2z dz.\int_0^1 (1-e^{-2z})\,dz + \int_1^\infty (e^2-1)e^{-2z}\,dz.

First integral: [z+12e−2z]01=(1+12e−2)−(0+12)=12+12e−2≈0.5+0.0676675=0.567668\left[z + \tfrac12 e^{-2z}\right]_0^1 = \left(1 + \tfrac12 e^{-2}\right) - \left(0+\tfrac12\right) = \tfrac12 + \tfrac12 e^{-2} \approx 0.5 + 0.0676675 = 0.567668. Second integral: (e2−1)∫1∞e−2zdz=(e2−1)⋅12e−2=12(1−e−2)≈0.5(0.864665)=0.432332(e^2-1)\int_1^\infty e^{-2z}dz = (e^2-1)\cdot \tfrac12 e^{-2} = \tfrac12(1 - e^{-2}) \approx 0.5(0.864665) = 0.432332. Sum: 0.567668+0.432332=1.0000000.567668 + 0.432332 = 1.000000. The total integrates to exactly 11, confirming fZf_Z is a genuine density.

CounterexampleIndependence cannot be dropped

The convolution formula uses independence essentially, in the step P(X=k,Y=n−k)=pX(k)pY(n−k)P(X=k,Y=n-k) = p_X(k)p_Y(n-k) (discrete) or fX,Y(x,y)=fX(x)fY(y)f_{X,Y}(x,y) = f_X(x)f_Y(y) (continuous). Drop independence and the formula becomes false. Take X∼Bernoulli(1/2)X \sim \mathrm{Bernoulli}(1/2) and let Y=XY = X (perfectly dependent, definitely not independent), both with marginal pmf p(0)=p(1)=1/2p(0) = p(1) = 1/2. The true distribution of Z=X+Y=2XZ = X+Y = 2X is

P(Z=0)=P(X=0)=12,P(Z=1)=0,P(Z=2)=P(X=1)=12.P(Z=0) = P(X=0) = \tfrac12, \quad P(Z=1) = 0, \quad P(Z=2) = P(X=1) = \tfrac12.

Now apply the convolution formula as if X,YX,Y were independent, using their correct marginal pmfs pX=pY=pp_X = p_Y = p:

(p∗p)(1)=∑kp(k)p(1−k)=p(0)p(1)+p(1)p(0)=12⋅12+12⋅12=12.(p*p)(1) = \sum_k p(k)p(1-k) = p(0)p(1) + p(1)p(0) = \tfrac12\cdot\tfrac12 + \tfrac12\cdot\tfrac12 = \tfrac12.

The convolution formula predicts P(Z=1)=1/2P(Z=1) = 1/2, but the true value is P(Z=1)=0P(Z=1) = 0. 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

SituationWhat to do
X,YX, Y independent, both discrete on Z\mathbb ZUse pZ(n)=∑kpX(k)pY(n−k)p_Z(n) = \sum_k p_X(k)p_Y(n-k), sum over valid kk only
X,YX, Y independent, both continuousUse fZ(z)=∫fX(x)fY(z−x)dxf_Z(z) = \int f_X(x) f_Y(z-x)dx; watch support limits carefully
X,YX, Y independent, one discrete one continuousX+YX+Y is typically neither purely discrete nor continuous (mixed); needs a separate mixture treatment, not the formulas above directly
X,YX, Y dependentConvolution formula is false in general; must use the actual joint distribution
Sum of more than two variablesConvolve pairwise, associativity guarantees consistent answer (see Corollary)
Support of ZZAlways 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
SD
Siméon Denis Poisson
1781–1840 · French mathematics and mathematical physics, Paris

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.

History
- 1710s: early combinatorial "convolution-like" sums appear in Jacob Bernoulli's and de Moivre's work on sums of dice and coin tosses.
- 1812: Pierre-Simon Laplace's Théorie analytique des probabilités systematizes generating functions, an algebraic shadow of convolution.
- 1837: Siméon Denis Poisson derives the limiting law now bearing his name, from sums of many independent rare events.
- 1920s–1930s: Aleksandr Khinchin and Paul Lévy formalize characteristic functions, turning convolution of densities into multiplication of transforms.
- 1933: Andrey Kolmogorov's axiomatic foundation of probability makes the modern proof of the convolution formula (via measure-theoretic independence) fully rigorous.
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 fXf_X and fYf_Y 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 XX is discrete and YY is continuous, X+YX+Y is typically a mixture: conditional on X=kX=k, the variable X+YX+Y is continuous with density fY(z−k)f_Y(z-k), so the overall density of ZZ is fZ(z)=∑kpX(k)fY(z−k)f_Z(z) = \sum_k p_X(k) f_Y(z-k). 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 (P(X+Y≤z)P(X+Y\le z) computed as a double integral over the region x+y≤zx+y\le z), 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 (Poisson(2)\mathrm{Poisson}(2) with Poisson(5)\mathrm{Poisson}(5); Exponential(2)\mathrm{Exponential}(2) with Uniform(0,1)\mathrm{Uniform}(0,1)) 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 nn-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 n→∞n\to\infty 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 11 (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.

Before this

Where this leads