Check that i ≤ j
, and that i
and j
are integers.
mctad.discreteUniform(1, 6).generate(10)
will generate an Array of 10
random variables, distributed uniformly between 1 and 6, inclusive, as in the roll of a fair die.
Iterate over the domain, calculating the probability mass and cumulative distribution functions.
Mix in the convenience methods for p(x) and F(x).
Uniform Distribution (Discrete)
The Discrete Uniform Distribution is a symmetric probability distribution where a finite number of values are equally likely to be observed. A common example of its application is the roll of a fair die, where the equally likely outcomes 1, 2, …, 6 each have probability 1/6.
Assumptions
i
andj
are Integers, the lower and upper bounds of a range of equally likely Integers.Use
mctad.discreteUniform(i, j)
Inline Comments