How to Prove the Variance of a Geometric Distribution
At a glance
- 1. Choose a convention
Let X count trials up to and including the first success, with success probability p.
- 2. Write the generating function
Use the probability-generating function G(s) = ps / (1 − (1 − p)s).
- 3. Differentiate
Evaluate G′(1) and G″(1) to obtain the mean and the second factorial moment.
- 4. Calculate variance
Use Var(X) = E[X(X − 1)] + E[X] − E[X]² to get (1 − p) / p².
A geometric random variable models the number of independent trials needed to get the first success. Its variance depends on the success probability, but the distribution is defined using two common counting conventions. This proof starts with the convention that counts the successful trial, then shows why the other convention has the same variance.
Define the geometric distribution
Let each trial succeed with probability , where , and write . Define to be the number of trials up to and including the first success. Then takes values , and
For example, means the first two trials fail and the third succeeds. The probability-generating function (PGF) is
The geometric series converges when . Since when , the function and its derivatives are well-defined at .
Derive the mean and second factorial moment
For a PGF, the first derivative at 1 gives the mean, and the second derivative at 1 gives the second factorial moment, . Differentiate:
At , the denominator equals . Therefore,
The second derivative does not directly give . Instead, use , so
Now apply :
Thus, for the convention that counts the successful trial, the mean is and the variance is .
Worked example
Suppose a trial succeeds with probability . Then . The expected number of trials is
and the variance is
The standard deviation is therefore trials. A variance larger than the mean is possible here: many trials may be needed when success is relatively unlikely, creating a broad distribution.
As a boundary case, if , the first trial always succeeds. The formula gives variance , as expected for a constant random variable.
If you count failures instead
Some texts define a geometric random variable as the number of failures before the first success. Its possible values are , with . Subtracting a constant changes the mean but not the variance, so
Check which convention a problem uses before quoting the mean. The variance formula is the same for both conventions, provided means the probability of success on each trial.
Common mistakes
- Mixing the two conventions: The means and correspond to different definitions. State whether the variable counts trials or failures.
- Treating as the second moment: It equals , not . Add to obtain the second moment.
- Using the failure probability as without saying so: If a source uses for the probability of failure, rewrite the formula in terms of the success probability before comparing results.
- Forgetting the squared mean: Variance is , not just the second moment.
References
- A First Course in Probability — Sheldon Ross
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.