Derivation of formulae for the mean and variance of the geometric distribution requires summation of two series that are closely related to the summation of a geometric series.
Two mathematical results
If \(-1 < a < 1\), then
\[ \begin{align} \sum_{x=0}^\infty {x \times a^x} & = \frac a {(1-a)^2} \\ \sum_{x=0}^\infty {x^2 \times a^x} & = \frac {a(1+a)} {(1-a)^3} \end{align} \](Proved in full version)
We now give the mean and variance of the geometric distribution.
Mean and variance
If a random variable has a geometric distribution, \(X \sim \GeomDistn(\pi) \) with probability function
\[ p(x) = \pi (1-\pi)^{x-1} \qquad \text{for } x = 1, 2, \dots \]then its mean and variance are
\[ E[X] = \frac 1 {\pi} \spaced{and} \Var(X) = \frac {1 - \pi} {\pi^2} \](Proved in full version)