Check that p
is a valid probability (0 < p ≤ 1).
mctad.geometric(0.25).generate(100)
will generate an Array of 100
random variables, distributed geometrically with a probability .25 of success.
Iterate over the domain, calculating the probability mass and cumulative distribution functions.
Mix in the convenience methods for p(x) and F(x).
Geometric Distribution
The Geometric Distribution, as implemented here, can be used to model the number of failures before the first success in a sequence of Bernoulli trials.
Assumptions
p
is a valid probability (0 < p ≤ 1).Use
mctad.geometric(p)
Inline Comments