DADiSP Worksheet Functions > Function Categories > Statistics and Calculus > BINCOEFF
Calculates the generalized binomial coefficient.
BINCOEFF(n, k)
n |
- |
A scalar or series |
k |
- |
A scalar or series |
A scalar or series. For positive integer values, the number of combinations of n items taken in unordered groups of k.
bincoeff(5, 3)
returns 10.
bincoeff(5.3, 3)
returns 12.5345
c = bincoeff(1..5, 3)
c = {0, 0, 1, 4, 10}
c = bincoeff(3..7, 1..5)
c = {3, 6, 10, 15, 21}
c = bincoeff(3..0.5..7, 1..0.5..5)
c = {3, 4.375, 6, 7.875, 10, 12.375, 15, 17.875, 21}
(x, y)=fxyvals(-10, 10, 0.05, -10, 10, 0.05);
density(clip(bincoeff(x, y), -10, 10));
pink;setaspect(1);setxtic(2);setytic(2);
scales(2);xlabel("x");ylabel("y");label("Binomial Coefficients");
returns an interesting density plot of the binomial coefficients over the range
BINCOEFF returns the generalized binomial coefficient. The inputs can be any series or scalar values.
For non-negative integer values where 0 <= k <= n:
For negative integer values:
The binomial coefficient is generalized to
The result is accurate to 15 digits. A warning is displayed if the computation results in an overflow.
See NCHOOSEK to return the actual combinations of series elements for a given input series.