• NOW LIVE! Into the Woods--new character species, eerie monsters, and haunting villains to populate the woodlands of your D&D games.

Maths guys - hey! (Probabilities)

Morrus

Well, that was fun
Staff member
I need more probability help!

How do I determine the following:

A weapon starts with an "ammo roll" of xd6.

When you take a shot you roll the xd6. You remove every dice that comes up 6. When you remove the last dice, you just took your last shot.

What is the average number of shots you would expect to get out of ammo rolls of the range 1d 6 to, say, 10d6?
 

log in or register to remove this ad


I need more probability help!

How do I determine the following:

A weapon starts with an "ammo roll" of xd6.

When you take a shot you roll the xd6. You remove every dice that comes up 6. When you remove the last dice, you just took your last shot.

What is the average number of shots you would expect to get out of ammo rolls of the range 1d 6 to, say, 10d6?
So it'd work something like:
10d6 => 1,1,2,3,4,5,5,5,6,6 => 2 6's so down to 8d6
8d6 => 1,3,4,4,5,6,6,6 => 3 6's so down to 5d6
5d6 => 2,2,3,5,6 => 1 6 so down to 4d6
4d6 => 1,3,6,6 => 2d6
?
 

So it'd work something like:
10d6 => 1,1,2,3,4,5,5,5,6,6 => 2 6's so down to 8d6
8d6 => 1,3,4,4,5,6,6,6 => 3 6's so down to 5d6
5d6 => 2,2,3,5,6 => 1 6 so down to 4d6
4d6 => 1,3,6,6 => 2d6
?

Yup. So the question is, on average, how many times will you do that for each starting number before you're down to 0d6.
 

I've done a first cut; eyeballing the results looks fine, but I should spend some time validating the code.

For 10d6, the results are

7% will deplete in 8 rounds or less (closest I could get to 5%).
12% will deplete in 9 rounds or less.
37% will deplete in 13 rounds or less.
51% will deplete in 15 rounds or less.
68% will deplete in 18 rounds or less.
90% will deplete in 26 rounds or less.
95% will deplete in 28 rounds or less.

For 6d6:
6% will deplete in 6 rounds or less (closest I could get to 5%).
14% will deplete in 7 rounds or less.
34% will deplete in 10 rounds or less.
55% will deplete in 13 rounds or less.
71% will deplete in 16 rounds or less.
91% will deplete in 23 rounds or less.
95% will deplete in 27 rounds or less.
 
Last edited:

Averages are as follows:

Code:
Dice:     Shots:
0            1
1            6
2       7.818181818
3	8.817182817
4	9.429685069
5	9.830098864
6	10.10274972
7	10.29368354
8	10.43015835
9	10.52924165
10	10.60206697

All for d6 dice.
 

How did you calculate it? My brain's a bit tired, but I got as far as:

g(x) = expected number of rolls starting with xd6

g(0) = 0

Then for n >= 1, solve for g(n):
g(n) = (n! / 6^n) Sum_i=0..n ( 5^i (g(i)+1) / (n-i)! i! )

----

My explanation: g(0) = 0 because you've got no dice.
With n dice, then you could end up with between 0 and n dice next time.
So g(n) = (1 / 6^n) Sum_i=0..n ( h(i,n)(g(i) + 1) )
where h(i,n) is the number of ways to get exactly n-i sixes on n dice.
 

Wow - that's interesting! So above 4-5 dice, adding extra dice doesn't really make any difference at all? I wouldn't have expected that!
 

Sorry! Forgot the extra shot on all except the "all sixes" and recursive cases. Results Should be:

Code:
Dice	Shots
0	1
1	6
2	8.727272727
3	10.55544456
4	11.92669625
5	13.02366151
6	13.9377967
7	14.7213416
8	15.40694348
9	16.01636737
10	16.56484886
 

Sorry! Forgot the extra shot on all except the "all sixes" and recursive cases. Results Should be:

Code:
Dice    Shots
0    1
1    6
2    8.727272727
3    10.55544456
4    11.92669625
5    13.02366151
6    13.9377967
7    14.7213416
8    15.40694348
9    16.01636737
10    16.56484886
Ah, good, my code matches. Phew! Brain's not failed that badly today, then. :)
 

Into the Woods

Remove ads

Top