Convolution: Adding Probability Distributions

Two visualizations connect weighted dice, continuous densities and the central limit theorem.

GSGrant SandersonVortrag · 3Blue1Brown
Kanal
3Blue1Brown
Veröffentlicht
27. Juni 2023
Video
27:25
Lesezeit
3 Min.
Original
Englisch
Auf YouTube öffnen
Beim Scrollen schrumpft das Video in die rechte untere Ecke und läuft weiter. Untertitel folgen Ihrer Lesesprache.
LesespracheIn 2 Sprachen verfügbar
Diesen Artikel gibt es noch nicht auf Deutsch, daher wird das Original (Englisch) angezeigt.
ZUSAMMENFASSUNG

In 30 Sekunden

Grant Sanderson derives convolution as the distribution of a sum of independent random variables, using flipped functions and diagonal slices. He connects repeated convolution to the central limit theorem and sets up a later proof for normal distributions.

  1. 1Diagonal sumsAdd the probabilities of all independent outcome pairs with the same sum.
  2. 2Continuous formulaThe density of a sum is the convolution integral of the two densities.
  3. 3Central limit theoremProperly normalized sums approach a normal distribution under suitable conditions.
  4. 4The √2 factorA geometric diagonal slice must be rescaled to match the convolution integral.

Das Wichtigste

  1. Independence lets joint probabilities or densities factor.
  2. Convolution combines the distributions of a sum.
  3. Uniform variables produce a triangular sum density.
  4. Appropriately normalized sums approach a normal distribution under central-limit assumptions.
  5. Diagonal slice area requires a √2 correction.
VOLLTEXT

Den bearbeiteten Text nach Kapiteln lesen

Nur das Transkript
01

Adding random variables

Grant Sanderson asks what distribution results when two independent normally distributed random variables are added. This lesson builds the convolution machinery needed to answer; it leaves the visual proof of the normal case for the next video.

Grant Sanderson asks what distribution results when two independent normally distributed random variables are added. This lesson builds the convolution machinery needed to answer; it leaves the visual proof of the normal case for the next video.

More generally, convolution combines two distributions to describe the sum of independent random variables. Sanderson develops two visualizations: diagonal slices of a joint distribution and a flipped, sliding product.

02

Weighted dice and diagonals

Begin with two weighted dice. Their outcomes form a six-by-six grid, and for independent rolls the probability of each pair is the product of the two individual probabilities.

Begin with two weighted dice. Their outcomes form a six-by-six grid, and for independent rolls the probability of each pair is the product of the two individual probabilities.

All outcome pairs with the same sum lie along a diagonal of that grid. Add the probabilities along a diagonal to find the probability of that sum.

03

Flip and slide

A second visualization flips one distribution and slides it past the other. At each position, multiply aligned probabilities and sum them; the aligned values are exactly the pairs producing one chosen sum.

A second visualization flips one distribution and slides it past the other. At each position, multiply aligned probabilities and sum them; the aligned values are exactly the pairs producing one chosen sum.

For discrete variables, P(X + Y = s) = Σₓ P(X = x)P(Y = s − x). Impossible outcomes contribute zero. The formula depends on independence for the multiplication step.

04

Continuous convolution

For continuous variables, a density is not the probability of a single point. Probability over an interval is the area under the density curve over that interval.

For continuous variables, a density is not the probability of a single point. Probability over an interval is the area under the density curve over that interval.

The convolution of densities f and g is (f * g)(s) = ∫ f(x)g(s − x) dx over the real line. It combines all possible pairs constrained to add to s.

To visualize the formula, flip g horizontally, shift it by s, multiply it pointwise by f, and integrate the product. Changing s changes the overlap and traces the output density.

05

Uniform sums and smoothing

If X and Y are each uniform on [−1/2, 1/2], their densities are rectangular. The overlap grows and then shrinks linearly as one rectangle slides, producing a triangular density for the sum on [−1, 1].

If X and Y are each uniform on [−1/2, 1/2], their densities are rectangular. The overlap grows and then shrinks linearly as one rectangle slides, producing a triangular density for the sum on [−1, 1].

To add a third independent uniform variable, convolve the triangular result with another rectangle. This acts as a moving average, producing a smoother curve. Repeating the operation describes larger sums.

After centering and rescaling appropriately, sums of independent identically distributed variables with finite, nonzero variance approach a normal distribution under the central limit theorem. Without rescaling, the distribution spreads rather than retaining a fixed bell shape.

06

Joint densities and diagonal slices

For the second continuous visualization, place f(x)g(y) above the xy-plane. Independence makes this product the joint density. The plane x + y = s cuts the surface along all pairs with the desired sum.

For the second continuous visualization, place f(x)g(y) above the xy-plane. Independence makes this product the joint density. The plane x + y = s cuts the surface along all pairs with the desired sum.

The slice corresponds to the same pointwise product as the flip-and-slide picture. Its geometric area differs from the convolution value by a factor of √2 because distance along the diagonal is √2 times the change in x.

This diagonal picture also makes commutativity intuitive: swapping f and g exchanges the axes but leaves the distribution of X + Y unchanged.

The opening normal-distribution question can be solved by integrating the convolution. Sanderson proposes instead using the diagonal-slice geometry and invites viewers to consider equal standard deviations before the next lesson.

Mehr aus diesem Kanal

20 Folien40:44EN
3Blue1Brown· 16. Okt. 2026Grant Sanderson: There's never been a better time to go into mathGrant Sanderson, Constantin Kogler · 3Blue1BrownStudents fear AI has solved mathematics. Grant Sanderson argues the opposite: even if machines prove theorems better than we do, the institution of math stays valuable—and this is a rare moment when newcomers can reshape it.MathematicsAI for scienceHuman-AI Collaboration+2
29 Folien51:55EN
3Blue1Brown· 18. Sept. 2026The last IMO problem AI could not solveGrant Sanderson · 3Blue1BrownGrant Sanderson walks through IMO 2025 Problem 6 — a tiling puzzle that frontier models missed — and the visual patience it takes to prove a construction is optimal.MathematicsAI researchReasoning & test-time compute+2
0:55EN
3Blue1Brown· 24. Juli 2026The 64 Sugar Cubes Puzzle: Six Equal DistancesA 4×4×4 block has three colors; prove that six same-colored pairs share a distance.MathematicsEducation
33:51EN
3Blue1Brown· 16. Juli 2026What Cross-Entropy Connects: Compression, Language Models and KL DivergenceGrant Sanderson · 3Blue1BrownGrant Sanderson builds cross-entropy from code lengths and uses it to explain next-token training and distillation.MathematicsMachine LearningFoundation Models+1
Folien2:25EN
3Blue1Brown· 12. Juni 2026How Shannon Measured the Entropy of EnglishA guessing game helped Claude Shannon estimate how much information English text contains, and why prediction is central to compression.MathematicsAI History
Folien1:02EN
3Blue1Brown· 10. Juni 2026A Robot Walk and the Puzzle of Optimal Binary EncodingHow few bits does it take to send directions that occur with unequal frequencies?MathematicsScience Communication