Skip to contents

Computes the cumulative distribution function (CDF), \(P(X \le q)\), for the Beta-Kumaraswamy (BKw) distribution with parameters alpha (\(\alpha\)), beta (\(\beta\)), gamma (\(\gamma\)), and delta (\(\delta\)). This distribution is defined on the interval (0, 1) and is a special case of the Generalized Kumaraswamy (GKw) distribution where \(\lambda = 1\).

Usage

pbkw(
  q,
  alpha = 1,
  beta = 1,
  gamma = 1,
  delta = 0,
  lower.tail = TRUE,
  log.p = FALSE
)

Arguments

q

Vector of quantiles (values generally between 0 and 1).

alpha

Shape parameter alpha > 0. Can be a scalar or a vector. Default: 1.0.

beta

Shape parameter beta > 0. Can be a scalar or a vector. Default: 1.0.

gamma

Shape parameter gamma > 0. Can be a scalar or a vector. Default: 1.0.

delta

Shape parameter delta >= 0. Can be a scalar or a vector. Default: 0.0.

lower.tail

Logical; if TRUE (default), probabilities are \(P(X \le q)\), otherwise, \(P(X > q)\).

log.p

Logical; if TRUE, probabilities \(p\) are given as \(\log(p)\). Default: FALSE.

Value

A vector of probabilities, \(F(q)\), or their logarithms/complements depending on lower.tail and log.p. The length of the result is determined by the recycling rule applied to the arguments (q, alpha, beta, gamma, delta). When lower.tail = TRUE, returns 0 (or -Inf if log.p = TRUE) for q <= 0 and 1 (or 0 if log.p = TRUE) for q >= 1. An out-of-bound or missing parameter is an error, not a return value: the wrapper stops with a message naming the parameter. An infinite parameter is not currently intercepted there and reaches the C++ layer, which treats it as invalid. Boundary return values are adjusted accordingly for lower.tail = FALSE.

Details

The Beta-Kumaraswamy (BKw) distribution is a special case of the five-parameter Generalized Kumaraswamy distribution (pgkw) obtained by setting the shape parameter \(\lambda = 1\).

The CDF of the GKw distribution is \(F_{GKw}(q) = I_{y(q)}(\gamma, \delta+1)\), where \(y(q) = [1-(1-q^{\alpha})^{\beta}]^{\lambda}\) and \(I_x(a,b)\) is the regularized incomplete beta function (pbeta). Setting \(\lambda=1\) simplifies \(y(q)\) to \(1 - (1 - q^\alpha)^\beta\), yielding the BKw CDF: $$ F(q; \alpha, \beta, \gamma, \delta) = I_{1 - (1 - q^\alpha)^\beta}(\gamma, \delta+1) $$ This is evaluated using the pbeta function.

References

Cordeiro, G. M., & de Castro, M. (2011). A new family of generalized distributions. Journal of Statistical Computation and Simulation, 81(7), 883-898. doi:10.1080/00949650903530745

Kumaraswamy, P. (1980). A generalized probability density function for double-bounded random processes. Journal of Hydrology, 46(1-2), 79-88. doi:10.1016/0022-1694(80)90036-0

See also

pgkw (parent distribution CDF), dbkw, qbkw, rbkw (other BKw functions), pbeta

Other cumulative distribution functions: pbeta_(), pekw(), pgkw(), pkkw(), pkw(), pmc()

Author

Lopes, J. E.

Examples

q <- c(0.2, 0.5, 0.8)
pbkw(q, alpha = 2, beta = 3, gamma = 1.5, delta = 0.5)
#> [1] 0.06408708 0.59906559 0.98313307
# P(X > q)
pbkw(q, alpha = 2, beta = 3, gamma = 1.5, delta = 0.5, lower.tail = FALSE)
#> [1] 0.93591292 0.40093441 0.01686693
pbkw(q, alpha = 2, beta = 3, gamma = 1.5, delta = 0.5, log.p = TRUE)
#> [1] -2.7475125 -0.5123842 -0.0170108

## pbkw() is the integral of dbkw()
Fq <- pbkw(0.5, alpha = 2, beta = 3, gamma = 1.5, delta = 0.5)
all.equal(Fq, integrate(dbkw, 0, 0.5, alpha = 2, beta = 3, gamma = 1.5,
    delta = 0.5, rel.tol = 1e-10)$value)
#> [1] TRUE