返回题库

掷 n 面骰:和首次成为 n 的倍数的期望

What is the expected number of rolls until the sum is a multiple of nn for the first time?

专题
Probability / 概率
难度
L4

题目详情

You roll a fair nn - sided die repeatedly and sum the outcomes. What is the expected number of rolls until the sum is a multiple of nn for the first time?

解析

NN 为首次使得 SN0(modn)S_N\equiv 0\pmod n 的掷骰次数。

若当前 Sk≢0(modn)S_k\not\equiv 0\pmod n,则存在唯一的点数能在下一次把余数补到 0,因此

P(N>k+1N>k)=11n.\mathbb{P}(N>k+1\mid N>k)=1-\frac{1}{n}.

P(N>1)=11n\mathbb{P}(N>1)=1-\tfrac1n,从而

P(N>k)=(11n)k.\mathbb{P}(N>k)=\left(1-\frac{1}{n}\right)^k.

利用尾和公式:

E[N]=k=0P(N>k)=k=0(11n)k=n.\mathbb{E}[N]=\sum_{k=0}^{\infty}\mathbb{P}(N>k)=\sum_{k=0}^{\infty}\left(1-\frac{1}{n}\right)^k=\boxed{n}.