Description Usage Arguments Examples
Density, distribution function, quantile function and random generation for the truncated binomial distribution.
1 2 3 4 5 6 7 |
x, q |
vector of quantiles. |
size |
number of trials (zero or more). |
prob |
probability of success on each trial. |
a, b |
lower and upper truncation points ( |
log, log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X ≤ x] otherwise, P[X > x]. |
p |
vector of probabilities. |
n |
number of observations. If |
1 2 3 4 5 6 7 8 9 10 11 | x <- rtbinom(1e5, 100, 0.83, 76, 86)
xx <- seq(0, 100)
plot(prop.table(table(x)))
lines(xx, dtbinom(xx, 100, 0.83, 76, 86), col = "red")
hist(ptbinom(x, 100, 0.83, 76, 86))
xx <- seq(0, 100, by = 0.01)
plot(ecdf(x))
lines(xx, ptbinom(xx, 100, 0.83, 76, 86), col = "red", lwd = 2)
uu <- seq(0, 1, by = 0.001)
lines(qtbinom(uu, 100, 0.83, 76, 86), uu, col = "blue", lty = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.