Skip to content

Expected head fraction when stopping once ahead

Question

You toss a fair coin as many times as you like and score the fraction of tosses that came up heads, i.e. the ratio a:1a:1 of heads to total tosses. Suppose you stop the first time the number of heads exceeds the number of tails. What is the expected value of aa, to three decimal places?

Short answer

π/4≈0.785\pi/4\approx0.785. You stop at toss 2n+12n+1 with n+1n+1 heads, which happens with probability Cn/22n+1C_n/2^{2n+1} (CnC_n Catalan). The expected ratio is ∑nCn22n+1⋅n+12n+1=12∑n(2nn)4−n2n+1\sum_n \tfrac{C_n}{2^{2n+1}}\cdot\tfrac{n+1}{2n+1}=\tfrac12\sum_n\binom{2n}{n}\tfrac{4^{-n}}{2n+1}, which is 12arcsin⁡(1)=π4\tfrac12\arcsin(1)=\tfrac{\pi}{4}.

Adapted from QuantQuestions.io; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question

Start with a free lesson: Expectation, Variance and Covariance is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.

Read it free