Suppose you have a coin in which the probability of flipping a heads is \(p\), where \(p\ge0.5\) . What is the expected number of flips it will take for the number of heads to equal the number of tails, assuming the first flip is a tails?
Solution
将其转换为 \(random\ walk\), 其中向左走 \(+1\), 向右走 \(-1\), 那么期望的移动长度:
\[E[X] = p\cdot 1+(1-p)\cdot (-1)=2p-1 \]那么问题转换为回到原点需要的期望步数是多少。由于一开始为 \(tail\), 所以起始为 \(-1\) 的位置,即:
\[E[N]\cdot (2p-1)=1\Rightarrow E[N]=\frac{1}{2p-1} \] 标签:2p,cdot,toss,number,61,heads,problem,Coin From: https://www.cnblogs.com/xinyu04/p/16637467.html