Tutorials › Statistical Theory I - Probability and Distribution Theory › Geometric Probability Mass Function from First Success

Geometric and Count Distributions · Tutorial 126 of 994

Geometric Probability Mass Function from First Success

See how independent Bernoulli trials produce the geometric probability mass function, and check exactly when that formula defines a probability distribution.

Beginner 9 min read

What You'll Learn

  • Identify the outcome sequence corresponding to a first success on trial k
  • Derive the geometric probability mass function using independence
  • State the support and success-probability conditions for the model
  • Verify normalization using finite geometric sums and a limit
  • Distinguish a proper geometric distribution from the p = 0 boundary case

From a Sequence of Trials to a Probability Mass Function

A geometric random variable describes when a repeated sequence of trials first succeeds. Its probability mass function is simple, but the exponent in the formula records an important detail: to succeed for the first time on trial \(k\), the first \(k-1\) trials must fail, and trial \(k\) must succeed. This tutorial derives that probability from the trial model and verifies that the resulting probabilities account for all possible finite waiting times.

Assume that the trials are independent and have the same success probability \(p\), where \(0<p\leq 1\). Write \(q=1-p\) for the failure probability. Let \(X\) be the trial number of the first success, so \(X\) takes values in \(\{1,2,3,\ldots\}\) whenever a success eventually occurs. The support convention matters: \(X=1\) means success on the very first trial.

Definition: Let the trials be independent, with success probability \(p\) and failure probability \(q=1-p\) on each trial. The first-success waiting time \(X\) is the number of the trial on which the first success occurs. For \(0<p\leq 1\), its support is the positive integers. The probability mass function is \(f(k)=P(X=k)\) for integers \(k\) in the support.

Deriving the First-Success Probability

For a fixed positive integer \(k\), the event \(X=k\) is precisely the event that trials \(1,\ldots,k-1\) fail and trial \(k\) succeeds. No condition is imposed on later trials: once the first success has occurred, the value of \(X\) is already determined.

$$ \{X=k\} = \{\text{failure on trials }1,\ldots,k-1,\ \text{success on trial }k\}. $$

The independence assumption lets us multiply the probabilities of these trial outcomes. Each of the first \(k-1\) failures has probability \(q\), and the success on trial \(k\) has probability \(p\). Therefore

$$ P(X=k) = \underbrace{q\cdot q\cdots q}_{k-1\text{ failures}}\cdot p = q^{k-1}p = (1-p)^{k-1}p,\qquad k=1,2,3,\ldots. $$
Theorem: If independent trials each have success probability \(p\), where \(0<p\leq 1\), then the trial number \(X\) of the first success has probability mass function $$ f(k)=P(X=k)=(1-p)^{k-1}p,\qquad k=1,2,3,\ldots. $$

The power is \(k-1\), not \(k\), because exactly \(k-1\) failures precede the success. For \(k=1\), there are no failures to specify, and the formula gives \(q^0p=p\), as required. The convention \(q^0=1\) applies here, including when \(q=0\).

Worked Example: First Success on Trial Three

A device passes an independent quality check on each inspection with probability \(p=0.4\). Let \(X\) be the inspection number on which it first passes. Find \(P(X=3)\).

The failure probability on one inspection is \(q=1-0.4=0.6\). For the first pass to occur on inspection 3, the device must fail inspections 1 and 2, then pass inspection 3. Thus

$$ P(X=3)=(0.6)(0.6)(0.4)=0.6^2(0.4)=0.144. $$

The probability is \(0.144\). The calculation includes two failures, not three, because the third inspection is a success.

Worked Example: First Positive Result on Trial Two

Suppose a test has probability \(0.8\) of returning a positive result on each attempt, and assume attempts are independent with the same probability. Find the probability that the first positive result occurs on attempt 2.

A first positive on attempt 2 requires a negative result on attempt 1 and a positive result on attempt 2. The negative-result probability is \(1-0.8=0.2\), so

$$ P(X=2)=(0.2)(0.8)=0.16. $$

This is not the probability of any positive result on attempt 2: the event here also requires that attempt 1 was negative. If attempt 1 had already been positive, then \(X=1\), not \(X=2\).

Verifying That the Probabilities Sum to One

A probability mass function on the positive integers must assign nonnegative probabilities whose sum over all possible values is one. Nonnegativity follows immediately from \(p>0\) and \(q\geq 0\). To check the total, first add the probabilities for the first \(m\) possible values, where \(m\) is any positive integer.

Result: For \(0<p\leq 1\), the first-success probabilities satisfy $$ \sum_{k=1}^{\infty} q^{k-1}p=1. $$

For \(0<p<1\), we have \(0<q<1\). The finite geometric-sum identity gives

$$ \sum_{k=1}^{m}q^{k-1}p = p\sum_{j=0}^{m-1}q^j = p\frac{1-q^m}{1-q}. $$

Since \(1-q=p\), this becomes

$$ \sum_{k=1}^{m}q^{k-1}p = p\frac{1-q^m}{p} = 1-q^m. $$

Because \(0<q<1\), \(q^m\) converges to zero as \(m\) increases without bound. Taking the limit of the finite partial sums therefore yields

$$ \sum_{k=1}^{\infty}q^{k-1}p = \lim_{m\to\infty}(1-q^m) = 1. $$

The case \(p=1\) can be checked directly rather than by dividing by \(p\) in the geometric-sum identity. Then \(q=0\), so the first trial succeeds with probability \(1\): \(P(X=1)=1\), and \(P(X=k)=0\) for every \(k\geq 2\). The probabilities again sum to one. This proves normalization for every \(p\) in the stated range. \(\square\)

Worked Example: Checking the First Four Terms

Suppose each trial succeeds with probability \(p=0.25\), so \(q=0.75\). Compute the first four probabilities and check their partial sum against the finite-sum formula.

Using \(f(k)=q^{k-1}p\),

$$ \begin{aligned} P(X=1)&=0.25,\\ P(X=2)&=(0.75)(0.25)=0.1875,\\ P(X=3)&=(0.75)^2(0.25)=0.140625,\\ P(X=4)&=(0.75)^3(0.25)=0.10546875. \end{aligned} $$

Their sum is

$$ 0.25+0.1875+0.140625+0.10546875=0.68359375. $$

The partial-sum formula gives the same result:

$$ 1-q^4=1-(0.75)^4=1-0.31640625=0.68359375. $$

This partial sum is less than one because it includes only the first four possible values. The infinite sum, not any fixed finite partial sum, is the normalization check for the full probability mass function.

Conditions and Common Mistakes

The formula depends on a particular trial model. The trials must be independent, and each must have the same success probability \(p\). If those conditions do not hold, the chance of the specified sequence of outcomes need not be \(q^{k-1}p\). For instance, if success probabilities vary by trial, then the probability of first success on trial \(k\) is the product of the first \(k-1\) failure probabilities and the success probability on trial \(k\), with a different factor at each position.

There is also a boundary issue at \(p=0\). In that case every trial fails with probability one, so no finite first-success time exists. The expression \(q^{k-1}p\) is zero for every positive integer \(k\), and its sum is zero—not one. Thus it does not define a probability mass function on the positive integers when \(p=0\). The usual geometric distribution for a finite first-success time requires \(p>0\).

  • Using \(p^kq\) or \(q^kp\). These put the success and failure counts in the wrong places. There are \(k-1\) failures and one success, giving \(q^{k-1}p\).
  • Starting the support at zero. Under the first-success trial-number convention, \(X\geq 1\). A value of zero would mean that the first success occurs before any trial.
  • Forgetting independence. Multiplying the individual trial probabilities is justified by independence. Identical marginal probabilities alone do not justify this product.
  • Assuming every value has positive probability. When \(p=1\), the distribution is concentrated at \(X=1\); all later values have probability zero.
Key takeaway: First success on trial \(k\) means \(k-1\) failures followed by one success, so \(P(X=k)=(1-p)^{k-1}p\). For \(0<p\leq1\), these probabilities sum to one; at \(p=0\), no finite first success occurs.

This derivation shows why the geometric mass function has its particular form and when it is a valid distribution. The sequence interpretation also provides a practical check: before applying the formula, count the failures required before the final success and confirm that the model's independence and equal-probability assumptions fit the situation.

Check Your Understanding

Work through these questions by identifying the required trial sequence before calculating.

  1. If the success probability on each independent trial is \(0.3\), write \(P(X=5)\) in terms of \(p\) and \(q\), and give its numerical value.
  2. Explain why the event \(X=1\) has probability \(p\), rather than \(qp\).
  3. For \(p=0.6\), calculate \(P(X=1)+P(X=2)\) directly and verify it using the finite-sum formula.
  4. What happens to the first-success distribution when \(p=1\)? Give the probability for \(X=1\) and for \(X\geq2\).
  5. Why does the formula \(q^{k-1}p\) fail to define a probability mass function on the positive integers when \(p=0\)?