Convolution: the distribution of a sum

The question
Knowing each wait separately is the starting point. The question concerns their total.
- 1 SeeSketch a density, then check it.
- 2 TryCompare several independent sums.
- 3 ProveBuild the area argument.
- 4 ApplyCalculate densities and probabilities.
Before you start · 3 quick checks on density, total probability, and independence
Two ideas before you start
2 ideasRead a density as probability per unit
A uniform density and a shaded interval under it.
A height is a rate. Shade an interval to turn that rate into a probability.
Exact definition
A variable uniform on \([0,a]\), written \(U(0,a)\), has density \(1/a\) there and zero elsewhere, with \(a\gt0\). Its probability in an interval is the area under this rectangle. The card uses a width of four. Changing density values at individual endpoints changes no probability.
For a variable with density \(f_X\), the cumulative distribution function is \(F_X(t)=P(X\le t)\). It adds the area to the left of \(t\). The PMF, PDF, and CDF lesson explains this distinction. Here the new task is to find the density of a different variable, a sum.
Keep track of both contributions
Two consecutive segments on a number line represent two contributions and their total.
The total records the endpoint of both segments together. It does not tell you how much came from each segment.
Exact definition
Let \(X\) and \(Y\) be random variables on the same experiment. Define \(S=X+Y\). For a proposed total \(s\), knowing the first contribution \(x\) fixes the other as \(y=s-x\). Lowercase letters denote values, and uppercase letters denote variables. The card illustrates addition of values; it makes no probability claim.
Independence means that learning an event about one variable does not change probabilities for the other. Formally, probabilities of events \(X\in A\) and \(Y\in B\) multiply for every pair of sets. When both variables have densities and are independent, their joint density is \(f_X(x)f_Y(y)\). Marginal densities alone do not specify this joint behavior.
Refresher: probability over a region
A joint density describes a pair of values. Integrating it over a region in the \((x,y)\) plane gives the probability of that region. For independent unit uniform variables, the joint density is one in the unit square. A region's ordinary area is then its probability. Lines and individual points have zero probability in this model.
To integrate over a region, use vertical slices: fix \(x\), integrate over the allowed \(y\), and then integrate over \(x\). Nonnegative integrands allow this order of integration. This supplies the joint-density fact used below; no separate multivariable-integration lesson is required.
Sketch the total's density
- Choose a uniform density for each of two independent variables.
- Drag the sketch handles, or focus a handle and use the arrow keys. Then check your sketch.
- After checking, slide the proposed total to inspect the overlap. Start over clears the answer.
Slide the second density
Read the dashed rectangle as a function of x. Replacing x by −x reflects the second density across the vertical axis; replacing −x by s − x then slides it to the right by s. A uniform rectangle is symmetric about its own center, not about zero, so its support moves under this reflection. Following the endpoints prevents a sign error.
The common support contains precisely the first contributions that can work with this total. Multiply the two heights on that support, then integrate. Where either density is zero, the pair contributes nothing. For nonuniform densities the same rule uses a varying product height. An ordinary geometric overlap of the two graphs would not give that product integral.
The sketch is a proposal, so its area need not equal one. The check compares heights only at the handles. It does not certify every point between them or normalize the proposal for you. The computed density, drawn after checking, is normalized by the probability model.
Add another independent contribution
The next question concerns a fresh sum of independent unit uniform variables. Make a choice before opening the comparison.
- Change the number of independent unit uniform contributions.
- Use the displayed moments to meet each goal, then press Next goal.
Each new independent draw convolves the density already built with another unit uniform density. Centering and scaling put the curves on comparable axes; otherwise the mean and spread of the raw sum both change. This comparison is theoretical, computed from repeated convolution, so it has no histogram noise.
For independent unit uniforms, each mean is one half and each variance is one twelfth. Add the means and variances to get the moments of the sum. Then subtract its mean and divide by its standard deviation. A change of horizontal scale also changes density height so that total area stays one.
The central limit theorem explains why standardized sums of iid variables with positive finite variance approach normal probabilities. It does not make these bounded sums exactly normal at a finite size. The normal curve has positive tails beyond their supports. Nor does the theorem, by itself, promise pointwise density convergence for every population.
From a region to a density
If X and Y are independent and have probability densities, their sum S has a density given, almost everywhere, by
\[f_S(s)=\int_{-\infty}^{\infty}f_X(x)f_Y(s-x)\,dx.\]“Almost everywhere” permits a set of exceptional values of zero length; choices there do not affect probabilities. All densities drawn here use the stated continuous version for the sum.
Why this rule holds for general densities
Integrate the independent joint density over \(x+y\le s\). For each fixed x, substitute \(t=x+y\), so \(dt=dy\). Interchanging the nonnegative integrals gives
\[\begin{aligned}g(t)&=\int_{-\infty}^{\infty}f_X(x)f_Y(t-x)\,dx,\\ F_S(s)&=\int_{-\infty}^{s}g(t)\,dt.\end{aligned}\]The function \(g\) is nonnegative, and \(F_S(s)\) is its integral up to s for every s, so \(g\) is a density for S. Its integral over all t is one because each input density integrates to one. This argument identifies a density without assuming it is differentiable or continuous at every point. Independence is used to replace the joint density by a product.
Build a concrete instance: X and Y are independent U(0,1) variables. Fix \(0\lt s\lt1\). The builder derives the rising branch of the density from the area below \(x+y=s\) inside the unit square. In its first line also fix \(0\lt x\lt s\); the endpoints are treated after the proof.
For \(1\lt s\lt2\), the pair \((1-X,1-Y)\) is again independent unit uniform. Its sum is \(2-S\), so reflection gives the other branch: \(f_S(s)=2-s\). The continuous density version is zero outside the support, zero at its outer endpoints, and one at the joining point. Integrating these two branches gives total probability one.
The discrete counterpart
For independent integer-valued variables, add masses instead of integrating densities:
\[p_S(k)=\sum_j p_X(j)p_Y(k-j).\]Each term is the probability of one compatible pair, and the events for different j are disjoint. A finite-support example needs only finitely many terms. Writing each pair’s probability as a product uses independence. Without independence, use the actual joint probability of each pair; separate lists of marginal probabilities are insufficient.
As a check on a computed sum, its mean must equal the sum of the means whenever absolute expectations are finite. For independent variables with finite variances, variances also add. The expectation and variance lesson explains these quantities. Moments are useful checks, but they cannot replace the full distribution when you need a cutoff probability.
Use the distribution you built
Use what you found above. Enter a decimal without units; the acceptance tolerance is stated in each problem. First decide whether the question asks for a mass, a density height, or an interval probability. Hints and worked solutions are available after you act.
Further reading
- J. K. Blitzstein and J. Hwang, Introduction to Probability, chapter 8, Transformations.
- S. Ross, A First Course in Probability, chapter 6, Jointly Distributed Random Variables.