Concepts → Fundamentals → Variance and standard deviation
Variance and standard deviation, in dice — how to measure spread.
Once you know the mean of a distribution, the next question is: how far do typical outcomes wander from it? Variance answers that in squared units; standard deviation answers it in the same units as the roll, so you can compare it directly to the mean.
Definition
The variance of a random variable X is the expected
squared distance from the mean:
Var(X) = E[(X − μ)²], where μ = E[X].
Algebraically equivalent and usually easier to compute:
Var(X) = E[X²] − (E[X])²
Standard deviation is just the square root of variance:
SD(X) = √Var(X)
Variance is in squared units (squared damage, squared HP), which makes the raw number hard to read. Standard deviation puts it back into native units, which is why most rules of thumb (the "68-95-99.7 rule" you may have seen for normal distributions) are stated in standard deviations.
Worked example: 1d6
For 1d6, the mean is μ = 7/2. Variance:
E[X²] = (1² + 2² + 3² + 4² + 5² + 6²) / 6 = 91/6
Var(1d6) = 91/6 − (7/2)² = 91/6 − 49/4 = 182/12 − 147/12 = 35/12
So Var(1d6) = 35/12 ≈ 2.917, and
SD(1d6) = √(35/12) ≈ 1.708. Tap the mean on the
panel below to read off the rational; the engine carries the same
35/12 internally for any expression that involves a d6.
1d6
- 1 16.67%
- 2 16.67%
- 3 16.67%
- 4 16.67%
- 5 16.67%
- 6 16.67%
The shortcut for fair dice
For a fair die with M faces:
Var(1dM) = (M² − 1) / 12
Drop in M = 6: (36 − 1)/12 = 35/12.
Drop in M = 20: (400 − 1)/12 = 399/12
≈ 33.25. Drop in M = 4:
(16 − 1)/12 = 15/12 = 5/4 = 1.25.
Variance grows quadratically in the face count: a d20
has roughly 27× the variance of a d4, even though the
means differ by a factor of 4.2. That ratio is why high-face-count
dice produce wildly different fight outcomes from low-face-count
ones at the same mean — the spread is in different leagues.
Variance under sums
For independent random variables, variance adds:
Var(X + Y) = Var(X) + Var(Y) (when X, Y independent)
Two fair 1d6s are independent, so:
Var(2d6) = Var(1d6) + Var(1d6) = 35/12 + 35/12 = 70/12 = 35/6
Standard deviation: SD(2d6) = √(35/6) ≈ 2.415.
Compared to SD(1d6) ≈ 1.708 — note that the
variance doubled but the standard deviation
grew only by a factor of √2 ≈ 1.414.
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%
Constants don't add variance — they just shift the mean. So
Var(2d6 + 5) = Var(2d6) = 35/6, and the
+5 only moves the centre. That is a foundational
fact: when you stack a flat damage modifier onto a roll, you
change the mean linearly but the spread not at all.
Same mean, different spread
2d6+5 and 3d4+4 have nearly identical
means (12 vs 11.5) but very different variances. Build a quick
mental table:
Var(2d6+5) = 2·(35/12) = 35/6 ≈ 5.83(SD ≈ 2.41)Var(3d4+4) = 3·(15/12) = 45/12 = 15/4 = 3.75(SD ≈ 1.94)
Same ballpark mean. 2d6+5 has roughly 1.55× the
variance. That's the entire mechanical reason for the surprising
result in
variance and
kill probability: against a target whose HP sits below the
mean, the higher-variance roll wins; above the mean, the
lower-variance roll wins.
Try it yourself
↦ /strike/1d6 — Var = 35/12 ↦ /strike/2d6 — Var = 35/6 (twice 1d6) ↦ /strike/3d4+4 — Var = 15/4, mean 23/2 ↦ /strike/2d6+5 — Var = 35/6, mean 12 ↦ /strike/1d20 — Var = 399/12 ≈ 33.25