pGammaBinom: Cumulative probability density function under the...

View source: R/betafunctions.R

pGammaBinomR Documentation

Cumulative probability density function under the Gamma-extended Binomial distribution.

Description

Extends the cumulative Binomial probability mass function to positive non-integers, effectively turning the mass-function into a density-function.

Usage

pGammaBinom(q, size, prob, lower.tail = TRUE)

Arguments

q

Vector of quantiles.

size

Number of "trials" (zero or more). Need not be integer.

prob

Probability of "success" on each "trial". Need not be integer.

lower.tail

Logical. If TRUE (default), probabilities are P[X<x], otherwise, P[X >= x]. Note that this differs from base-R binom() functions.

References

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

Examples

# Assume some variable follows a Gamma-Binomial  distribution with
# "number of trials" = 10.5 and probability of "success" for each "trial"
# = 0.75, to compute the cumulative probability to attain a "number of
# success" below a specific point (e.g., less than 7.5 "successes":
pGammaBinom(q = 7.5, size = 10.5, prob = 0.75)

# Conversely, to attain a value at or above 7.5:
pGammaBinom(q = 7.5, size = 10.5, prob = 0.75, lower.tail = FALSE)

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