Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

You and I each have 14 dollars. I flip a fair coin repeatedly; if it comes up heads I pay you a dollar, but if it lands tails you pay me a dollar. On average, how many times will I flip the coin before one of us runs out of money?

I know that the chance of each of us winning is equal (1/2), but I have no idea what the average number of flips should be. I think it's 28 but it's just a guess.

share|improve this question
1  
14^2=196. $ $ $ $ –  Did Dec 2 '12 at 22:54
2  
hi can you explain how to got that answer please? –  user45220 Dec 2 '12 at 22:59

1 Answer 1

The idea is to compute the mean number of flips $m_k$ before the game ends if your fortune at the beginning of the game is $k$ and your opponent's fortune is $28-k$, for every integer $k$ between $0$ and $28$.

Then $m_0=m_{28}=0$ and, for every $1\leqslant k\leqslant27$, considering the result of the first flip yields the identity $m_k=1+\frac12(m_{k-1}+m_{k+1})$. This linear system is solved by $m_k=k\cdot(28-k)$.

The average number of flips you are looking for is $m_{14}=14^2=196$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.