binomial: The Binomial Distribution

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

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

Usage

1
2
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")

Details

Very similar to the R stats functionality.

Value

gdbinom gives the density and grbinom generates random deviates

Note

The algorythm for simulating from the poisson distribution was modified from the GSL library which uses the modified from the GSL library which uses the Knuth method.

Author(s)

Nathan Morris

See Also

dbinom

Examples

1
myRndNums = grbinom(10,10,.6)

gmatrix documentation built on May 29, 2017, 2:20 p.m.