COMBINATIONS numberOfItemsNumber groupSizeNumber resultVariable

A combination is an unordered selection of elements of a set. This command computes the number of combinations of n items taken k at a time, where n is numberOfItemsNumber and k is groupSizeNumber. It replaces the contents of resultVariable with the result.

If a variable is used for numberOfItemsNumber or groupSizeNumber, only the first element of the vector is used.

If numberOfItemsNumber or groupSizeNumber is non-integer, it will be truncated to an integer. (For example, 3.4, 3.5, and 3.9 will all be truncated to 3.0.)

The COMBINATIONS function is used much like any other math function in Statistics101/Resampling Stats:

COMBINATIONS 10 4 comb10_4
PRINT comb10_4

The above program produces the following output:

comb10_4: 210.0