size
successes occur in a sequence of Bernoulli trials.
dnbinom(x, size, prob, log=F) pnbinom(q, size, prob) qnbinom(p, size, prob) rnbinom(n, size, prob, bigdata=F)
bdVector
of (positive) quantiles.
Missing values (
NA
s) are allowed.
bdVector
of (positive) quantiles.
Missing values (
NA
s) are allowed.
bdVector
of probabilities.
Missing values (
NA
s) are allowed.
bdVector
of positive integers; the Negative Binomial represents the
number of failures (or tails in coin tossing) before
size
successes
(or heads in coin tossing) are achieved where the
probability of a success (or of a head) is
prob
.
bdVector
of probabilities of a success.
If
length(n)
is larger than 1, then
length(n)
random values are returned.
TRUE
, an object of type
bdVector
is returned.
Otherwise, a
vector
object is returned. This argument can be used only if the bigdata library section has been loaded.
TRUE
,
dnbinom
will return
the log of the density, not the density itself.
dnbinom
),
probability (
pnbinom
),
quantile (
qnbinom
), or
random sample (
rnbinom
)
for the Negative Binomial distribution with parameters
size
and
prob
.
The quantile is defined as the smallest value
q
such that Pr(Negative
Binomial random variate <=
x
) >=
p
.
rbinom
causes the creation of the dataset
.Random.seed
if
it does not already exist, otherwise its value is updated.
q
or
p
that are missing will cause the
corresponding elements of the result to be missing.
For details on the uniform random number generator implemented in S-PLUS,
see the
set.seed
help file.
rbinom(20,10,0.5) # sample of size 20 with mean 10*0.5 = 5