Distributions Flashcards
rnorm(n, mean=0, sd=1)
Gaussian (normal)
rexp(n, rate=1)
exponential
rgamma(n, shape, scale=1)
gamma
rpois(n, lambda)
Poisson
rweibull(n, shape, scale=1)
Weibull
rcauchy(n, location=0, scale=1)
Cauchy
rbeta(n, shape1, shape2)
beta
rt(n, df)
‘Student’ (t)
rf(n, df1, df2)
Fisher–Snedecor (F ) (χ2 )
rchisq(n, df)
Pearson
rbinom(n, size, prob)
binomial
rgeom(n, prob)
geometric
rhyper(nn, m, n, k)
hypergeometric
rlogis(n, location=0, scale=1)
logistic
rlnorm(n, meanlog=0, sdlog=1)
lognormal
rnbinom(n, size, prob)
negative binomial
runif(n, min=0, max=1)
uniform
rwilcox(nn, m, n)
Wilcoxon’s statistics
r p d q
All these functions can be used by replacing the letter r with d, p or q to get, respectively, the probability density (dfunc(x, …)), the cumulative probability density (pfunc(x, …)), and the value of quantile (qfunc(p, …), with 0 < p < 1).