Take the 2-minute tour ×
Role-playing Games Stack Exchange is a question and answer site for gamemasters and players of tabletop, paper-and-pencil role-playing games. It's 100% free, no registration required.

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.

share|improve this question

closed as off topic by GPierce, wax eagle, C. Ross Jul 10 '11 at 1:55

Questions on Role-playing Games Stack Exchange are expected to relate to role-playing games within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Can you program in perl? There is a dice module that will let you roll arbitrary-sized virtual dice, which would be simple (for a perl programmer) to create arbitrarily-complicated dice-rolling procedures and then "roll" it a huge number of times to generate statistical outcomes. Rolemaster open-ended percentiles would be a fairly simple program. –  SevenSidedDie Jul 6 '11 at 18:44
    
@SevenSidedDie I can't imagine there's a language out there in which that would be anything but trivial to write. –  corsiKa Jul 7 '11 at 4:40
    
I can code in R (r-project.org) so if I wanted to do statistics, I would use that. But that does it experimentally and not mathematically. I am looking for the later. –  Sardathrion Jul 7 '11 at 7:37
    
@Total Trivial is relative. See also ASM, Brainf*ck, Whitespace… And some people really just want to write application-level code, not re-implement library functionality. Trivial is relative in all kinds of ways. –  SevenSidedDie Jul 7 '11 at 17:36
    
@SevenSidedDie In the languages where everything is non-trivial of course it wouldn't be. In languages where it is impossible of course it wouldn't be. "Re-implementing" the roll of an n-sided die is trivial, hands down. It's a simple multiplication. I've "Re-implemented" such things in multiple languages in a matter of minutes many times. –  corsiKa Jul 7 '11 at 18:49
show 1 more comment

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
    
This is doing just what I wanted. Thanks. –  Sardathrion Jul 8 '11 at 9:08
add comment

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.

share|improve this answer
    
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
1  
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
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.