Tutorials › VEE Mathematical Statistics › Mean and Variance of a Geometric Waiting Time

VEE Mathematical Statistics · Geometric and Negative Binomial Models · Tutorial 104 of 880

Mean and Variance of a Geometric Waiting Time

Learn why the two geometric conventions have different means but the same variance, and practise computing each quantity from the success probability.

Intermediate 10 min read

What You'll Learn

  • State the support and probability mass function for each geometric convention.
  • Derive the trials-count mean and variance using geometric-series identities.
  • Derive the failures-count mean and variance and relate them to trials counted.
  • Calculate expected waiting time and variance from a stated success probability.
  • Avoid confusing the mean number of failures with the variance.
  • Check whether a problem counts the successful trial before applying a formula.

Why the Counting Convention Matters

A geometric random variable describes how long it takes to obtain the first success in repeated trials. Its mean and variance are determined by the success probability, but the numerical value of the mean depends on what is counted: the successful trial itself, or only the failures before it. This distinction matters whenever a waiting-time answer is reported in applications such as repeated inspections, claim reviews, or tests for a specified event.

The formulas in this tutorial assume that trials are independent and that every trial has the same probability of success. The geometric model is therefore appropriate only when the success probability remains fixed from trial to trial and the trials do not affect one another. The results are aligned with the SOA VEE Mathematical Statistics syllabus.

Definition: Let \(p\) be the probability of success on each trial and let \(q=1-p\) be the probability of failure. Assume \(0<p<1\), independent trials, and a fixed success probability. The trials-count variable \(T\) is the number of trials up to and including the first success, with support \(t=1,2,3,\ldots\) and probability mass function \(P(T=t)=q^{t-1}p\). The failures-count variable \(F\) is the number of failures before the first success, with support \(f=0,1,2,\ldots\) and probability mass function \(P(F=f)=q^fp\). They satisfy \(T=F+1\).

The factor \(q^{t-1}\) in the trials-count mass function represents the \(t-1\) failures followed by a success. For the failures-count variable, \(f\) failures followed by a success have probability \(q^fp\). These mass functions use different supports, so the same verbal description can lead to different numerical means if the count is not identified first.

Deriving the Mean and Variance

The derivation uses geometric-series identities. For \(0<q<1\), start with \(\sum_{k=0}^{\infty}q^k=1/(1-q)\). Differentiating this series and then differentiating \(q\) times its first derivative gives the two sums needed for the second moments:

$$ \sum_{k=1}^{\infty} kq^{k-1}=\frac{1}{(1-q)^2}, \qquad \sum_{k=1}^{\infty} k^2q^{k-1}=\frac{1+q}{(1-q)^3}. $$

Because \(1-q=p\), these identities can be applied directly to the probability mass functions. The following calculation also shows why the variance formula has \(p^2\) in its denominator.

1
Find the trials-count mean.
Use the definition of expectation and the first series identity: \(E[T]=\sum_{t=1}^{\infty}tq^{t-1}p=p/(1-q)^2=1/p\).
2
Find the trials-count second moment.
Using the second identity, \(E[T^2]=\sum_{t=1}^{\infty}t^2q^{t-1}p=p(1+q)/(1-q)^3=(1+q)/p^2\).
3
Subtract the square of the mean.
\(\operatorname{Var}(T)=E[T^2]-(E[T])^2=(1+q)/p^2-1/p^2=q/p^2\).

For \(F\), its probability mass function starts at zero. The required series are \(\sum_{f=0}^{\infty}fq^f=q/(1-q)^2\) and \(\sum_{f=0}^{\infty}f^2q^f=q(1+q)/(1-q)^3\). Multiplying each sum by \(p\) gives the first and second moments of \(F\).

$$ E[F]=p\frac{q}{(1-q)^2}=\frac{q}{p}, \qquad E[F^2]=p\frac{q(1+q)}{(1-q)^3}=\frac{q(1+q)}{p^2}. $$

Therefore, subtracting \((E[F])^2=q^2/p^2\) gives \(\operatorname{Var}(F)=q(1+q)/p^2-q^2/p^2=q/p^2\). This agrees with \(T=F+1\): adding a constant increases the mean by that constant but does not change the variance.

Theorem: For \(0<p<1\) and \(q=1-p\), the trials-count geometric variable has \(E[T]=1/p\) and \(\operatorname{Var}(T)=q/p^2\). The failures-count geometric variable has \(E[F]=q/p\) and \(\operatorname{Var}(F)=q/p^2\). The means differ by one; the variances are equal.

The restriction \(0<p<1\) is important. If \(p=1\), success occurs on the first trial with certainty, so \(T=1\), \(F=0\), and both variances are zero. If \(p=0\), a success never occurs, so there is no finite geometric waiting time and the displayed finite-mean formulas do not apply.

Worked Calculations

Worked Example: Expected Number of Weekly Screening Trials

Hypothetical scenario. A screening procedure is repeated weekly until it detects a specified marker. Assume each weekly result is independent, the probability of detection is \(p=0.25\) each week, and this probability remains constant. Let \(T\) count the week of the first detection, including the detection week. Find its mean and variance.

Method. This is a trials-count geometric variable. The failure probability is \(q=1-p=1-0.25=0.75\), and the support is \(1,2,3,\ldots\).

The expected number of weekly trials is \(E[T]=1/p=1/0.25=4\). The variance, in squared weeks, is \(\operatorname{Var}(T)=q/p^2=0.75/(0.25)^2=0.75/0.0625=12\).

Thus the mean waiting time is 4 weekly trials and the variance is 12 trials squared. As a check on the convention, a mean of 4 trials includes the successful week; the expected number of failed weeks before detection is \(4-1=3\). The common mistake this avoids is reporting 3 as the expected number of trials.

Worked Example: Failures Before a Successful Transaction

Hypothetical scenario. A processing team handles independent transactions. Each transaction has probability \(p=0.40\) of passing a specified check, and the probability stays fixed. Let \(F\) be the number of failed transactions before the first pass. Find \(E[F]\), \(\operatorname{Var}(F)\), and the expected total number of transactions through the first pass.

Method. The problem counts failures before success, so use the failures-count convention. First, \(q=1-0.40=0.60\).

The expected number of failures is \(E[F]=q/p=0.60/0.40=1.5\). The variance of the failure count is \(\operatorname{Var}(F)=q/p^2=0.60/(0.40)^2=0.60/0.16=3.75\).

The total number of transactions includes the successful one. Since \(T=F+1\), its expected value is \(E[T]=E[F]+1=1.5+1=2.5\) transactions.

The results are consistent with the trials-count formula: \(1/p=1/0.40=2.5\). The variance remains \(3.75\) because adding one to a random variable does not change its variance. A common mistake is to use \(1/p\) as the mean of \(F\); that counts the successful transaction as well.

Worked Example: Reconciling Both Counts in an Inspection Model

Hypothetical scenario. An item is inspected repeatedly until the first inspection that detects a defect. Assume independent inspections and a constant detection probability \(p=0.20\) per inspection. Let \(F\) count the inspections that fail to detect the defect before the first detection, and let \(T\) count all inspections through detection. Find the mean and variance under both counts, then check the probability that exactly three inspections fail before detection.

Method. The failure probability is \(q=1-0.20=0.80\). Start with \(F\), since the question explicitly counts failures before the successful inspection.

For failures, \(E[F]=q/p=0.80/0.20=4\), and \(\operatorname{Var}(F)=q/p^2=0.80/(0.20)^2=0.80/0.04=20\). For total inspections, \(T=F+1\), so \(E[T]=4+1=5\), while \(\operatorname{Var}(T)=20\).

Exactly three failures before detection means three failures followed by a detection. Its probability is \(P(F=3)=q^3p=(0.80)^3(0.20)=0.512(0.20)=0.1024\). Equivalently, this is \(P(T=4)=q^{4-1}p=0.1024\), since three failures mean detection on the fourth inspection.

The check confirms that the two counts describe the same waiting process, shifted by one. The common mistake this avoids is treating three failures as detection on inspection three; the successful inspection is the next one.

Reading the Formulas Correctly

The expected count answers a long-run average question, not a guarantee about any one waiting time. For example, \(E[T]=4\) does not mean that success must occur by trial four, and it does not mean that the probability of success on trial four is especially large. It summarizes the average across repeated independent waiting processes governed by the same \(p\).

The variance measures dispersion around the appropriate mean. Both conventions have the same variance because their random variables differ only by one. Their standard deviation is therefore also the same, \(\sqrt{q}/p\). The mean, by contrast, must match the stated count.

QuantityTrials through first success \(T\)Failures before first success \(F\)
Support1, 2, 3, ...0, 1, 2, ...
Probability mass function\(P(T=t)=q^{t-1}p\)\(P(F=f)=q^fp\)
Mean\(1/p\)\(q/p\)
Variance\(q/p^2\)\(q/p^2\)

A reliable calculation starts by translating the wording into a support: does the count begin at one and include the success, or does it begin at zero and count only failures? Then identify \(p\), calculate \(q=1-p\), and apply the matching mean with the common variance formula. This sequence prevents an indexing error before any arithmetic is done.

Common Mistake: Confusing a Mean With a Variance

Suppose the number of failures before success is geometric with \(p=0.40\), so \(q=0.60\). A tempting but incorrect calculation is \(\operatorname{Var}(F)=q/p=0.60/0.40=1.5\). That expression is actually the mean \(E[F]\), not the variance.

The correct variance formula has \(p^2\) in the denominator: \(\operatorname{Var}(F)=q/p^2=0.60/(0.40)^2=0.60/0.16=3.75\). The mean of 1.5 failures and variance of 3.75 failures squared are different summaries and have different units. A second frequent error is to use \(1/p\) for the failure count: \(1/p\) is the mean number of trials including success, while \(q/p\) is the mean number of failures before success.

Key takeaway: First identify what is being counted. For trials through success, the mean is \(1/p\); for failures before success, it is \(q/p\). Under either convention, the variance is \(q/p^2\), provided trials are independent and the success probability is fixed.

Check Your Understanding

For each problem, identify the counting convention before calculating. Assume independent trials with a fixed success probability unless the problem states otherwise.

  1. A hypothetical sensor has probability \(0.20\) of detecting a signal on each independent scan. Let \(T\) be the number of scans through the first detection. Find \(E[T]\) and \(\operatorname{Var}(T)\). (Answer: \(E[T]=5\), \(\operatorname{Var}(T)=20\).)
  2. A laboratory repeats an independent calibration check with pass probability \(0.60\). Let \(F\) count failed checks before the first pass. Find the mean and variance of \(F\). (Answer: \(E[F]=2/3\approx0.6667\), \(\operatorname{Var}(F]=10/9\approx1.1111\).)
  3. A hypothetical review has probability \(0.25\) of resolving a case at each independent attempt. Find the mean number of attempts through resolution, the mean number of unsuccessful attempts before resolution, and the variance under either count. (Answer: the means are 4 attempts and 3 unsuccessful attempts; either variance is 12.)
  4. An inspection process has a constant independent detection probability of \(0.10\). Find the expected number of inspections before and including detection, the expected number of missed detections before it, and the variance of either count. (Answer: the means are 10 inspections and 9 missed detections; either variance is 90.)
  5. A trials-count geometric waiting time has mean 8. Determine \(p\), \(q\), its variance, and the mean failures count for the same process. (Answer: \(p=0.125\), \(q=0.875\), variance \(=56\), and mean failures count \(=7\).)
Clinical Biostats