dfrbinom {frbinom} | R Documentation |
Fractional binomial distributions
Description
Generating random variables and computing density, cumulative distribution, and quantiles of the fractional binomial distribution with the parameters size
, prob
, h
, c
.
Usage
dfrbinom(x, size, prob, h, c, start = FALSE)
pfrbinom(x, size, prob, h, c, start = FALSE)
qfrbinom(p, size, prob, h, c, start = FALSE)
rfrbinom(n, size, prob, h, c, start = FALSE)
Arguments
x |
A numeric vector specifying values of the fractional binomial random variable at which the pmf or cdf is computed. |
size |
A number specifying the total number of trials. |
prob |
A number specifying the probability of success in each trial. |
h |
A number specifying the strength of the dependency among trials; it determines the skewness of the distribution. |
c |
A number specifying the overdispersion of distributions. |
start |
logical; if TRUE, the starting point is changed after the first success in the generalized Bernoulli process. The default is FALSE. |
p |
A numeric vector specifying probabilities at which quantiles of the fractional binomial distribution are computed. |
n |
A number of random variables to be simulated. |
Details
The regular binomial random variable counts the number of successes in i.i.d. Bernoulli trials.
In the fractional binomial distribution, the number of successes is counted among dependent Bernoulli trials that are from the generalized Bernoulli process (GBP).
In GBP, each trial has the constant probability of success prob
, and the strength of the dependency among the trials is determined by the parameters, h
and c
. The parameters c
and h
are related to the overdispersion and skewness of the fractional binomial distribution.
The parameters prob
=p
, h
=H
, c
=c
should satisfy
p,H \in (0,1)
and
0\leq c<\min\{1-p, \frac{1}{2} ( -2p+2^{2H-2} +\sqrt{4p-p2^{2H}+2^{4H-4}})\}.
With the number of trials (size
) =n
, the mean of the fractional binomial random variable is E(X)=np
,
and the variance is asymptotically proportional to n^{2H}
, if H\in (0.5, 1)
;
n\ln n
, if H=0.5
; and n
, if H\in (0, .5)
.
If c
=0, it becomes the regular binomial distribution.
Value
A numeric vector of random variables (rfrbinom) or pmf (dfrbinom) or cdf (pfrbinom) or quantile (qfrbinom) of the fractional binomial distribution.
Functions
-
dfrbinom()
: The pmf of fractional binomial distribution. -
pfrbinom()
: The cdf of fractional binomial distribution. -
qfrbinom()
: The quantiles of fractional binomial distribution. -
rfrbinom()
: The generation of fractional binomial random variables.
References
Lee, J. (2021). Generalized Bernoulli process with long-range dependence and fractional binomial distribution. Dependence Modeling, 9(1), 1-12.
Examples
# 10 random variables of a fractional binomial distribution.
rfrbinom(n=10, size=50, prob=.6, h=.8, c=.2)
# The probability that the fractional binomial random variable equals 22.
dfrbinom(x=22, size=50, prob=.6, h=.8, c=.2)
# The probability that the fractional binomial random variable is less than or equal to 22.
pfrbinom(x=22, size=50, prob=.6, h=.8, c=.2)
# The 80th percentile of the fractional binomial distribution.
qfrbinom(p=.8, size=50, prob=.6, h=.8, c=.2)