# Polyhedral dice statistics program, spreadsheet, or document

Does anyone know of a program that does statistical analysis on dice rolls, or a document of tables for the same? I am looking mainly for statistics other than d6 (which are very common in most statistical books), especially on open ended dice rolls. In particular I'm looking for the Rolemaster style of pseudo-percentiles that are open-ended both low and high: if you roll 01-15, roll again and subtract, if you roll 96-100, roll again and add.

While I can do statistics (mostly Bayesian), I am loath to re-invent the wheel if something like this already exists.

-

Check out AnyDice. It can do pretty much anything you'd want it to. See the blog post on explosions to define your own function to do what you described.

-
This is doing just what I wanted. Thanks. – Sardathrion Jul 8 '11 at 9:08

Since you are statistics-capable, I would recommend that you take a look at Troll, a dice-roll language and calculator. It's capable of loops and conditionals and has a statistical bent.

There's also R, the statistical computing environment.

Being a Python programmer myself, I would probably gravitate towards SAGE instead, which provides a unified interface to a ton of open-source math packages, including R.

Now a question for you - are you trying to calculate the probabilities of certain outcomes prescriptively or to simulate thousands (or millions) of dice events and use those results to describe the probabilities?

EDIT: I see now from your comments in your question that you are interested in the mathematical derivation of these statistics, not the experimental.

-
Or J. You could write the whole thing in a single line of J. If you survive that long. (Humorous blog post: eschew.wordpress.com/2008/05/05/…) – Cthos Jul 6 '11 at 19:17
I took a look at Troll and the web version even has a user-contributed "Rolemaster double open-ended d%" that can be selected from the drop-down. Click "Calculate probabilities" and there you have it! +1 – SevenSidedDie Jul 6 '11 at 22:11
@Seven - at least I got something right today! – gomad Jul 6 '11 at 22:40