ddice | R Documentation |
See https://math.stackexchange.com/questions/2290090/probability-that-the-sum-of-k-dice-is-n for derivation
ddice(x, n, s)
pdice(x, n, s, lower.tail = TRUE)
x |
Target sum |
n |
Number of dice to be rolled |
s |
Number of sides per die |
lower.tail |
logical: if TRUE (default), probabilities are P(X <= x); otherwise P(X >= x) |
ddice(13, 5, 6)
pdice(13, 5, 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.