Univariate Simulation

Recall the Random Number Generation method from Chapter 1, where we studied two pseudo-random number generators:

These methods allow a computer to produce sequences of numbers that behave like random numbers. Although computers are deterministic machines, carefully designed algorithms can generate numbers that appear random and are sufficiently reliable for simulation purposes. Such numbers are called pseudorandom numbers, and they form the foundation of almost every simulation study.

In practice, most simulation algorithms begin with a sequence of random numbers drawn from the Uniform(0,1) distribution. Because values in this distribution are equally likely to occur anywhere between 0 and 1, they serve as a convenient starting point for generating more complex random variables. Through appropriate transformations, these uniform numbers can be converted into samples from many other probability distributions.

The main challenge in simulation is therefore not generating randomness itself, but transforming uniform random numbers into samples from a desired distribution.

In many applications, we need to simulate a single random variable with a specified distribution. This distribution may be:

Regardless of the type, the goal is the same:

construct a procedure that converts Uniform(0,1) samples into values that follow the target distribution.

To simulate these types of random variables, we need systematic procedures that convert uniform random numbers into values that follow the desired probability distribution.

This section presents the main techniques for univariate simulation, organised around this transformation principle.

We begin with transforming random variables, which provides the theoretical foundation for how distributions change under functions. This idea underpins many simulation methods.

Next, we introduce inverse transform sampling, one of the most fundamental and widely applicable techniques. By using the cumulative distribution function (CDF), this method provides a direct way to generate random variables from both discrete and continuous distributions.

However, not all distributions have a tractable inverse CDF. In such cases, alternative approaches are required. We therefore introduce the acceptance–rejection method, a flexible technique that allows us to simulate from more complex distributions by combining simpler ones.

By the end of this section, you will be able to:

These techniques form a core component of simulation, providing the tools needed to generate the random inputs required in more complex models and applications.