![[Experimental]](figures/lifecycle-experimental.svg)
Calculates the Cumulative Probability Function of the Beta difference for a given probability.
Usage
pbetadiff(q, parY, parX, rel.tol = .Machine$double.eps^0.1)
Arguments
- q
(number
):
vector of quantiles
- parY
(numeric
):
two parameters of Y
's Beta distribution (Treatment)
- parX
(numeric
):
two parameters of X
's Beta distribution (Control)
- rel.tol
(number
):
used in [stats::integrate()]
Value
The probability distribution value
Examples
# The following examples use these parameters:
parX <- c(1, 52)
parY <- c(5.5, 20.5)
# Calculate probability based on quantile `Q(Z) =< 0.122838`
pbetadiff(
q = 0.122838,
parY = parY,
parX = parX
)
#> [1] 0.2000019
# Calculate probability based on quantile `Q(Z) =< 0.5`
pbetadiff(
q = 0.5,
parY = parY,
parX = parX
)
#> [1] 0.9993969