Probability theory
Long-run behaviour, random walks, and clever expectations.
Pen and paper is fine · no calculator needed why?
Opens at level 59. You're level 1. You can read and practice here now.
the idea
Each problem here has a short exact answer. The tools are balance, fairness, symmetry and adding up waits.
Symmetry: n independent uniform random points dropped on the line from 0 to 1 cut it into n + 1 gaps of equal average size. So the largest point averages n/(n + 1), and the smallest 1/(n + 1).
techniques
Balance the flows
- Let p be the long-run share of time in A, so 1 − p is the share in B.
- Balance: p × (chance A to B) equals (1 − p) × (chance B to A). Solve for p.
worked example
A process has states A and B. Each step it moves A → B with probability 0.2 and B → A with probability 0.6, and otherwise stays put. What long-run fraction of the time is it in A? Give an exact fraction.
- 0.2p equals 0.6 × (1 − p), so 0.8p equals 0.6.
- p = 0.6 ÷ 0.8 = 3/4.
Answer: 3/4
A fair game keeps the average
- Fair game: you end with the target N or nothing, so N × (chance of reaching N) equals your start.
- Uneven odds, win chance p, loss chance q, start i: the chance is ((q/p)ⁱ − 1) ÷ ((q/p)ᴺ − 1).
worked example
You bet $1 at a time on fair coin flips, starting with $4, and stop at $10 or at $0. What is the probability you reach $10? Give an exact fraction.
- Your expected money stays $4, so 10 × P equals 4.
- P = 4/10 = 2/5.
Answer: 2/5
Add up the waits
- With k types missing, each try finds a new one with chance k/n: n/k tries on average.
- Add the waits from the number missing now down to 1, then round.
worked example
A spinner has 4 equal sections. How many spins do you expect to need before it has landed on every section at least once? Round to 1 decimal place.
- Waits with 4, 3, 2, then 1 missing: 4/4 + 4/3 + 4/2 + 4/1.
- That is 25/3 ≈ 8.33, which rounds to 8.3.
Answer: 8.3
watch out for
- Swapping the two chances. The share of time in A has the chance of moving into A on top.
- Assuming a fair game gives even odds of reaching the target. From $3 with a $10 target, it is 3/10.
- Giving 1/2, the average of one draw, for the largest of several draws.
practice
Long-run share
worked example
A process has two states, A and B. Each step, from A it moves to B with probability 0.7 (otherwise it stays in A), and from B it moves to A with probability 0.4 (otherwise it stays in B). In the long run, what fraction of the time is it in B? Give an exact fraction.
Answer: 7/11
- Let p be the long-run share of time in B. In balance, the flow B → A equals the flow A → B: 0.4p = 0.7(1 − p).
- So (0.4 + 0.7)p = 0.7, and p = 0.7 ÷ 1.1 = 7/11.
Gambler’s ruin
worked example
You bet $1 at a time on fair coin flips, starting with $1. You stop when you reach $15 or go broke. What is the probability you reach $15? Give an exact fraction.
Answer: 1/15
- In a fair game your expected money stays $1.
- If p is the chance of reaching $15: 15p + 0 × (1 − p) = 1, so p = 1/15.
Expected maximum
worked example
You draw 8 independent random numbers uniformly between 0 and 1. What is the expected value of the smallest? Give an exact fraction.
Answer: 1/9
- The 8 draws split [0, 1] into 9 gaps of equal expected size, 1/9.
- The smallest value is the first gap: 1/9.
Collect them all
worked example
Each cereal box holds one of 2 different toys, all equally likely. How many boxes do you expect to open before you have all 2 toys? Round to 1 decimal place.
Answer: 3
- When k of the 2 toys have appeared, a new one comes with chance (2 − k)/2, so it takes 2/(2 − k) tries on average.
- Total: 2 × (1 + 1/2) = 2 × 3/2 = 3.