Pseudo-Random Number Generation

Let [Graphics:Images/index_gr_1.gif] be any discrete random variable with pmf [Graphics:Images/index_gr_2.gif]. To illustrate, suppose [Graphics:Images/index_gr_3.gif]:

[Graphics:Images/index_gr_4.gif]

We now generate 20 copies of [Graphics:Images/index_gr_5.gif]:

[Graphics:Images/index_gr_6.gif]
[Graphics:Images/index_gr_7.gif]

Here, in a fraction of a second, are 50000 more copies of [Graphics:Images/index_gr_8.gif]:

[Graphics:Images/index_gr_9.gif]
[Graphics:Images/index_gr_10.gif]

Contrast the empirical distribution of data with the true distribution of [Graphics:Images/index_gr_11.gif]:

[Graphics:Images/index_gr_12.gif]

[Graphics:Images/index_gr_13.gif]

Fig. 1: The empirical pmf (red triangles) and true pmf (blue circles)

The triangular dots denote the empirical pmf, while the round dots denote the true density [Graphics:Images/index_gr_14.gif]. One obtains a superb fit because mathStatica's DiscreteRNG is an exact solution.