5.3 Realizations of Samples
Computer implementations of the Monte Carlo method employ realizations of samples to solve problems. We introduced samples and their realizations in Section 4.3.1. There, we would obtain data from some experiment and model it as a realization {x[1], x[2], … , x[m]} of a sample {X[1], X[2], … , X[m]}. This allowed us to make inferences about the unknown distribution of a random vector X.
In a Monte Carlo application, we know the distribution of X, but must somehow specify a realization {x[1], x[2], … , x[m]} for use in the analysis. Historically, such realizations were constructed with physical processes such as tossing dice or drawing cards. Today, computer implementations of the Monte Carlo method employ algorithms that generate realizations.
To avoid biasing our results, we want a realization to be, in some sense, “random.” This cannot be formalized. The notion of a random variable is well defined. The notion of a random number is not. We may consider a finite sequence of numbers to be random if it is obtained in such a manner that the numbers are uncertain to us prior to their being obtained. For Monte Carlo work, this intuitive conception is not useful. Uncertainty is immaterial to the success of a Monte Carlo analysis. What is important is that the realization be statistically consistent with the sample {X[1], X[2], … , X[m]}. There are numerous—indeed, infinitely many—empirical tests for statistical consistency that we might perform. Examples include:
- the sample mean of {x[1], x[2], … , x[m]} should be close to the mean of X;
- the sample covariance matrix of {x[1], x[2], … , x[m]} should be close to the covariance matrix of X;
- to satisfy the IID condition, sample autocorrelations between lagged values of a given component,
and
, should be approximately 0 for any integer k.
We might call a realization {x[1], x[2], … , x[m]} “random” if it passed every conceivable empirical test, but this definition is empty. There are infinitely many tests we might perform. For a continuously distributed random vector X, no realization of a finite sample could pass them all!11 To avoid such theoretical and even philosophical issues related to defining randomness, we define instead a notion called pseudorandomness. We say that a realization of a sample is pseudorandom if it passes certain empirical tests deemed important by the user. Actual tests will depend upon the nature of the intended Monte Carlo analysis as well as the user’s ability or inclination to perform tests. The important test—whether a realization causes the Monte Carlo analysis to yield a reasonable value for the quantity being estimated—is likely to be infeasible to perform.
Our initial discussions of the Monte Carlo method will focus on numbers u[k] that are pseudorandom for a U(0,1) distribution. We call these pseudorandom numbers. We will also employ pseudorandom vectors u[k] for distribution Un((0,1)n). These may be constructed by generating n pseudorandom numbers u[i] and setting the components of u[k] equal to the respective pseudorandom numbers u[i]:
[5.9]
Later, we will discuss numbers that are pseudorandom, but for distributions other than U(0,1). We call these pseudorandom variates. We apply the term pseudorandom vector to any vector that is pseudorandom irrespective of distribution.
Exercises
Empirical tests for pseudorandomness are usually applied to large sequences of numbers—perhaps 100,000 numbers or more. For practice, let’s apply some empirical tests to the short sequence of numbers in Exhibit 5.8.

- Propose five empirical tests for pseudorandom numbers.
- Apply your tests to the ordered set of Exhibit 5.8.
- What conclusions do you draw?