Concepts → Fundamentals → Independence, sums, and convolutions
Independence, sums, and convolutions — what
2d6 = 1d6 + 1d6 actually means.
Almost every dice expression is a sum of simpler ones. To compute the distribution of a sum, you need to know what independence is, and you need one operation on distributions — convolution — that combines them. Once you have those, the entire engine is mechanical.
Independence in plain language
Two random variables X and Y are
independent when knowing the value of
X tells you nothing about the value of Y.
Two physical dice rolled at the same time are independent: the
first die can't see the second, can't communicate with it, can't
bias it. The second die is going to come up uniform on
the integers 1 through 6 whether the first one came up 1 or 6.
Formally, independence means
P(X = a and Y = b) = P(X = a) · P(Y = b)
for every pair of outcomes (a, b). The probability
of a joint outcome is the product of the individual
probabilities. That factoring is the entire mathematical content
of independence.
Counter-examples (non-independent variables) come up in dice math
whenever a mechanic looks at a die before deciding what
to do next: 2d20kh1 (advantage — keep the higher of
two) is the higher of the two rolls, which depends on
both of them, so the kept value isn't independent of
either single roll. Reroll-on-1 mechanics
(2d6r1+5 for Great Weapon Fighting) similarly
condition the second look on the first. Those mechanics need the
full conditional structure, not just sums of independent dice —
and the engine handles that, but the closed-form mean-and-variance
shortcuts here only apply to the truly-independent case.
Sum of two dice = convolution
What is the distribution of X + Y when you know the
distributions of X and Y separately and
they are independent? You enumerate every joint outcome and group
the ones that produce the same sum.
For 2d6 = 1d6 + 1d6, there are 6 × 6 = 36 joint
outcomes, each with probability 1/36. Group by sum:
- Sum 2: only (1,1). One outcome. P = 1/36.
- Sum 3: (1,2) and (2,1). Two outcomes. P = 2/36 = 1/18.
- Sum 4: (1,3), (2,2), (3,1). Three outcomes. P = 3/36 = 1/12.
- … and so on, peaking at sum 7 with six outcomes.
The general rule, written out: the probability of the sum
equalling k is
P(X + Y = k) = Σⱼ P(X = j) · P(Y = k − j)
summed over every j in the support of X.
That is the definition of convolution of two
probability mass functions.
2d6
- 2 2.78%
- 3 5.56%
- 4 8.33%
- 5 11.11%
- 6 13.89%
- 7 16.67%
- 8 13.89%
- 9 11.11%
- 10 8.33%
- 11 5.56%
- 12 2.78%
Read the chart against the convolution: the bar at 7 is
6/36 because there are 6 ways to make 7. Tap any bar
to see its exact rational and the number of joint outcomes that
produce it.
What the engine actually does
For an expression like 2d6 + 1d4 + 3, the engine:
- Builds the PMF of each base die (
1d6uniform on 6,1d4uniform on 4). - Convolves the PMF of
1d6with itself to get2d6. - Convolves
2d6with the PMF of1d4. - Shifts the resulting PMF right by 3 (the constant offset).
Every step is in exact rationals. There is no floating point in the convolution, so every probability you see on the site is exact, not an approximation that's been rounded to display.
Mean and variance under independent sums
The two operations you use most after computing a distribution:
Linearity of expectation (no independence needed):
E[X + Y] = E[X] + E[Y]
Additivity of variance (independence needed):
Var(X + Y) = Var(X) + Var(Y)
Linearity holds always. Additivity of variance holds only when the variables are independent. That asymmetry is the most common quiet error in back-of-napkin probability: people add variances on dependent rolls, and the answers come out wrong by exactly the covariance term they ignored.
For independent dice, you get a mechanical computation of mean and variance for any sum:
E[NdM] = N · (M+1)/2Var(NdM) = N · (M² − 1)/12
So E[8d6] = 8 · 7/2 = 28 and
Var(8d6) = 8 · 35/12 = 70/3 ≈ 23.33. The engine
gives the same results from the convolved distribution, but
these closed forms are how you read the answers off a character
sheet without a calculator.
8d6
- 8 0.00%
- 9 0.00%
- 10 0.00%
- 11 0.01%
- 12 0.02%
- 13 0.05%
- 14 0.10%
- 15 0.20%
- 16 0.37%
- 17 0.62%
- 18 1.00%
- 19 1.52%
- 20 2.18%
- 21 2.99%
- 22 3.92%
- 23 4.90%
- 24 5.88%
- 25 6.77%
- 26 7.48%
- 27 7.94%
- 28 8.09%
- 29 7.94%
- 30 7.48%
- 31 6.77%
- 32 5.88%
- 33 4.90%
- 34 3.92%
- 35 2.99%
- 36 2.18%
- 37 1.52%
- 38 1.00%
- 39 0.62%
- 40 0.37%
- 41 0.20%
- 42 0.10%
- 43 0.05%
- 44 0.02%
- 45 0.01%
- 46 0.00%
- 47 0.00%
- 48 0.00%
Try it yourself
↦ /strike/1d6 — base case ↦ /strike/2d6 — one convolution step ↦ /strike/3d6 — two convolution steps ↦ /strike/8d6 — seven convolutions, visibly bell-shaped ↦ /strike/1d8+1d6+3 — heterogeneous sum + constant