Concept 1 of 81 min
Patterns and waiting times
A pattern that overlaps itself
| Pattern | HTH |
|---|---|
| Overlaps at lengths | 1 and 3 |
- Wait = 23 + 21 = 10 flips
A miss can leave part of HTH in place, but completing it costs extra waiting.
A pattern that does not
| Pattern | HHT |
|---|---|
| Overlaps at lengths | 3 only |
- Wait = 23 = 8 flips
Same length, but HHT comes 2 flips sooner than HTH on average.
So self-overlapping patterns take longer. The number of tries until a first success has variance (1 − p) ÷ p².
Patterns of the same length also do not come first equally often (Penney's game): once 2 heads appear, heads-heads-tails is certain to come before heads-tails-heads. Waiting for 2 consecutive matches, HH or TT, needs one flip to start and then waits for a match.
Without replacement, the non-target cards spread evenly over the gaps around the targets.
- Giving every 3-flip pattern the same wait.
- Assuming patterns of the same length are equally likely to come first.
- Using the with-replacement answer for cards that are not put back.
Why does it take longer on average to see heads-tails-heads than heads-heads-tails?
A complete answer covers
- Heads-tails-heads overlaps with itself: it starts and ends with heads.
- The expected wait adds 2k for each overlap: 8 + 2 = 10 against 8.
- Set up the states and solve to check it.
- Same-length patterns also differ in which comes first, as in Penney's game.
Also in our technical interviews, on camera, with a score.
Concept 2 of 81 min
Random walks, ruin and Markov chains
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 3 of 81 min
Poisson processes and exponential clocks
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 4 of 81 min
Conditional means and the faces trick
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 5 of 81 min
Covariance and correlation
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 6 of 81 min
Random draws: e, records, derangements and stopping
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 7 of 81 min
Symmetry and geometric puzzles
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inConcept 8 of 81 min
AdvancedHow long a fair game lasts: distance squared
The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.
See the plansSign inRecap
- A pattern that overlaps with itself takes longer to appear; same-length patterns do not have the same odds of coming first.
- Gambler's ruin: P(reach N from k) = (1 − rk) ÷ (1 − rN) with r = q ÷ p; a symmetric walk reaches every level for sure, in infinite expected time.
- Poisson and exponential clocks are memoryless; the first of several rings at the sum of their rates.
- Condition by restricting the outcomes, then use symmetry; count faces, not cards.
- e appears everywhere: draws until a sum exceeds 1, derangements, the secretary problem; records grow like the harmonic sum.
25 questions on Probability, advanced
Timed, like the real one, drawn from a bank of 34. Every answer explained.