对于一个特定类型的分布,R配套了4个函数:
d-
gives the “probability density” or “probability mass”,即pdf或pmfp-
gives the distribution function,即cdfq-
gives the quantile function,即下分位数函数r-
generates random deviates,即生成该分布随机变量的realizationdunif(x, min = 0, max = 1, log = FALSE)
punif(q, min = 0, max = 1, lower.tail = TRUE, log.p = FALSE)
runif(n, min = 0, max = 1)
dbinom(x, size, prob, log = FALSE)
pbinom(q, size, prob, lower.tail = TRUE, log.p = FALSE)
rbinom(n, size, prob)
dpois(x, lambda, log = FALSE)
ppois(q, lambda, lower.tail = TRUE, log.p = FALSE)
qpois(p, lambda, lower.tail = TRUE, log.p = FALSE)
rpois(n, lambda)