We recommend reading this documentation on
https://alexpghayes.github.io/distributions3/, where the math
will render with additional detail and much greater clarity.
In the following, let \(X\) be a Geometric random variable with
success probability p
= \(p\). Note that there are multiple
parameterizations of the Geometric distribution.
Support: 0 < p < 1, \(x = 0, 1, \dots\)
Mean: \(\frac{1-p}{p}\)
Variance: \(\frac{1-p}{p^2}\)
Probability mass function (p.m.f):
$$
P(X = x) = p(1-p)^x,
$$
Cumulative distribution function (c.d.f):
$$
P(X \le x) = 1 - (1-p)^{x+1}
$$
Moment generating function (m.g.f):
$$
E(e^{tX}) = \frac{pe^t}{1 - (1-p)e^t}
$$