View Single Post
Old 09-20-2017, 11:49 AM   #3
ericthered
Hero of Democracy
 
ericthered's Avatar
 
Join Date: Mar 2012
Location: far from the ocean
Default Re: Math Gurus - Help with Probability

Ok, so I have a function that will give probability for any single die roll:

Code:
function probability(a){
    var b = Math.abs(a -3.5)+.5;
    return Math.pow(6,-Math.ceil(b/3))/ (b%3==0?2:1);
}
Yes, its steps up in series of three, going outwards from the 3-4 center, with the third element being half the value of the other two, and each set of three decreasing in likelihood by 6.

Now we can deal with that infinite series you lined up for us to calculate...
__________________
Be helpful, not pedantic

Worlds Beyond Earth -- my blog

Check out the PbP forum! If you don't see a game you'd like, ask me about making one!

Last edited by ericthered; 09-20-2017 at 11:54 AM.
ericthered is online now   Reply With Quote