# Average of exploding dice?

#### FrogReaver

##### Explorer
It’s just a geometric series. Has a simple formula.

= mean of die roll / [(die size - 1) / die size]

Last edited:

#### Ovinomancer

##### Explorer
Holy Thread Resurrection Batman!

Ok fellow math-masters, I need your help on this, and I can't seem to find a clear concise answer anywhere...

What is the average result for exploding dice when you're rolling multiple dice?
Example, whats the average result when rolling 2d6 vs 4d6 when open ended dice are involved?
What about when different die types are included, like 2d6+1d8+1d12?

Thanks for your input!

If you care, here is why I want to know:
I'm running a Super Hero game using Savage Worlds. I'm having trouble gauging the hero's power level vs opponent's toughness and damage dealing potential. Mainly because you start to stack multiple dice and dice types that can all explode. If I can ballpark a character's average, I can set targets that will provide a more interesting encounter, instead of the opponents getting blasted apart like wet tissue paper by the heroes; or destroying the heroes with a sideways glance by my villain.
A down and dirty method is to just round up the normal average. D6 gies from 3.5 to 4. D8 from 4.5 to 5. Etc. Then just add averages together for complex pools. The variance will be off, so remember than the more dice, the more likely the roll will be close to average.

The real math is to sum (dice average)/(high roll ^ k) as k goes from 0 to infinity. So, for d8, it's 4.5/1 + 4.5/8 + 4.5/64 +4.5/512 ..... The rapidly converges, though, so the first exploder has the largest impact and dominates. A d8 exploder converges to around 5.143, so using 5 is both fast and only slightly wrong.

#### Grakarg

##### Explorer
Thanks all, I knew it would be simple.

If anyone else is interested, there is a site ( https://anydice.com/ ) that will help calculate probabilities for you on large pools and shows the resulting bell curve.

#### aramis erak

##### Explorer
The exact answer cannot be found, as it's an asymptotic progression.

A reasonable approximation can be found by the following:

Given S sides and 4 recursions

0.5S+0.5 + (0.5S+0.5)/S + (0.5S+0.5)/S² + (0.5S+0.5)/S³ + (0.5S+0.5)/S⁴

punching it in to quattro pro...
Code:
`````` 2       1.5   2.250000    2.625000      2.437500     2.531250
3       2.0   2.666667    2.888889      2.740741     2.765432
4       2.5   3.125000    3.281250      3.164063     3.173828
5       3.0   3.600000    3.720000      3.624000     3.628800
6       3.5   4.083333    4.180556      4.099537     4.102238
7       4.0   4.571429    4.653061      4.583090     4.584756
8       4.5   5.062500    5.132813      5.071289     5.072388
10      5.5   6.050000    6.105000      6.055500     6.056050
12      6.5   7.041667    7.086806      7.045428     7.045742
16      8.5   9.031250    9.064453      9.033325     9.033455
20    10.5  11.025000  11.051250    11.026313   11.026378
24    12.5  13.020833  13.042535    13.021738   13.021775
30    15.5  16.016667  16.033889    16.017241   16.017260``````
And, yes, I know SW doesn't use d3, d5, d7, d16, d20, d24, nor d30... but it's nice to have all the commercially available types on the table I can't recall if I've missed any below d50...

#### DMMike

##### Game Masticator
Since this is similar to exploding dice, and this necro-thread has yet to meet a cleric, here's another one for you probability pros:

What is the average result, based on the number you must exceed (target number), of a d20 that you get to re-roll as long as your first roll was higher than the target, and your following roll is higher than your previous roll?

The process goes like this:

Target number is 10. So if you roll a 10 or lower, that's your result.
Roll a 15, and you get to roll again, because you beat the target number.
Roll 8 after that, and your 15 stands. Roll 19, and you get to roll again.
Roll 20 and...just kidding. You're not going to roll a 20 after a 19.

So the result of that process was 19, based on a target number of 10. Which means my question is horribly bad, and should be more like:

What are the odds of getting a 20 result, based on the target number, using the above process?
or
What is the average number of re-rolls allowed, based on the target number, using the above process?

The idea is that if you beat your own result, you get a better outcome (critical). Obviously, "beat yourself" was not a viable name. So I've been calling it a "quality contest," which lacks the zing of "exploding dice." Name suggestions are welcome, too.

#### GrahamWills

##### Registered User
Single Exploding Dice

Let E(N) = The expected value for an exploding dice with N sides

We know the expected value of rolling WITHOUT exploding -- it's just (N+1)/2. And we know the probability of exploding, which is 1/N (only when you roll the highest number). And when we explode, the expected value of the explosion is E(N) -- by our definition.

So that establishes the equation E(N) = (N+1)/2 + E(N)/N
That is re-arranged to the solution

N (N+1)
--------
2 (N-1)

Invinoveritas gave this answer a decade ago -- this is just a hopefully simpler version of it

#### GrahamWills

##### Registered User
Since this is similar to exploding dice, and this necro-thread has yet to meet a cleric, here's another one for you probability pros:

What is the average result, based on the number you must exceed (target number), of a d20 that you get to re-roll as long as your first roll was higher than the target, and your following roll is higher than your previous roll?

The process goes like this:

Target number is 10. So if you roll a 10 or lower, that's your result.
Roll a 15, and you get to roll again, because you beat the target number.
Roll 8 after that, and your 15 stands. Roll 19, and you get to roll again.
Roll 20 and...just kidding. You're not going to roll a 20 after a 19.

So the result of that process was 19, based on a target number of 10. Which means my question is horribly bad, and should be more like:

What are the odds of getting a 20 result, based on the target number, using the above process?
let P(N) = probability of rolling 20 given you have just rolled N
P(20) = 1
P(19) = 1/20

If you roll N you must roll higher than N and is the sum of all those possible rolls. So, breaking the 20 possible rolls you could make into those N or lower -- each of them is a fail and so has zero probability. For the ones higher than N, we simply sum the probably of rolling that value multiplied by the probability of rolling 20 given you have just rolled that value

P(N) = 1/20 P(N+1) + 1/20 P(N+2) + .... + 1/20 P(20)

Here's the mathematician's trick. Note what P(N-1) is:

P(N-1) = 1/20 P(N) + 1/20 P(N+1) + 1/20 P(N+2) + .... + 1/20 P(20)

so if we subtract the two equations nearly all the terms cancel out:

P(N-1) - P(N) = 1/20 P(N)

and so P(N-1) = 21/20 P(N)

=>

P(0) = (21/20)^19 P(19) = 1.05^19/20 = 0.1263

So the answer is 0.1263

I ran a short simulation for 1,000,000 rolls and verified this is the right answer.

#### pemerton

##### Hero
A down and dirty method is to just round up the normal average. D6 gies from 3.5 to 4. D8 from 4.5 to 5. Etc. Then just add averages together for complex pools. The variance will be off, so remember than the more dice, the more likely the roll will be close to average.

The real math is to sum (dice average)/(high roll ^ k) as k goes from 0 to infinity. So, for d8, it's 4.5/1 + 4.5/8 + 4.5/64 +4.5/512 ..... The rapidly converges, though, so the first exploder has the largest impact and dominates. A d8 exploder converges to around 5.143, so using 5 is both fast and only slightly wrong.
With exploding dice, I've always done it this way, which builds on what Ovinomancer has posted:

Your expected result is the average, plus a 1/N chance of getting the average again (ie if you roll max and then roll gain and add, letting N be the number of sides), and then within the scope of that chance is a further 1/N chance of getting the average again, etc.

Call the average M and then the expected value is M + M/N + M/(N^2) + . . ., which equals M(1 +1/N + 1/(N^2) + ....).

The bit in the brackets is an infinite series with a = 1 and r = 1/N. The formula for an infinite series is the sum = a/(1-r). So in this case that is 1/(1-(1/N)) which equals 1/((N-1)/N) = N/(N-1).

So the exploding average is M*N/(N-1).

Of course the unexploding average M = (N+1)/2.

And so the exploding average = N(N+1)/(2*(N-1)). (Which is the same formula as [MENTION=75787]GrahamWills[/MENTION] has posted.)

So for exploding d6 the average = 6*7/(2*5) = 4.2 as was posted upthread. For exploding d8 the average = 8*9/(2*7) = 36/7 = five-and-one-seventh as per the approximation 5.143, etc.

#### DMMike

##### Game Masticator
So the answer is 0.1263
Odds of rolling a 20, with a target number of 0, are 12.63%? So, 1 in 8?

Does that make odds of 20, with a target number of 10:
P(9)=1.05 P(10)...
Not sure where your exponents are coming from.

What's involved in finding the average number of re-rolls with a target number of 0?

Nice math-fu, by the way.

#### GrahamWills

##### Registered User
Not sure where your exponents are coming from
P(N-1) = 21/20 P(N)

So P(0) = (21/20) P(1) = (21/20)^2 P(2) = ...

and so on.