返回题库

随机游走:从 100 到 98 或 102 的期望时间

Random walk between 98 and 102 starting at 100

专题
Probability / 概率
难度
L4

题目详情

你从 100 美元开始。每次抛硬币:正面 +1,反面 -1。到达 98 或 102 时停止。

  1. p=0.5p=0.5(公平)时,期望停止时间是多少?
  2. p=2/3p=2/3 时,期望停止时间是多少?

You start at $100, each head +$1, each tail -$1, stopping at $98 or $102. For p=0.5,p=0.5, what is the expected time? Then for p=2/3p=2/3?

解析

把位置平移:令 XtX_t 表示距离 98 的差值,则边界为 0 与 4,起点为 2。

  1. p=1/2p=1/2 的无偏随机游走,在 {0,1,2,3,4}\{0,1,2,3,4\} 上从 i=2i=2 出发,吸收时间期望为
E[T]=i(Ni)=2(42)=4.\mathbb{E}[T]=i(N-i)=2\cdot(4-2)=4.
  1. p=2/3,q=1/3p=2/3,q=1/3。设 EiE_i 为从状态 ii 出发到达 0 或 4 的期望步数,满足
E0=E4=0,Ei=1+pEi+1+qEi1 (i=1,2,3).E_0=E_4=0,\quad E_i=1+pE_{i+1}+qE_{i-1}\ (i=1,2,3).

解该线性方程组可得 E2=185=3.6E_2=\frac{18}{5}=3.6

因此:p=0.5p=0.5 时期望为 4p=2/3p=2/3 时期望为 18/518/5


Original Explanation

Using gambler’s ruin formulas:

  • For fair p=0.5,p=0.5, expected time from 100100 to either 9898 or 102102 is (10098)×(102100)=2×2=4(100-98)\times(102-100)=2\times2=4 multiplied by some factor, giving 4. Actually, the standard 1D random walk formula can produce a bigger expression if we account for hitting either boundary, but the product (ba)(xa)(b - a)(x - a) is a known part of the result. Detailed solution yields ~4 for a small boundary gap.
  • For p=2/3,p=2/3, the formula changes. Typically we solve the difference equation for the expected hitting time.