PDA

View Full Version : Some math help on some dice averages?



gadren
2015-08-02, 03:30 PM
So, I have a friend who uses the same ability score generation method whenever he runs a D&D game: Roll 3d6, change the lowest die to a 6.

What is the average on this? What is the most expedient way to calculate an average like this? (I used to know this, but this particular set of math skills has gotten rusty.)

Khedrac
2015-08-02, 04:07 PM
For 3d6 there are only 216 possibilities so I find it easiest to forget the maths and just use a spreadsheet:



Total
No. Rolls


8
1



9
3


10
7


11
12


12
19


13
27


14
34


15
36


16
34


17
27


18
16




The average (mean) is 14.1583333
Mode is 15
Median is 15

gadren
2015-08-02, 04:16 PM
Thanks! Though if someone could tell me an equation to figure stuff like this out, I'd still like to see it :)

Bulhakov
2015-08-02, 04:20 PM
I just ran a quick simulation in excel, using INT(RAND()*6+1) for dice throws and the LARGE to find the first and second largest result, then summing them with 6. I'm getting an average result of 14,5 for a 1000 throws.

The distribution seems heavily skewed to favor results between 13 and 17. 12 and 18 are less likely and and anything under 12 is very unlikely.

Spartakus
2015-08-02, 04:38 PM
Lazy mans guide: Use Excel or substitute.

Write all Combinations in columns A,B and C (in order) gives you 216 lines. Takes roughly a minute by using Copy/Paste.
Each of these lines is one possible result of the rolles with a propability p = 1/216

Then make a column D = Min(A,B,C) using Excel-formulas.
Column E =6+A+B+C-D is the resulting ability-score

Average ability-score is the sum of all Entrys in column E (=3123) divided by 216
gives you an average score of roughly 14.5

I'm really interested in a more sophisticated solution, but consindering it is already 11:30pm, I propably wont produce one today.
Already had one in mind but I wasn't sure about it. Ended with 14.1538...

Going to think about it

Bulhakov
2015-08-02, 04:50 PM
The problem is very similar to the roll 4d6 drop lowest method, about which you'll find lots of mathematical discussion online.

This is basically roll 3d6 drop lowest (and add 6) method.

The method to calculate it precisely:
There are 6*6*6=216 possible combinations for the three dice results.
The two dice that are not dropped can generate a sum between 2 and 12.
Each sum can only be generated by a limited number of combinations.
2 - can only be achieved for 1,1,1 - so 1/216 combinations
3 - can be achieved for 1,1,2 or 1,2,1 or 2,11 - so 3/216 combinations (I'll write this as 1,1,2 *3 combinations)
4 - can be achieved by 2,2,1(*3), 3,1,1(*3) or 2,2,2 - so 7/216 combinations
etc...
Add 6 to the results and you can find the same results as @Khedrac showed you.

Spartakus
2015-08-02, 05:08 PM
The problem is very similar to the roll 4d6 drop lowest method, about which you'll find lots of mathematical discussion online.

This is basically roll 3d6 drop lowest (and add 6) method.

The method to calculate it precisely:
There are 6*6*6=216 possible combinations for the three dice results.
The two dice that are not dropped can generate a sum between 2 and 12.
Each sum can only be generated by a limited number of combinations.
2 - can only be achieved for 1,1,1 - so 1/216 combinations
3 - can be achieved for 1,1,2 or 1,2,1 or 2,11 - so 3/216 combinations (I'll write this as 1,1,2 *3 combinations)
4 - can be achieved by 2,2,1(*3), 3,1,1(*3) or 2,2,2 - so 7/216 combinations
etc...
Add 6 to the results and you can find the same results as @Khedrac showed you.

correct, remind me of not posting when tired.

Average is still 4.458333....

erikun
2015-08-02, 08:50 PM
AnyDice (http://anydice.com/) is pretty handy for this. To answer a few of your questions:


Roll 3d6, change the lowest die to a 6.

What is the average on this?
The code of "output [highest 2 of 3d6]+6" seems to give what you are looking for. It rolls 3d6, takes the highest two values, and then adds 6 to the result. Basically, it drops the lowest die roll and replaces it with a 6. The average is 14.46 (right around 14.5) with 15 being the most common result, and with 14-15-16 being the results you would see most frequently.

Spartakus
2015-08-04, 03:36 AM
Thanks! Though if someone could tell me an equation to figure stuff like this out, I'd still like to see it :)

Done the math now.
As erikun pointed out it comes down to calculate the expected value of the highest two d6 when rolling 3d6.
Since the expected value of a single d6 is 3.5 and the rolls are independent from each other, the expected value (EV from now on) of the sum of the three is 10.5
So the EV of [highest two d6] is the same as 10.5 - EV of [lowest one]
This is easier to calculate because there are only 6 possible results.

Remider: The expected value of a random varibale (in this case result of a die roll) can by calculated by sumall results x(value of result x * propability for x)
Example (EV of a single die roll (not the lowest one of three, a single die roll)):
EV = 1*(1/6) + 2*(1/6) + 3*(1/6) + 4*(1/6) + 5*(1/6) + 6*(1/6) = (1+2+3+4+5+6)*(1/6)=21/6 = 3.5

Back to EV of [lowest one of 3d6]:
The values are again 1,2,3,4,5,6 but the propabilities are not all 1/6.

The lowest one is 6 if and only if all 3d6 show 6. so p(6) = (1/6)3 = 1/216
The lowest one is 5 if and only if all 3d6 show 5 or more but not all show 6. so p(5) = (2/6)3 - (1/6)3 = (8-1)/216 = 7/216
The lowest one is 4 if and only if all 3d6 show 4 or more but not all show 5 or more. so p(4) = (3/6)3 - (2/6)3 = (27-8)/216 = 19/216
The lowest one is 3 if and only if all 3d6 show 3 or more but not all show 4 or more. so p(3) = (4/6)3 - (3/6)3 = (64-27)/216 = 37/216
The lowest one is 2 if and only if all 3d6 show 2 or more but not all show 3 or more. so p(2) = (5/6)3 - (4/6)3 = (125-64)/216 = 61/216
The lowest one is 1 if and only if all 3d6 show 1 or more but not all show 2 or more. so p(1) = (6/6)3 - (5/6)3 = (216-125)/216 = 91/216

I hope you can see the pattern. In general, the propability for "The lowest one of mdn (that is throwing m n-sided dice) shows an i" is p(i) = ((n-i+1)/n)m - ((n-i)/n)m for i < n and p(n) = 1/nm

To get the EV we multiply p(i)*i and build the sum over all values of i. So for our problem "lowest one of 3d6" we have
EV = 1*p(1) + 2*p(2) + 3*p(3) + 4*p(4) + 5*p(5) + 6*p(6)
= 1*91/216 + 2*61/216 + 3*37/216 + 4*19/216 + 5*7/216 + 6*1/216
= 91/216 + 122/216 + 111/216 + 76/216 + 35/216 + 6/216
= 441/216
= 2.041666666666......


As pointed out above the EV of [highest two d6] is the same as 10.5 - EV of [lowest one] so it is 8.4583333333333.....

Add 6 (since you replace tho lowest one with a 6) 14.4583333333333......


And this is the same as in my lazy mans guide or khedracs spreadsheet. Magic!

Reltzik
2015-08-04, 04:23 AM
Okay, this looks fun. I'm going to chart out the combinatorics to figure out the weighting of each pairing of "top" dice -- those that don't get turned into 6s. If I do this right, then the total weight should add up to 216. I'll present these as combinations in descending order.

For each combination, I will figure out the number of permutations possible for each possible discarded value for the lowest die. This will be: 1 (if all three dice were the same), 3 (if two dice match), or 6 (if none match). These will all be added together.

(1,1): 1. For this, obviously the third (lowest, unlisted) die was a 1. There's only one combination yielding all ones.

(2,1): 3. Again, lowest die was a 1. However, we don't know what order the dice rolls were in. That 2 could be on the first, second, or third die, totaling 3 possibilities. Same for the next several entries.

(3,1): 3.
(4,1): 3.
(5,1): 3.
(6,1): 3.

(2,2): 4. The lowest die could be a 1 OR a 2. If it's a 2, then all three dice are the same, yielding only one combination. If it was a 1, then there are 3 unique permutations (the three positions of the 1). Taken together, 4 possibilities.

(3,2): 9. The lowest die could be a 2 or a 1. For a 2, we've got a pair matching netting 3 permutations total. For a 1, we've got no matches, netting 6 permutations total. Same logic follows for the next several rolls.

(4,2): 9
(5,2): 9
(6,2): 9

(3,3): 7. The lowest die could be a 1, a 2, OR a 3. For a 3, we've got 1 permutation. For a 1 or a 2, 3 permutations each.

(4,3): 15. For a 3 dropped, we've got a pair, so 3 permutations. For a 1 or a 2, 6 permutations each.
(5,3): 15
(6,3): 15

(4,4): 10. 1 for if the lowest was a 4, and 3 each if the lowest was a 1, 2, or 3.
(5,4): 21. 3 for if the lowest was a 4, and 6 each if the lowest was 1, 2, or 3.
(6,4): 21

(5,5): 13. 1 for if the lowest was 5, and 3 each for if the lowest was a 1, 2, 3, or 4.
(6,5): 27. 3 for if the lowest was 5, and 6 each for if the lowest was 1, 2, 3, or 4.

(6,6): 16. 1 for if the lowest was 6, and 3 each for if the lowest was anything else.

Total: 216, which is what we wanted.

Obviously the minimum score is 8 (if we got all 1s). To figure out the weighting of each outcome, we'll add together the weighting of each combination that could yield it. To figure out the probability, we'll take the weighting and divide by 216.

8: Just (1,1). Weight: 1. Probability: 1/216 = 0.46%
9: Just (2,1). Weight: 3. Probability: 3/216 = 1.39%
10: (2,2) and (3,1). Weight: 4+3 = 7. Probability: 7/216 = 3.24%
11: (4,1) and (3,2). Weight: 9+3 = 12. Probability: 12/216 = 5.56%.
12: (5,1) (4,2) (3,3). Weight: 3+9+7 = 19. Probability: 19/216 = 8.80%
13: (6,1) (5,2) (4,3). Weight: 3+9+15 = 27. Probability: 27/216 = 12.50%.
14: (6,2) (5,3) (4,4) Weight: 9+15+10 = 34. Probability: 34/216 = 15.74%
15: (6,3) (5,4) Weight: 15+21 = 36. Probability: 36/216 = 16.67%
16: (6,4)(5,5) Weight: 21+13 = 34. Probability: 34/216 = 15.74%
17: (6,5) Weight: 27. Probability: 27/216 = 12.50%
18: (6,6) Weight: 16. Probability: 16/216 = 7.41%

Mean: 14.46, Median: 15, Mode 15.