Probabilities.Binomial Method

Double Binomial(Int32 N, Int32 K)

Binomial coefficient C(n,k).

#NameDescription
1Nn in nCk
2integer.
3Kk in nCk
4integer.

Returns: Double - the binomial coefficient nCk.

Remarks:

Binomial coefficient nCk is the number of ways of picking k unordered outcomes from n possibilities, also known as a combination or combinatorial number. It is defined by:

binomnk = n!/(k! (n-k)!) .

Domain: N, K integer. Defined behavior: returns 0 when K < 0; returns 1 when K = 0 or K = N; returns N when K = 1 or K = N-1; otherwise the value is computed by the multiplicative product and rounded to the nearest integer. The result is returned as a double (it can exceed the 64-bit integer range for large N).