Let
be any discrete random variable with pmf
. To illustrate, suppose
:
![[Graphics:Images/index_gr_4.gif]](Images/index_gr_4.gif)
We now generate 20 copies of
:
![[Graphics:Images/index_gr_6.gif]](Images/index_gr_6.gif)
Here, in a fraction of a second, are 50000 more copies of
:
![[Graphics:Images/index_gr_9.gif]](Images/index_gr_9.gif)
Contrast the empirical distribution of data with the true distribution of
:
![[Graphics:Images/index_gr_12.gif]](Images/index_gr_12.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
. One obtains a superb fit because mathStatica's DiscreteRNG is an exact solution.