gchoose: Gamma-extended Binomial coefficient (choose function).

View source: R/betafunctions.R

gchooseR Documentation

Gamma-extended Binomial coefficient (choose function).

Description

Extends the Binomial coefficient for positive non-integers (including 0) by employing the Gamma rather than the factorial function.

Usage

gchoose(n, k)

Arguments

n

In Binomial terms, the number of Binomial "trials". Need not be an integer.

k

In Binomial terms, the number of successful "trials". Need not be an integer.

Note

Not defined for negative integers.

References

Loeb, D. E. (1992). A generalization of the binomial coefficients. Discrete Mathematics, 105(1-3).

Examples

# Compare choose function with gchoose function for integers:
gchoose(c(8, 9, 10), c(3, 4, 5)) == choose(c(8, 9, 10), c(3, 4, 5))

# The gchoose function also works for non-integers:
gchoose(10.5, 7.5)

betafunctions documentation built on May 29, 2024, 1:13 a.m.