Tutorials › VEE Mathematical Statistics › Exact Confidence Bounds From a Geometric Waiting Time

VEE Mathematical Statistics · Confidence Intervals and Pivots · Tutorial 540 of 880

Exact Confidence Bounds From a Geometric Waiting Time

Learn to invert geometric tail probabilities into confidence bounds for a success probability and verify their finite-sample coverage.

Intermediate 10 min read

What You'll Learn

  • Define the geometric waiting time using the trial on which the first success occurs
  • Derive a one-sided lower confidence bound by inverting the geometric cumulative distribution
  • Derive an upper confidence bound from the geometric survival probability
  • Combine tail bounds into a two-sided interval with conservative coverage
  • Check coverage by identifying which waiting times include the true probability
  • Avoid off-by-one errors when calculating geometric tail probabilities

Why a Geometric Waiting Time Gives a Confidence Bound

A waiting time can contain information about a success probability even when it is the only observation. If a system succeeds quickly, that is evidence in favor of a larger success probability; a long wait is evidence in favor of a smaller one. The geometric distribution describes this setting exactly, so its cumulative probabilities can be inverted to produce finite-sample confidence bounds.

The key detail is that a geometric waiting time is discrete. Its cumulative probabilities do not change smoothly, so an inverted bound will generally have coverage at least its stated level rather than exactly equal to it. The calculation is still exact: it uses the model’s finite-sample probabilities, not a large-sample approximation.

Definition: Suppose independent trials each result in success with probability \(p\), where \(0<p\leq 1\), and failure with probability \(1-p\). Let \(T\) be the number of trials up to and including the first success. Then \(T\) has a geometric distribution on \(1,2,3,\ldots\), with $$ P_p(T=t)=(1-p)^{t-1}p,\qquad t=1,2,\ldots. $$ Its cumulative distribution function and survival probability are $$ P_p(T\leq t)=1-(1-p)^t,\qquad P_p(T\geq t)=(1-p)^{t-1}. $$

The model assumes the success probability stays constant from trial to trial and that the trial outcomes are independent. For example, it can describe repeated attempts at a hypothetical data transmission if each attempt has the same success probability and does not affect later attempts. It does not describe a process in which the probability changes over time or in which failures alter the next attempt’s probability.

Here \(p\) is fixed but unknown, while \(T\) is random. A confidence bound is a function of the observed \(T\). Its coverage is the probability, calculated under a fixed true \(p\), that the resulting bound includes \(p\). This probability is evaluated over repeated realizations of the waiting time.

Inverting the Cumulative Distribution for a Lower Bound

A small observed waiting time is the evidence that can make a proposed success probability implausibly small. For a chosen error probability \(\alpha_L\), define the lower bound \(p_L(t)\) by setting the probability of observing a waiting time no greater than \(t\), at the bound itself, equal to \(\alpha_L\):

$$ P_{p_L}(T\leq t)=\alpha_L. $$

Using the geometric cumulative distribution and solving for \(p_L\) gives

$$ 1-(1-p_L)^t=\alpha_L \quad\Longrightarrow\quad p_L(t)=1-(1-\alpha_L)^{1/t}. $$

This is a one-sided lower confidence bound with coverage at least \(1-\alpha_L\). To see why, fix the true value \(p\). The bound fails to be below \(p\) only when \(p_L(T)>p\). Since \(P_p(T\leq t)=1-(1-p)^t\) increases with \(t\), the failure occurs only for waiting times whose cumulative probability is below \(\alpha_L\). The probability of that set of waiting times cannot exceed \(\alpha_L\): the last included integer value has cumulative probability less than \(\alpha_L\). Therefore,

$$ P_p\bigl(p_L(T)\leq p\bigr)\geq 1-\alpha_L. $$

Worked Example: A Lower Bound From Four Attempts

A hypothetical device is tested by making independent attempts until the first successful response. Each attempt has the same unknown success probability \(p\). The first response occurs on attempt \(T=4\). Find a 90% one-sided lower confidence bound for \(p\).

Method. Use the geometric cumulative probability and set \(\alpha_L=1-0.90=0.10\). The model counts the successful attempt as part of \(T\), so the observed waiting time is \(t=4\).

Substitute into the inverted cumulative distribution:

$$ p_L(4)=1-(1-0.10)^{1/4} =1-0.90^{1/4}. $$

The fourth root is \(0.90^{1/4}\approx0.9740037\), so \(p_L(4)\approx1-0.9740037=0.0259963\). To four decimal places, the lower bound is \(0.0260\). Thus the one-sided confidence statement is that the 90% lower confidence bound for \(p\) is \(0.0260\).

Check. At this endpoint, \(1-(1-p_L)^4=1-0.90=0.10\), as required. The common mistake is to use \(t-1\) in the cumulative probability; for \(P(T\leq t)\), there are \(t\) opportunities for a success, so the exponent is \(t\).

Inverting the Survival Probability for an Upper Bound

A long waiting time is the evidence that can make a proposed success probability implausibly large. For \(t\geq2\), set the probability of waiting at least \(t\) trials equal to an upper-tail error probability \(\alpha_U\):

$$ P_{p_U}(T\geq t)=\alpha_U. $$

There must be failures on the first \(t-1\) trials for \(T\geq t\). Solving the survival-probability equation gives

$$ (1-p_U)^{t-1}=\alpha_U \quad\Longrightarrow\quad p_U(t)=1-\alpha_U^{1/(t-1)},\qquad t\geq2. $$

When \(t=1\), use \(p_U(1)=1\). The event \(T\geq1\) is certain for every possible \(p\), so it cannot be equated to an error probability below one; the endpoint \(1\) is a valid upper bound. The resulting upper bound satisfies

$$ P_p\bigl(p\leq p_U(T)\bigr)\geq1-\alpha_U. $$

The bound is conservative because the geometric distribution is discrete. As with the lower bound, an endpoint is found by inversion, but the probability of the actual set of waiting times that leads to failure need not equal the chosen error probability.

Worked Example: An Upper Bound After Six Attempts

A hypothetical sensor is retried independently until its first successful reading, with a constant but unknown probability \(p\) of success on each attempt. The first success occurs on attempt \(T=6\). Find a 95% one-sided upper confidence bound for \(p\), and check the tail probability at the endpoint.

Method. Set \(\alpha_U=0.05\). For \(T=6\), the event \(T\geq6\) requires failures on the first \(6-1=5\) attempts. Invert that survival probability:

$$ p_U(6)=1-0.05^{1/5}. $$

Calculate \(0.05^{1/5}\approx0.5492803\), giving \(p_U(6)\approx1-0.5492803=0.4507197\). To four decimal places, the upper bound is \(0.4507\).

Check. At \(p=0.4507197\), the probability of at least six attempts is approximately \((1-0.4507197)^5=0.5492803^5=0.0500\). The common mistake is to use the exponent \(6\): \(T\geq6\) requires five initial failures, not six.

Two-Sided Bounds and Their Coverage

Allocate a total error probability \(\alpha\) between a lower-tail bound and an upper-tail bound. Choose nonnegative \(\alpha_L\) and \(\alpha_U\) such that \(\alpha_L+\alpha_U=\alpha\). For an observed waiting time \(t\), the equal-tailed interval uses \(\alpha_L=\alpha_U=\alpha/2\). Its endpoints are

$$ \left[ 1-(1-\alpha_L)^{1/t},\ 1-\alpha_U^{1/(t-1)} \right],\qquad t\geq2. $$

For \(t=1\), the lower endpoint remains \(1-(1-\alpha_L)\), and the upper endpoint is \(1\). The interval’s coverage is at least \(1-\alpha\). In fact, failure to include \(p\) can happen only if the lower bound exceeds \(p\), or if the upper bound is below \(p\). Each event has probability at most its allocated tail error. Adding those probabilities gives the coverage guarantee:

$$ P_p\bigl(p_L(T)\leq p\leq p_U(T)\bigr) \geq 1-\alpha_L-\alpha_U =1-\alpha. $$

This argument uses the elementary probability bound that the probability of a union of two events is no greater than the sum of their probabilities. Because the waiting time takes integer values, the actual coverage can exceed the stated level.

Worked Example: An 80% Interval and Its Actual Coverage

A hypothetical communications process has independent attempts with a constant unknown success probability \(p\). The first success is observed on attempt \(T=2\). Construct an equal-tailed 80% confidence interval. Then, if the true probability were \(p=0.20\), calculate the interval procedure’s actual coverage.

Method. Here \(\alpha=0.20\), so each tail receives \(\alpha_L=\alpha_U=0.10\). At \(t=2\), the lower and upper endpoints are

$$ p_L(2)=1-0.90^{1/2}\approx1-0.9486833=0.0513167, $$
$$ p_U(2)=1-0.10^{1/(2-1)}=1-0.10=0.9000000. $$

The interval is \([0.0513,0.9000]\), with endpoints rounded to four decimal places.

Coverage check at \(p=0.20\). For every possible \(T\geq1\), the lower bound is no greater than \(p_L(1)=0.10\), which is below \(0.20\). Thus the lower endpoint does not exclude \(0.20\). The upper endpoint includes \(0.20\) for \(T=1\), since it is \(1\). For \(t\geq2\), \(p_U(t)\geq0.20\) through \(t=11\): at \(t=11\), \(p_U(11)=1-0.10^{1/10}\approx0.2057\), while at \(t=12\), \(p_U(12)=1-0.10^{1/11}\approx0.1889\). Since \(p_U(t)\) decreases as \(t\) increases, the interval contains \(0.20\) exactly when \(T\leq11\).

Under the true value \(p=0.20\), \(P(T\leq11)=1-(1-0.20)^{11}=1-0.8^{11}\). Since \(0.8^{11}=0.0858993\), the actual coverage is \(0.9141007\), or \(0.9141\) to four decimal places. It exceeds the nominal 80% because the waiting time is discrete.

Common mistake. Treating this interval as if its coverage had to equal exactly 0.80 ignores the jumps in the geometric distribution. The inversion guarantees coverage of at least 0.80; here direct enumeration gives the larger value \(0.9141\).

Reading the Bounds Correctly

A confidence level describes the long-run performance of the procedure, not a probability assigned to the fixed parameter after observing \(T\). For example, a 95% upper confidence bound is constructed so that, over repeated waiting times under the model, it is at least the true \(p\) with probability no less than 0.95.

It is also important to match each tail to the appropriate event. A lower bound uses \(P_p(T\leq t)=1-(1-p)^t\); an upper bound uses \(P_p(T\geq t)=(1-p)^{t-1}\). The different exponents are not interchangeable. The first event includes success by trial \(t\); the second requires failure on only the first \(t-1\) trials.

BoundEvidence against a candidate valueInverted endpoint
Lower boundAn unusually small waiting time, \(T\leq t\)\(1-(1-\alpha_L)^{1/t}\)
Upper boundAn unusually large waiting time, \(T\geq t\)\(1-\alpha_U^{1/(t-1)}\), for \(t\geq2\)
1
State the waiting-time convention.
Confirm that \(T\) counts the successful trial, so its support begins at 1.
2
Choose the confidence level and tail allocation.
For a two-sided interval, specify \(\alpha_L+\alpha_U=\alpha\); for equal tails, use \(\alpha/2\) in each tail.
3
Invert the matching probability.
Use the cumulative probability for the lower endpoint and the survival probability for the upper endpoint.
4
Check the result.
Substitute each endpoint back into its defining probability and, when requested, enumerate which integer waiting times include the true value.

These bounds are useful when the observation is a single waiting time and the constant-probability, independent-trials model is defensible. If attempts are dependent, the success probability changes between attempts, or the waiting-time convention differs, the geometric formulas may not apply. For a procedure satisfying the stated model, inversion supplies exact finite-sample bounds and a direct way to check their coverage.

Check Your Understanding

For each problem, use the convention that \(T\) includes the trial on which the first success occurs. Round probability answers to four decimal places where needed.

  1. A hypothetical process has independent trials with unknown constant success probability \(p\), and the first success occurs at \(T=3\). Find the 95% one-sided lower confidence bound for \(p\). (Answer: \(0.0170\))
  2. For a hypothetical independent-trial process, the first success occurs at \(T=5\). Find the 90% one-sided upper confidence bound for \(p\). (Answer: \(0.4377\))
  3. A hypothetical process has \(T=3\). Construct the equal-tailed 90% confidence interval for \(p\), using a 5% error allocation in each tail. (Answer: \([0.0170,\,0.7764]\))
  4. A geometric waiting time has true success probability \(p=0.25\). What is the actual coverage of the 90% one-sided upper-bound procedure based on \(p_U(t)=1-0.10^{1/(t-1)}\) for \(t\geq2\), with \(p_U(1)=1\)? (Answer: \(P(T\leq9)=1-0.75^9=0.9249\))
  5. For a 90% one-sided lower-bound procedure, the true success probability is \(p=0.04\). Find the actual coverage, identifying the waiting times for which the lower bound does not exceed \(p\). (Answer: The bound includes \(p\) for \(T\geq3\), so coverage is \(P(T\geq3)=0.96^2=0.9216\))
Clinical Biostats