Chapter 4 of 6 · 11 min

How long until it happens: 1 ÷ p

If something happens with probability p on each try, you expect to wait 1/p tries. The wait does not shrink while you wait, several successes take several waits, and collecting every type takes far longer than the count suggests.

By the end of this chapter you can
  • Compute the expected wait for a first success and the chance you are still waiting after k tries
  • Explain memorylessness: why a long silence does not make the event 'due'
  • Add waits for the m-th success
  • Sum the coupon-collector stages and see why the last one dominates
1

The intuition

A signal fires on any given day with probability 10%. How long until it fires? Ten days on average, 1 ÷ p, and that number has a property people find hard to accept: after ten quiet days the expected remaining wait is still ten days. Independent trials carry no memory. 'It is overdue' is a statement about you, not about the process.

The idea chains. The wait for the third firing is three waits of ten days, because expectations add. And the wait to see every one of N regime types is a sum of waits whose success probabilities fall as the collection fills: the first new type arrives on day one, the last needs a 1-in-N shot every day. With six types the whole collection takes about 14.7 days, and the last type alone takes six of them.

The key idea

E[trials to first success] = 1 ÷ p. P(still waiting after k) = (1 − p)ᵏ; P(first success on trial k) = (1 − p)ᵏ⁻¹ p. E[trials to the m-th success] = m ÷ p. Coupon collector with N types: N × (1 + 1/2 + … + 1/N). From P(silent for k) = x: p = 1 − x^(1/k).

2

Why it works

  • The conventions here: independent trials with a fixed success probability p. The count of trials up to and including the first success is geometric; up to the m-th success, negative binomial. All expectations are exact.
  • Why 1 ÷ p. Over many trials a share p of them are successes, so successes are 1/p trials apart on average. The distribution has a long right tail: the median wait is shorter than the mean, because a few very long waits pull the mean up.
  • Memorylessness. P(wait > k + j | wait > k) = P(wait > j). The past failures are already spent; the future looks exactly as it did on day one.
  • Several successes. Each success is a fresh geometric wait and expectations add, so m ÷ p. Independence is not even needed for the addition.
  • Coupon collector. With j types already seen, the next new one arrives with probability (N − j) ÷ N, so that stage takes N ÷ (N − j) days. Summing from j = 0 to N − 1 gives N × H_N, and the final stage, N days, is the biggest single term.
  • Run it backwards. A silence of k days has probability (1 − p)ᵏ. Given that probability, the k-th root recovers the daily miss rate, and one minus it is p.
A signal that fires on 10% of days
Expected wait: 1 ÷ 10%10 days
P(no fire in 5 days): 0.9⁵59.05%
P(first fire on day 5): 0.9⁴ × 0.16.56%
Expected days to 3 firings: 3 ÷ 10%30 days
Coupon collector, 6 regimes: 6 × (1 + 1/2 + … + 1/6)14.7 days
Of which the last regime alone: 6 ÷ 16 days

After 5 silent days the expected further wait is still 10 days. The median wait is 7 days, the first k with 0.9ᵏ ≤ ½, below the mean of 10.

3

The formulas

E[trials to first success] = 1 ÷ p

The geometric mean.

P(still waiting after k) = (1 − p)ᵏ; P(first success on k) = (1 − p)ᵏ⁻¹ p

k failures; or k − 1 failures then a success.

E[trials to m-th success] = m ÷ p

m waits of 1 ÷ p; expectations add.

Coupon collector = N × (1 + 1/2 + … + 1/N)

One stage per new type, each a geometric wait.

From P(silent for k) = x: p = 1 − x^(1/k)

The daily rate from the chance of a silence.

4

Worked example

One over the daily probability. The follow-up asks whether the median wait is shorter or longer than the mean.

Drawing the numbers…
5

See it move

Same signal. Change how often it fires, how many days you have waited, how many firings you need, and how many regime types there are to collect.

Drawing the numbers…
Try this
  • Raise the daily probability. The expected wait falls, the chance of still waiting falls, and the wait for several firings falls with it.
  • Wait more days. The chance of still waiting falls, and so does the chance of the first firing landing exactly on that day; the expected further wait, not shown because it never moves, stays at 1 ÷ p.
  • Add regime types. The days to collect them all rise, and so do the days the last type alone takes, one for each type.
6

Run it backwards

The chance of a silence of a given length is known. What is the daily probability, and the expected wait?

Drawing the numbers…

(1 − p)ᵏ is the silence probability. Take the k-th root for the daily miss rate; p is one minus that; the expected wait is 1 ÷ p.

It is the same inverse as the coin's bias in the last chapter: a run of misses, solved for the rate.

7

Traps

Thinking a long silence makes the event due.
Independent trials have no memory. The expected further wait is 1 ÷ p, whatever has happened.
Reporting the mean wait as if it were typical.
The geometric distribution has a long right tail; the median is shorter than the mean.
Treating 'first success on day k' and 'still waiting after k' as the same.
(1 − p)ᵏ⁻¹p against (1 − p)ᵏ. One is a point, the other a tail.
Estimating the coupon collector as N days.
It is N × H_N. The first types arrive fast; the last one alone takes N days on average.
Concluding a signal is broken because it has been quiet.
That is a claim about the parameters, not the next draw. Compute how likely the silence was under the stated p before changing your model.
8

Say it in the interview

The interviewer asks

A signal fires on 10% of days and has been quiet for two weeks. When will it fire?

Say yours out loud first, then compare.
9

Check yourself

5 fresh questions, with new numbers. Answer each one correctly to finish the chapter. Get one wrong and you will see the full working, then you can try it again with new numbers.

Answers within 1% are marked right. Type the number; $, %, x and M are fine. First tries count toward Learned: the topic is Learned once every chapter is done and 75% of first tries were right.

0 of 5
Drawing your questions…
Remember
  • Expected wait = 1 ÷ p, and it does not shrink while you wait.
  • Still waiting after k: (1 − p)ᵏ. First success on k: (1 − p)ᵏ⁻¹p.
  • m successes take m ÷ p; every type takes N × H_N, and the last type takes N.
  • A silence of k days has probability (1 − p)ᵏ; take the k-th root to get the rate back.