9.3 Finite Distribution Families
9.3.1 Unordered Discrete Distributions
Represents families of unordered, discrete distributions over values of type A
, with equality
decided by equal?
The weights in ws must be nonnegative, and are treated as unnormalized probabilities.
When ws is not given, the values in xs are assigned uniform probabilities.
The type (Discrete-Dist A) is a subtype of (dist A A). This means that discrete
distribution objects are unordered, and thus have only a pdf and a procedure to generate
Note, however, that the discrete-dist-values and discrete-dist-probs functions
produce lists that may be paired; that is, if the result of calling discrete-dist-values
on a given distribution produces a list whose third element is 'a, and the result of calling
discrete-dist-probs on the same distribution produces a list whose third element is 0.25,
then the given distribution associates the probability 0.25 with the value 'a.