On Generating Random Variates from an Empirical Distribution | Synapse