Hi, David, I saw your mail arrive this morning, and immediately had the following program in mind, but had to wait until now to post it. This is the sort of thing I've always worked with when I examine odds across multiple dice.
(~. ,: #/.~ % x:@#) , +/~ 1+i.6 2 3 4 5 6 7 8 9 10 11 12 1r36 1r18 1r12 1r9 5r36 1r6 5r36 1r9 1r12 1r18 1r36 On Oct 11, 2011 6:49 AM, "David Vaughan" <purpleblue...@googlemail.com> wrote: > I'm trying to work out the probability of any number being rolled by an > n-sided die with r rolls. For example, a 6-sided die with 2 rolls, 7 has > probability 6/36=1/6. > > I was hoping to achieve this by having a list of the possible rolls and > then trying every possible sum down through each row/column. > > For example, a 2-sided die with 3 rolls, I'd want to get something along > these lines: > > 1 2 1 1 2 2 1 2 > 1 1 2 1 2 1 2 2 > 1 1 1 2 1 2 2 2 > > .. then sum the columns to get: > > 3 4 4 4 5 5 5 6 > > Any help? Thanks. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm