返回题库

连续 n 个正面的期望抛掷次数

Coin Sequence

专题
Probability / 概率
难度
L4

题目详情

抛一枚公平硬币,直到出现连续 nn 个正面(heads)。问:期望抛掷次数是多少?

What is the expected number of tosses of a fair coin to get nn consecutive heads?

解析

一个经典结果(可用马尔可夫链或停时鞅证明)是

E[τn]=2n+12.\mathbb{E}[\tau_n]=2^{n+1}-2.

其中 τn\tau_n 表示首次出现 nn 连 H 的抛掷次数。


Original Explanation

Let E[f(n)]E[f(n)] be the expectation. A known result (via Markov chain or a martingale stopping argument) is: E[f(n)]=2n+12.E[f(n)] = 2^{n+1} - 2.

Martingale Sketch (brief)

  • Imagine a sequence of “gamblers” each betting on hitting nn heads in a row.
  • Once a gambler achieves nn heads in a row, they win 2n2^n dollars and the game stops.
  • An analysis of the stopping-time martingale shows the stopping time ii has expectation 2n+122^{n+1}-2.

Thus, on average, 2n+122^{n+1} - 2 tosses are needed to see nn consecutive heads.