"dice.sum.pdf" <- function (p, n, s) {
# p is the number of total points obtained
# n is the number of dice
# s is the number of sides on each die
        P = sum(1/(s^n) * (-1)^i * choose(n,i) * choose(p-(s*i)-1, n-1) )

Try the RankProd package in your browser

Any scripts or data that you put into this service are public.

RankProd documentation built on May 2, 2018, 2:39 a.m.