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.
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.
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
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
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
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.
For \(0<p<1\), we have \(0<q<1\). The finite geometric-sum identity gives
Since \(1-q=p\), this becomes
Because \(0<q<1\), \(q^m\) converges to zero as \(m\) increases without bound. Taking the limit of the finite partial sums therefore yields
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\),
Their sum is
The partial-sum formula gives the same result:
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.
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.
- 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.
- Explain why the event \(X=1\) has probability \(p\), rather than \(qp\).
- For \(p=0.6\), calculate \(P(X=1)+P(X=2)\) directly and verify it using the finite-sum formula.
- What happens to the first-success distribution when \(p=1\)? Give the probability for \(X=1\) and for \(X\geq2\).
- Why does the formula \(q^{k-1}p\) fail to define a probability mass function on the positive integers when \(p=0\)?