dbinom(x, n, p) pbinom(x, n, p) qbinom(prob, n, p) rbinom(nobs, n, p)
x
| vector of quantiles. |
prob
| vector of probabilities. |
nobs
| number of observations to generate. |
n
| number of trials. |
p
| probability of success on each trial. |
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
Equations will come with HTML3
for 0 <= x <= n.
Examples
# Compute P(45 < X < 55) for X Binomial(100,0.5)
sum(dbinom(46:54, 100, 0.5))