Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 292
The Binomial Distribution in R
ОглавлениеAs for all distributions, R has four in-built functions to generate binomial distribution:
dbinom(x, size, prob): The density function
dbinom()
pbinom()
dbinom()
pbinom(x, size, prob): The cumulative probability of an event
pbinom()
qbinom(p, size, prob): Gives a number whose cumulative value matches a given probability value
qbinom()
rbinom(n, size, prob): Generates random variables following the binomial distribution.
rbinom()
Following parameters are used:
x: A vector of numbers
p: A vector of probabilities
n: The number of observations
size: The number of trials
prob: The probability of success of each trial