With this being said, we opt to focus the remainder of this vignette on the creation of an RNG.
Creating a Random Uniform Distribution
The basics of creating a random uniform distribution are as follows:
The generation of random numbers $R$ (e.g. 18885, 23945734, 4298034852, and so on)
The known maximum/ceiling of the random number generation $\max\left(R\right)$ (e.g. sitmo::prng_engine::max() or SITMO_RAND_MAX)
The ability to scale the randomly generated number between $[a,b]$.
sitmo provides a high quality version of 1. as shown informally in the next section and a means of acquiring 2. Thus, one is only left with creating the correct scaling equation. In particular, this equation is governed by:
The implementation of this using sitmo is given as follows:
To verify the quality of sitmo in an informal way, we can test the dependency or correlation between the seeds. To do so, we generate the same number of realizations under different seeds that have a range. With this being said, we consider the following code:
We can visualize the data by using a correlation graph. In this case, the generations off the diagonal should have no correlation ($r = 0$) whereas the seeds on the diagonal should have a correlation of 1 ($r = 1$).
Observing the correlation graph, we note that the pattern predicted - only correlation on the diagonal - exists. Thus, the generation under these seeds are ideal.