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 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 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 9 Guest(s)