From: Christer Nilsson Date: 2006-01-08T03:56:06+09:00 Subject: Re: Dice Roller (#61) Gavin Kistner wrote: > On Jan 7, 2006, at 9:58 AM, Reinder Verlinde wrote: >> ([1,21])d(16/[1,4])+3 = (c/[x,y] = [c/y,c/x] if x and y > 0) >> >> ([1,21])d([4,16])+3 = ([a,b]d[c,d] = [a*c,b*d] if a,b,c, and d >> > 0) > > I'm agree with you on that top line, but I'm not sure how you got to > the second line from there. > I think you meant: > > ([1,21])d([1,4])+3 = ... > > which results in: > > [1,84]+3 > [4,87] d(16/[1,4]) must be [16/4,16/1] => [4,16] [1,21] d [4,16] must be [1*4, 16*21] => [4, 336] I would like to introduce distribution. Using one normal dice we have an even distribution distr("d6") = [0,1,1,1,1,1,1] Sum=6 Using two normal dices we have the following distribution distr("2d6")=[0,0,1,2,3,4,5,6,5,4,3,2,1] Sum=36 (min:max) = (2:12) P("2d6",12) = 1/36 = 2.8% I have a question regarding the distribution for "(d2)d6". In words, I'm first throwing a coin, to decide how many times I will throw a the dice. [1,2] d [1,2,3,4,5,6] My guess: distr("d6") = [0,1,1,1,1,1,1] Sum=6 distr("2d6") = [0,0,1,2,3,4,5,6,5,4,3,2,1] Sum=36 Probability merge distr("d6") [0,6,6,6,6, 6, 6] Sum=36 distr("2d6") [0,0,1,2,3, 4, 5,6,5,4,3,2,1] Sum=36 distr("(d2)d6") [0,6,7,8,9,10,11,6,5,4,3,2,1] Sum=72 The probability of having one point is P("(d2)d6",1) = 6/72 = 8.3% Can somebody agree or disagree on this? Christer -- Posted via http://www.ruby-forum.com/.