Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Binomial coefficients solution in Creative category for Probably Dice by flpo
from scipy.special import binom as b
from math import floor as f
def probability(n, s, p):
return round(sum((-1)**k*b(n, k)*b(p-s*k-1, n-1) for k in range(1+f((p-n)/s)))/s**n, 4)
April 25, 2017
Comments: