Friday, September 10, 2010

Some stats on stats.


A recent conversation with a friend has got me obsessing about playing D&D again. However, since I don't have any sourcebooks (because of the fire at my parent's house a couple years back), I am very sadface. Out of this recent obsession, I've decided to do some math. And by math, I mean some programming.

Whenever you create a D&D character, you use die rolls to determine your characters stats. I was curious about how the stats are distributed and the probability of obtaining particular results. To investigate this, I wrote two programs, one iterated through all of the possible rolls for 4 die, dropped the lowest, and found the stat total. This let me figure out the mean, mode, and quartiles for the distribution of the stats.. In short, out of all the possible rolls, the number of outcomes for each number is as follows: