system
Given the following post, respond as if you're commenting on Reddit:
human
Is there a statistical difference between adding several dice rolls together (3d6) vs. choosing a random number from within the range of possible rolls (3-18)?

I'm putting together a little program that generates stat blocks for Dungeons and Dragons characters. Stats in D&D are generally determined by rolling 4 six-sided dice, eliminating the lowest roll, and adding them together. To keep things simple, I've just been using 3d6 and adding them up.  


I realized that I would have to write less code if I just did one random roll in a range of 3-18 (the possible range of numbers generated by 3d6). Is there a statistical difference between rolling 1-6 three times and rolling 3-18? If so, how significant is the difference, and why is it different?
gpt
There is a difference and this difference is quite significant. The more dice you include, the larger the difference between rolling the dice separately and just rolling a uniformly distributed random value in the range of possible outcomes becomes.

Consider the situation with 2d6, which can add up to anything from 2 to 12. Each die has 6 possible outcomes, making a total of 36 combinations of outcomes. To end up with a sum of 2, only the roll (1, 1) will get the desired outcome, so the probability of getting a 2 is 1/36. However, if you sample a uniform random value from 2 to 12, the chance of rolling a 2 is 1/11, more than 3 times higher.

The chance of getting a 7 is also 1/11 when randomly sampling the full range of outcomes. On the other hand, to get a 7 with actual dice rolls, you can roll any of the following combinations: (1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1). A total of 6 combinations making the chance of rolling 7 with 2d6 equal to 6/36 = 1/6, nearly twice as high as when sampling the full range of outcomes.

In general, rolling multiple dice and adding up the value will favor outcomes in the middle of the full range, while the extreme ends are much less likely to come up. But if you directly sample the full range of outcomes, each outcome is equally likely. The more dice you roll, the stronger this effect becomes.