Negative Binomial Distribution |
---|
In connection with repeated Bernoulli trials, we are sometimes interested in the number of the trial on which the k-th success occurs.
A random variable X has a negative binomial distribution and it is referred to as a negative binomial random variable if and only if its probability distribution is given by
R has four dedicated commands for density, distribution function, quantile
function, and random generation for the negative binomial distribution with parameters
\[
b(x; k, \theta ) = \binom{x-1}{k-1} \theta^k \left( 1 - \theta \right)^{x-k} \qquad
\mbox{ for } \ x=k,k+11,k+2,\ldots .
\]
size
and prob
:
- dnbinom(x, size, prob, mu, log = FALSE)
- pnbinom(q, size, prob, mu, lower.tail = TRUE, log.p = FALSE)
- qnbinom(p, size, prob, mu, lower.tail = TRUE, log.p = FALSE)
- rnbinom(n, size, prob, mu)