Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Beta-Geometric Updating for Waiting-Time Frequencies

Exam ASTAM · Bayesian Credibility Models · Tutorial 570 of 979

Beta-Geometric Updating for Waiting-Time Frequencies

Use observed waiting times to update a beta prior, then calculate posterior estimates and predictive quantities for future waits.

Advanced 10 min read

What You'll Learn

  • Specify the geometric waiting-time convention and its connection to Bernoulli trials
  • Update beta prior parameters using observed successes and failures
  • Calculate posterior estimates of the success probability
  • Find predictive probabilities for exact and bounded future waiting times
  • Compute the predictive mean waiting time and identify when it is infinite
  • Avoid confusing observed waiting times with counts of failures

Why Waiting Times Update a Frequency Model

A sequence of waiting times can contain information about an underlying success probability. For example, a hypothetical insurer might record how many policy-years pass before a particular type of claim occurs. If the claim probability is unknown but believed to be similar across observation periods, a beta prior provides a convenient way to update that probability from the observed waits.

The key is to translate each waiting time into its number of successes and failures. Under the convention used here, a waiting time includes the trial on which the success occurs. A wait of four therefore represents three failures followed by one success—not four failures. Once this is recorded correctly, beta-geometric updating follows directly from the beta-binomial conjugate structure.

Definition: Let \(p\) be the probability of success on each trial. Conditional on \(p\), the waiting time \(T\) to the first success has a geometric distribution on \(1,2,3,\ldots\): $$ P(T=t\mid p)=(1-p)^{t-1}p,\qquad t=1,2,\ldots $$ The trials are assumed independent with the same success probability \(p\). If \(p\) has a beta prior, \(p\sim\operatorname{Beta}(\alpha,\beta)\), its density is proportional to \(p^{\alpha-1}(1-p)^{\beta-1}\) for \(0<p<1\), where \(\alpha,\beta>0\).

Updating the Beta Prior

Suppose \(n\) independent waiting periods are observed, with waiting times \(t_1,\ldots,t_n\). Each period ends in one success. Across all periods, the number of successes is \(n\), while the total number of failures before those successes is \(F=\sum_{j=1}^{n}(t_j-1)=\sum_{j=1}^{n}t_j-n\). Conditional independence gives the likelihood, as a function of \(p\):

$$ L(p)\propto p^n(1-p)^F. $$

Multiplying this likelihood by the beta prior density gives a posterior density proportional to \(p^{\alpha+n-1}(1-p)^{\beta+F-1}\). This is the kernel of a beta distribution, so the updated parameters are the prior parameters plus the corresponding observed successes and failures.

Theorem: Under the geometric model above and a prior \(p\sim\operatorname{Beta}(\alpha,\beta)\), the posterior distribution after observing \(t_1,\ldots,t_n\) is $$ p\mid t_1,\ldots,t_n\sim\operatorname{Beta}\left(\alpha+n,\ \beta+\sum_{j=1}^{n}(t_j-1)\right). $$ The posterior mean estimate of the success probability is \((\alpha+n)/(\alpha+\beta+n+F)\).

This update is justified by the likelihood kernel: the data contribute one factor of \(p\) for each completed success and one factor of \(1-p\) for each preceding failure. The time at which a success occurs matters only through those two totals. The order of the waiting periods does not change the posterior parameters.

Worked Example: Updating from Two Waiting Periods

A hypothetical model assigns the success probability the prior \(p\sim\operatorname{Beta}(2,3)\). Two independent waiting periods are observed: \(T_1=2\) and \(T_2=4\). Find the posterior distribution, its posterior mean for \(p\), and the probability that the next waiting time is at most two trials.

Method and counts. There are two completed waiting periods, so there are \(n=2\) successes. The first wait contains \(2-1=1\) failure, and the second contains \(4-1=3\) failures. Thus \(F=1+3=4\).

Posterior. Add these counts to the beta parameters: $$ p\mid T_1,T_2\sim\operatorname{Beta}(2+2,3+4)=\operatorname{Beta}(4,7). $$ The posterior mean is \(4/(4+7)=4/11\), or \(0.3636\) to four decimal places.

Predictive probability. For a future wait \(T_{\mathrm{new}}\), the event \(T_{\mathrm{new}}\leq 2\) is the complement of two consecutive failures. Given \(p\), that failure probability is \((1-p)^2\). Averaging over the posterior gives $$ P(T_{\mathrm{new}}\leq 2\mid T_1,T_2) =1-E[(1-p)^2\mid T_1,T_2] =1-\frac{7\cdot 8}{11\cdot 12} =\frac{19}{33} =0.5758. $$ The fraction uses the beta second moment of \(1-p\), equivalently \(B(4,9)/B(4,7)\).

Check and common mistake. The two waits contain \(2+4=6\) trials in total, and \(6-2=4\) failures, which agrees with the period-by-period count. Treating all six trials as failures would incorrectly produce \(\operatorname{Beta}(4,9)\), because it would omit the two successful terminal trials from the failure count.

Predicting a Future Waiting Time

After observing data, write the posterior as \(p\mid\text{data}\sim\operatorname{Beta}(a,b)\), where \(a=\alpha+n\) and \(b=\beta+F\). A future waiting time is not generally geometric with success probability equal to the posterior mean. Instead, its probability is obtained by averaging the conditional geometric probability over the full posterior distribution.

Predictive distribution: If \(p\mid\text{data}\sim\operatorname{Beta}(a,b)\), the posterior predictive probability of waiting exactly \(t\) trials is $$ P(T_{\mathrm{new}}=t\mid\text{data}) =E[(1-p)^{t-1}p\mid\text{data}] =\frac{B(a+1,b+t-1)}{B(a,b)},\qquad t=1,2,\ldots, $$ where \(B(\cdot,\cdot)\) is the beta function. The probability of waiting more than \(k\) trials is $$ P(T_{\mathrm{new}}>k\mid\text{data}) =E[(1-p)^k\mid\text{data}] =\frac{B(a,b+k)}{B(a,b)},\qquad k=0,1,2,\ldots. $$

For calculations with integer \(k\), the tail probability can also be written as \(\prod_{j=0}^{k-1}(b+j)/(a+b+j)\), with the empty product equal to one when \(k=0\). The probability of a wait of at most \(k\) trials is one minus this tail probability. These formulas average over uncertainty in \(p\); they are not obtained by simply substituting the posterior mean of \(p\) into a geometric formula.

Worked Example: Predicting an Exact Waiting Time

A hypothetical program has prior success probability \(p\sim\operatorname{Beta}(3,2)\). It records three independent waiting periods of 1, 3, and 2 trials. Find the posterior and the probability that the next waiting period lasts exactly three trials.

Method and update. The three periods give \(n=3\) successes. Their failures are \(1-1=0\), \(3-1=2\), and \(2-1=1\), for \(F=3\). Therefore, $$ p\mid\text{data}\sim\operatorname{Beta}(3+3,2+3)=\operatorname{Beta}(6,5). $$ The posterior mean is \(6/11=0.5455\) to four decimal places.

Predictive probability. A wait of exactly three means two failures followed by a success. Using the posterior predictive formula, $$ P(T_{\mathrm{new}}=3\mid\text{data}) =E[p(1-p)^2\mid\text{data}] =\frac{6\cdot 5\cdot 6}{11\cdot12\cdot13} =\frac{15}{143} =0.1049. $$ The numerator factors are \(a=6\), \(b=5\), and \(b+1=6\); the denominator factors are \(a+b=11\), \(a+b+1=12\), and \(a+b+2=13\).

Check and common mistake. The predictive probabilities for waits of one, two, and three trials are respectively \(6/11\), \(30/132\), and \(180/1716\); the third is \(15/143\). For the exact-three probability, using only \((1-E[p])^2E[p]\) would incorrectly treat \(p\) as fixed instead of averaging \(p(1-p)^2\) under the posterior.

Predictive Mean Waiting Time

For a fixed \(p\), a geometric waiting time under this convention has mean \(E[T\mid p]=1/p\). Consequently, the predictive mean averages \(1/p\), not \(p\), over the posterior. If \(p\mid\text{data}\sim\operatorname{Beta}(a,b)\), the result is finite only when \(a>1\).

$$ E[T_{\mathrm{new}}\mid\text{data}] =E\!\left[\frac{1}{p}\middle|\text{data}\right] =\frac{B(a-1,b)}{B(a,b)} =\frac{a+b-1}{a-1},\qquad a>1. $$

The equality follows by integrating the reciprocal against the beta density. In detail, the integral is \(B(a-1,b)/B(a,b)\); using \(B(a,b)=\Gamma(a)\Gamma(b)/\Gamma(a+b)\) and \(\Gamma(x+1)=x\Gamma(x)\) reduces that ratio to \((a+b-1)/(a-1)\). If \(a\leq 1\), the integral of \(1/p\) near \(p=0\) diverges, so the predictive mean waiting time is infinite. This does not prevent calculation of individual predictive probabilities.

Worked Example: Finding a Predictive Mean and Tail Probability

A hypothetical waiting-time model starts with \(p\sim\operatorname{Beta}(2,1)\). Three observed waits are 2, 2, and 3 trials. Find the posterior mean of \(p\), the predictive mean of the next wait, and the probability that the next wait exceeds two trials.

Method and update. The data contain \(n=3\) successes and \(F=(2-1)+(2-1)+(3-1)=1+1+2=4\) failures. Thus the posterior is $$ p\mid\text{data}\sim\operatorname{Beta}(2+3,1+4)=\operatorname{Beta}(5,5). $$ Its mean is \(5/(5+5)=0.5\).

Predictive mean. Here \(a=5>1\), so the mean is finite: $$ E[T_{\mathrm{new}}\mid\text{data}] =\frac{5+5-1}{5-1} =\frac{9}{4} =2.25\text{ trials}. $$ This is the average wait under the posterior predictive distribution.

Tail probability. A wait exceeding two means the first two trials are failures. Therefore, $$ P(T_{\mathrm{new}}>2\mid\text{data}) =E[(1-p)^2\mid\text{data}] =\frac{5\cdot6}{10\cdot11} =\frac{3}{11} =0.2727. $$

Check and common mistake. The reciprocal of the posterior mean success probability is \(1/0.5=2\), not the predictive mean. The correct predictive mean is \(E[1/p\mid\text{data}]=2.25\), because averaging a reciprocal is not the same as taking the reciprocal of an average.

Interpretation and Exam Traps

The beta-geometric model separates two sources of randomness: trial outcomes vary conditional on \(p\), and \(p\) itself is uncertain before and after observing data. Integrating over that uncertainty changes the predictive distribution. In particular, it can produce a longer right tail than a geometric model that fixes \(p\) at its posterior mean.

  • Count terminal successes correctly. A recorded wait of \(t\) contributes \(t-1\) failures and one success.
  • State the geometric convention. These formulas use support \(1,2,\ldots\), with the success trial included in the wait. A zero-based convention would require different indexing.
  • Average the desired quantity. The predictive probability of an event is the posterior expectation of its conditional probability. Do not replace the random \(p\) with its posterior mean unless the calculation specifically asks for that plug-in approximation.
  • Check the condition for a predictive mean. A proper beta posterior can still imply an infinite mean waiting time when its first shape parameter is at most one.

This conjugate update is useful when repeated waiting periods share a common but uncertain frequency. It is aligned with the SOA Exam ASTAM (Advanced Short-Term Actuarial Mathematics) syllabus, especially where a problem asks for both a posterior estimate and a prediction for a future observation.

Check Your Understanding

For each problem, use the waiting-time convention that the success trial is included. Give probabilities to four decimal places where needed.

  1. A prior is \(p\sim\operatorname{Beta}(1,2)\), and observed waits are 3 and 2 trials. Find the posterior distribution and posterior mean of \(p\). (Answer: \(\operatorname{Beta}(3,5)\); posterior mean \(3/8=0.3750\))
  2. A prior is \(p\sim\operatorname{Beta}(2,3)\), and observed waits are 1 and 4 trials. Find the predictive probability that the next wait is at most two trials. (Answer: \(34/55=0.6182\))
  3. A prior is \(p\sim\operatorname{Beta}(3,2)\), and two observed waits are 2 and 2 trials. Find the posterior predictive probability that the next wait is exactly two trials. (Answer: \(2/9=0.2222\))
  4. A prior is \(p\sim\operatorname{Beta}(2,2)\), and observed waits are 1, 2, 3, and 4 trials. Find the posterior and the predictive mean waiting time. (Answer: \(\operatorname{Beta}(6,8)\); \(13/5=2.6\) trials)
  5. A prior is \(p\sim\operatorname{Beta}(1,2)\), and observed waits are 2 and 3 trials. Find the posterior predictive probability that the next wait exceeds three trials. (Answer: \(7/24=0.2917\))
Clinical Biostats