\[ \newcommand{\Exg}{\operatorname{\mathbb{E}}} \newcommand{\Ex}{\mathbb{E}} \newcommand{\Ind}{\mathbb{I}} \newcommand{\Var}{\operatorname{Var}} \newcommand{\Cov}{\operatorname{Cov}} \newcommand{\Corr}{\operatorname{Corr}} \newcommand{\ee}{\mathrm{e}} \]
10 Generating random numbers
Summary:
Random number generation has two problems: how to generate uniform random numbers between 0 and 1, and how to convert these to your desired distribution.
Uniform random numbers can be generated from true physical randomness (which will definitely be totally random, but will be slow and expensive) or using a pseudorandom number generator on a computer (which is very fast, but needs to be designed carefully to ensure a random-looking output).
LCGs are a type of pseudorandom number generator that are started from a “seed”, which can be chosen using physical randomness or set by the user.
Read more: Voss, An Introduction to Statistical Computing, introduction to Chapter 1, introduction to Section 1.1, and Subsection 1.1.3.