Learn R Programming

gmatrix (version 0.3)

gdbinom: The Binomial Distribution

Description

Density and random generation for the binomial distribution with parameters size and prob.

Usage

gdbinom(x, size, prob, log = FALSE, type = "d") grbinom(n, size, prob)

Arguments

x
vector of quantiles.
n
number of observations
size
number of trials (zero or more)
prob
probability of success on each trial
log
logical; if TRUE, probabilities p are given as log(p).
type
specify the type; may be "double", "single" (or short form "d" or "s")

Value

gdbinom gives the density and grbinom generates random deviates

Details

Very similar to the R stats functionality.

See Also

dbinom

Examples

Run this code
myRndNums = grbinom(10,10,.6)

Run the code above in your browser using DataLab