Properties of the geometric distribution

We will next derive formulae for the mean and variance of the geometric distribution. These require 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} \]

For completeness, we will prove these two results here but the details can be skipped.

The sum of an ordinary geometric series is

\[ \sum_{x=0}^\infty {a^x} = \frac 1 {1-a} \]

Differentiating both sides with respect to \(a\),

\[ \sum_{x=0}^\infty {x \; a^{x-1}} = \frac 1 {(1-a)^2} \]

Multiplying both sides by \(a\),

\[ \sum_{x=0}^\infty {x \; a^x} = \frac a {(1-a)^2} \]

Differentiating again with respect to \(a\), we get

\[ \begin{align} \sum_{x=0}^\infty {x^2 \; a^{x-1}} & = \frac d {da} \left(\frac a {(1-a)^2}\right) \\ & = \frac 1 {(1-a)^2} + \frac {2a} {(1-a)^3} \\ & = \frac {1 + a} {(1-a)^3} \end{align} \]

Multiplying both sides by \(a\),

\[ \sum_{x=0}^\infty {x \; a^x} = \frac {a(1+a)} {(1-a)^3} \]

We now derive 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} \]
\[ \begin{align} E[X] = \sum_{x=0}^\infty {x \times p(x)} & = \sum_{x=0}^\infty {x \pi (1-\pi)^{x-1}} \\ & = \frac {\pi} {1-\pi} \sum_{x=0}^\infty {x (1-\pi)^x} \end{align} \]

Using the formula for the first summation at the top of this page with \(a = 1-\pi\),

\[ \begin{align} E[X] & = \frac {\pi} {1-\pi} \times \frac {1-\pi} {(1 - (1-\pi))^2} \\ & = \frac {\pi} {1-\pi} \times \frac {1-\pi} {\pi^2} = \frac 1 {\pi} \end{align} \]

We find the variance of \(X\) using the general result that \(\Var(X) = E[X^2] - \big(E[X]^2\big) \),

\[ \begin{align} E[X^2] = \sum_{x=0}^\infty {x^2 \times p(x)} & = \sum_{x=0}^\infty {x^2 \pi (1-\pi)^{x-1}} \\ & = \frac {\pi} {1-\pi} \sum_{x=0}^\infty {x^2 (1-\pi)^x} \end{align} \]

Using the second summation at the top of the page with \(a = 1-\pi\),

\[ \begin{align} E[X^2] & = \frac {\pi} {1-\pi} \times \frac {(1-\pi)(1 + (1-\pi))} {(1 - (1-\pi))^3} \\ & = \frac {\pi} {1-\pi} \times \frac {(1-\pi)(2-\pi)} {\pi^3} \\[0.5em] & = \frac {2 - \pi} {\pi^2} \end{align} \]

Therefore

\[ \begin{align} \Var[X] = E[X^2] - \big(E[X]^2\big) & = \frac {2 - \pi} {\pi^2} - \left(\frac 1 {\pi} \right)^2 \\ & = \frac {(1-\pi)} {\pi^2} \end{align} \]