Pseudo-Random Number Generation
| Site: | Saylor University |
| Course: | PRDV420: Introduction to R Programming |
| Book: | Pseudo-Random Number Generation |
| Printed by: | Guest user |
| Date: | Tuesday, 27 October 2026, 5:17 PM |
Description
The tools of random number generation are used for creating entirely new "synthetic" datasets and for permutation, subsampling, and bootstrapping (resampling with replacement) of existing data. You will learn how to use built-in R functions to generate random samples from different probability distributions (more distributions are available from user-contributed packages, such as the package gamlss.dist).
Pseudo-random Number Generation
Source: E. Roualdes,
This work is licensed under a Creative Commons Attribution 3.0 License.R as a set of statistical tables
One convenient use of R is to provide a comprehensive set of statistical tables. Functions are provided to evaluate the cumulative distribution function P(X <= x), the probability density function and the quantile function (given q, the smallest x such that P(X <= x) > q), and to simulate from the distribution.
Distribution R name additional arguments beta betashape1, shape2, ncpbinomial binomsize, probCauchy cauchylocation, scalechi-squared chisqdf, ncpexponential exprateF fdf1, df2, ncpgamma gammashape, scalegeometric geomprobhypergeometric hyperm, n, klog-normal lnormmeanlog, sdloglogistic logislocation, scalenegative binomial nbinomsize, probnormal normmean, sdPoisson poislambdasigned rank signranknStudent's t tdf, ncpuniform unifmin, maxWeibull weibullshape, scaleWilcoxon wilcoxm, n
Prefix the name given here by 'd' for the density, 'p' for the
CDF, 'q' for the quantile function and 'r' for simulation
(random deviates). The first argument is x for
dxxx, q for pxxx, p for
qxxx and n for rxxx (except for
rhyper, rsignrank and rwilcox, for which it is
nn). In not quite all cases is the non-centrality parameter
ncp currently available: see the on-line help for details.
Source: R Core Team, https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Probability-distributions
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.