To generate your stats you roll four six-sided dice, drop the lowest and add the other 3. What is the average score you would get with this process, please? and why...

Thanks,

Morlaf

Results 1 to 9 of 9

- Jun 13th 2011, 01:12 PM #1

- Joined
- Feb 2010
- Posts
- 7

- Jun 13th 2011, 03:33 PM #2
## Re: Dungeons and Dragons

**I would like to know how to model this question.**__I do not__.

I have not done any programming is years.

But I know how to do that way.

We need an array that contains all distinct four-tuples of the set .

The outcomes in this question are .

We need to search that array row-wise dropping a least element in a row and adding the other three. That way we can count the number of ways of getting each of those 16 outcomes.

If for then we can find the probabilities.

For example

Again, .

The answer that you seek is

- Jun 13th 2011, 11:39 PM #3

- Joined
- Feb 2010
- Posts
- 7

## Re: Dungeons and Dragons

Thanks for getting back to me on this one. I see where you are going with this but I must admit it has not really shed much light on my original question.

I do a bit of coding myself (a bizarre game with javascript) but only briefly touched on C++ arrays.

Any other more thorough takes on this people?

- Jun 13th 2011, 11:41 PM #4

- Joined
- May 2011
- Posts
- 34

## Re: Dungeons and Dragons

Here you go.

"...the calculated mean of the 4d6-L distribution is 12.24."

- Jun 14th 2011, 10:55 AM #5

- Joined
- Feb 2010
- Posts
- 7

- Jun 14th 2011, 12:05 PM #6

- Joined
- Apr 2005
- Posts
- 19,345
- Thanks
- 2860

## Re: Dungeons and Dragons

Unless I am reading it incorrectly, the cited paper is talking about "6D4L" where they roll four six sided dice and discard the lowest number. I wrote a Java program that simulates rolling six six sided dice, then dropping the lowest and highest numbers 10000 times. I got an average of "13.975" which I would round to 14.

- Jun 14th 2011, 12:29 PM #7

- Joined
- Jun 2010
- Posts
- 59

## Re: Dungeons and Dragons

My friend says you can do this a more theoretical route using an "order statistic" (which I'm not familiar with).

I wrote a program in Scala to calculate this. This should be 100% accurate.

Basic logic:

Iterate every permutation of die values (total of 6^4 permutations)

For each permutation calculate the sum minus lowest. Increment corresponding bucket by one.

Use the permutation counts to calculate expected value.

In the results below, there are 21 permutations for a net value of 18 with a probability of 21/(6^4)=0.016.

Expected value is calculated as normal for discrete variables: (3*1 + 4*4 + 5*10 + 6*21 + ... + 18*21)/(6^4)

My end result is 12.245. This should be 100% accurate.

0: 0: 0.000

1: 0: 0.000

2: 0: 0.000

3: 1: 0.001

4: 4: 0.003

5: 10: 0.008

6: 21: 0.016

7: 38: 0.029

8: 62: 0.048

9: 91: 0.070

10: 122: 0.094

11: 148: 0.114

12: 167: 0.129

13: 172: 0.133

14: 160: 0.123

15: 131: 0.101

16: 94: 0.073

17: 54: 0.042

18: 21: 0.016

expected = 12.245

Code:object Probability4d6l { def main(args: Array[String]) { val permCounts = new Array[Int](19); val numpermutations = 6 * 6 * 6 * 6; for (d1 <- 1 until 7) { for (d2 <- 1 until 7) { for (d3 <- 1 until 7) { for (d4 <- 1 until 7) { val lowest = math.min(d1, math.min(d2, math.min(d3, d4))); val value = d1 + d2 + d3 + d4 - lowest; permCounts(value) += 1; } } } } var expected: Double = 0.0; for (i <- 0 until permCounts.length) { expected += i * permCounts(i).asInstanceOf[Double] / numpermutations; println("%d: %d: %.3f".format(i, permCounts(i), permCounts(i).asInstanceOf[Double] / numpermutations)); } println("expected = %.3f".format(expected)); } }

- Jun 14th 2011, 01:03 PM #8
## Re: Dungeons and Dragons

Maybe I too am misreading the question and or paper.

Of course my first reply was a attempt at a pure counting solution.

I have now programmed a computer algebra system to do trials.

Dropping the lowest of the four gives me a mean of .

That agrees more or less with that paper.

Dropping the highest of the four gives me a mean of .

Dropping the lowest and highest of the four gives me a mean of .

- Jun 14th 2011, 04:57 PM #9

- Joined
- May 2011
- Posts
- 34