This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/Binomial.html
Binomial {base}R Documentation

The Binomial Distribution

Usage

dbinom(x, n, p)
pbinom(q, n, p)
qbinom(prob, n, p)
rbinom(nobs, n, p)

Arguments

x, q

vector of quantiles.

prob

vector of probabilities.

nobs

number of observations to generate.

n

number of trials.

p

probability of success on each trial.

Value

These functions provide information about the binomial distribution with parameters n and p. dbinom gives the density, pbinom gives the distribution function qbinom gives the quantile function and rbinom generates random deviates.

The binomial distribution has density

p(x) = {n \choose x} {p}^{x} {(1-p)}^{n-x}

for x = 0, \ldots, n.

Examples

# Compute P(45 < X < 55) for X Binomial(100,0.5)
sum(dbinom(46:54, 100, 0.5))

[Package base version 0.60 ]