DADiSP Worksheet Functions > Function Categories > Statistics and Calculus > BINCOEFF

 

BINCOEFF

Purpose:

Calculates the generalized binomial coefficient.

Syntax:

BINCOEFF(n, k)

n

-

A scalar or series.

k

-

A scalar or series.

Returns:

A scalar or series. For positive integer values, the number of combinations of n items taken in unordered groups of k.

Example:

bincoeff(5, 3)

 

returns 10.

Example:

bincoeff(5.3, 3)

 

returns 12.5345

Example:

c = bincoeff(1..5, 3)

 

c = {0, 0, 1, 4, 10}

Example:

c = bincoeff(3..7, 1..5)

 

c = {3, 6, 10, 15, 21}

Example:

c = bincoeff(3..0.5..7, 1..0.5..5)

 

c = {3, 4.375, 6, 7.875, 10, 12.375, 15, 17.875, 21}

Example:

(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 -10 <= x <= 10 and -10 <= y <= 10.

Remarks:

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 non-integer values by using the GAMMA function:

 

 

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.

See Also:

FACTORIAL

GAMMA

GRANDBINOMIAL

NCHOOSEK

PASCAL