Geometric Distribution¶
Geometric Distribution¶
A geometric distribution represents the probability distribution for the number of failures in Bernoulli trials till the first success.
Another definition is to consider \(k\) as the number of trials before the first success. The distribution will then be defined on \(k = 1, 2, \ldots\) and is often called the shifted distribution.
Moment Generating Function¶
To calculate mean and variance, we first calculate the moment generating function
Expected number of failures will be \(1/p - 1 = (1-p)/p\) (since \(1/p\) is the total expected trials and we subtract the last trial which is a success).
Mean and Variance¶
With the moment generating function, mean and variance are easy to calculate
If \(X\) denoted the total trials till first success, \(E[X]\) would be \((1-p)/p + 1 = 1/p\) and variance would be same since its only a shifted distribution.