dbinom(x, size, prob, log=F) pbinom(q, size, prob) qbinom(p, size, prob) rbinom(n, size, prob, bigdata=F)
bdVector of quantiles.
Missing values (
NAs) are allowed.
bdVector of (positive) quantiles (number of successes obtained in
size
binomial trials with probability
prob of success).
Missing values (
NAs) are allowed.
bdVector of probabilities.
Missing values (
NAs) are allowed.
bdVector of (positive integer) numbers of coin flips for which
the Binomial distribution measures the number of heads.
bdVector of probabilities of a head.
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,
dbinom will return
the log of the density, not the density itself.
dbinom),
probability (
pbinom),
quantile (
qbinom), or
random sample (
rbinom)
for the Binomial distribution with parameters
size and
prob.
The quantile is defined as the smallest value
q such that Pr(Binomial random
variate <=
q) >=
p.
rbinom causes the creation of the dataset
.Random.seed if
it does not already exist, otherwise its value is updated.
Elements of
q or
p that are missing will cause the corresponding elements of the result to be missing.
A Binomial discrete random variable X is the number of
successes in
n independent repetitions of a simple success-failure experiment
where
p is the probability of success. For example, consider the
experiment of tossing a coin
n times where the probability of
the coin landing heads is
p. A special case is the
Bernoulli trial when
n == 1 (a coin toss).
For details on the uniform random number generator implemented in S-PLUS,
see the
set.seed help file.
Hoel, P., Port, S. and Stone, C. (1971).
Introduction to Probability Theory.
Houghton-Mifflin, Boston, MA.
Johnson, N. L. and Kotz, S. (1970).
Discrete Univariate Distributions, vol. 2.
Houghton-Mifflin, Boston, MA.
rbinom(20, 10, 0.5) # sample of size 20 with mean 10*0.5 = 5 rbinom(11, 10, 0:10/10) # different values of prob rbinom(10, 1:10, .5) # different values of size