View Single Post
Old 09-20-2017, 12:49 PM   #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...
__________________
Worlds Beyond Earth -- my blog

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