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

Reply via email to