Post Reply 
Sum of roll of N dice
05-06-2018, 06:12 PM (This post was last modified: 05-06-2018 06:16 PM by Dieter.)
Post: #33
RE: Sum of roll of N dice
(05-05-2018 06:38 PM)Dieter Wrote:  There is a way to calculate the distribution, i.e. the probabilty for a sum of n, n+1, n+2, ... 6n. I found this PDF (in German) that shows an interesting approach:

I now have calculated the probability distribution function for some small n (=3, 4 and 5) and compared it with the approximation by a Normal distribution with µ=n·3,5 and σ²=n·35/12. The results look quite good:

Code:
n=3

dice     probabilty
sum   exact     approx.
-----------------------
 3    0,0046    0,0054
 4    0,0139    0,0121
 5    0,0278    0,0239
 6    0,0463    0,0424
 7    0,0694    0,0670
 8    0,0972    0,0944
 9    0,1157    0,1186
10    0,1250    0,1330
11    0,1250    0,1330
12    0,1157    0,1186
13    0,0972    0,0944
14    0,0694    0,0670
15    0,0463    0,0424
16    0,0278    0,0239
17    0,0139    0,0121
18    0,0046    0,0054

The max. absolute error is < 0,008 in the center, else even < 0,004. So both distributions agree very well.

For n=4 the largest error is ~ 0,004.

For n=5 the largest error is ~ 0,003.

The match seems even better for σ²=n·36/12  and  σ²=n·37/12.
So the inversion method (apply the Normal quantile function to the generated random number) seems to be a good approach.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Sum of roll of N dice - Joe Horn - 05-02-2018, 05:06 AM
RE: Sum of roll of N dice - Gerald H - 05-02-2018, 05:48 AM
RE: Sum of roll of N dice - pier4r - 05-02-2018, 06:21 AM
RE: Sum of roll of N dice - Jim Horn - 05-02-2018, 07:01 AM
RE: Sum of roll of N dice - pier4r - 05-02-2018, 08:04 AM
RE: Sum of roll of N dice - John Keith - 05-02-2018, 02:07 PM
RE: Sum of roll of N dice - Jim Horn - 05-02-2018, 05:58 PM
RE: Sum of roll of N dice - John Keith - 05-02-2018, 07:18 PM
RE: Sum of roll of N dice - Gerald H - 05-02-2018, 08:01 AM
RE: Sum of roll of N dice - Werner - 05-03-2018, 12:39 PM
RE: Sum of roll of N dice - Gerald H - 05-03-2018, 04:49 PM
RE: Sum of roll of N dice - Werner - 05-03-2018, 05:14 PM
RE: Sum of roll of N dice - Gamo - 05-02-2018, 10:54 AM
RE: Sum of roll of N dice - Joe Horn - 05-02-2018, 12:03 PM
RE: Sum of roll of N dice - Joe Horn - 05-02-2018, 02:00 PM
RE: Sum of roll of N dice - John Keith - 05-02-2018, 07:15 PM
RE: Sum of roll of N dice - Dieter - 05-02-2018, 07:38 PM
RE: Sum of roll of N dice - pier4r - 05-02-2018, 07:44 PM
RE: Sum of roll of N dice - Jim Horn - 05-02-2018, 09:51 PM
RE: Sum of roll of N dice - Csaba Tizedes - 05-03-2018, 08:16 AM
RE: Sum of roll of N dice - SlideRule - 05-04-2018, 12:23 AM
RE: Sum of roll of N dice - Csaba Tizedes - 05-04-2018, 06:09 AM
RE: Sum of roll of N dice - Joe Horn - 05-04-2018, 07:32 AM
RE: Sum of roll of N dice - SlideRule - 05-03-2018, 01:55 PM
RE: Sum of roll of N dice - Gamo - 05-04-2018, 06:27 AM
RE: Sum of roll of N dice - Joe Horn - 05-04-2018, 07:12 AM
RE: Sum of roll of N dice - SlideRule - 05-04-2018, 11:30 AM
RE: Sum of roll of N dice - Michael Zinn - 05-04-2018, 06:35 PM
RE: Sum of roll of N dice - Dieter - 05-04-2018, 08:04 PM
RE: Sum of roll of N dice - Dieter - 05-05-2018, 06:38 PM
RE: Sum of roll of N dice - Dieter - 05-06-2018 06:12 PM
RE: Sum of roll of N dice - zooropa1844 - 05-06-2018, 10:11 AM
RE: Sum of roll of N dice - zooropa1844 - 05-06-2018, 08:18 PM
RE: Sum of roll of N dice - Dieter - 05-06-2018, 09:02 PM
RE: Sum of roll of N dice - zooropa1844 - 05-06-2018, 09:31 PM
RE: Sum of roll of N dice - pier4r - 05-08-2018, 05:14 PM
RE: Sum of roll of N dice - Allen - 05-11-2018, 12:11 AM
RE: Sum of roll of N dice - Allen - 05-11-2018, 01:32 AM
RE: Sum of roll of N dice - zooropa1844 - 05-11-2018, 06:55 AM
RE: Sum of roll of N dice - brickviking - 05-11-2018, 09:52 AM
RE: Sum of roll of N dice - Allen - 05-11-2018, 12:19 PM
RE: Sum of roll of N dice - Thomas Klemm - 06-23-2018, 09:36 PM
RE: Sum of roll of N dice - rprosperi - 06-23-2018, 10:33 PM
RE: Sum of roll of N dice - ttw - 06-24-2018, 01:08 AM



User(s) browsing this thread: 1 Guest(s)