View Single Post
  #4  
Old 10-07-2007, 08:19 PM
pzhon pzhon is offline
Senior Member
 
Join Date: Mar 2004
Posts: 4,515
Default Re: coin flip probability problem

I used a transfer matrix.

State 0: No streak of 10 heads yet, and the current streak is 0.
...
State 9: No streak of 10 heads yet, and the current streak is 9.
State 10: There has been a streak of length 10 or more.

We can summarize the results after n tosses by a probability distribution on these 11 states, which is supposed to be returned by streak[n].

For all n,

streak[n]
= transmat . streak[n-1]
= transmat^n . {1,0,0,0,0,0,0,0,0,0,0}

where transmat is a transfer matrix which says the probability of moving from one state to the next.

m1 said that if you have a streak of length n, there is a 1/2 probability that it gets longer by 1.
m2 said that if you have a streak of length less than 10, there is a 1/2 chance that it ends, and so you return to state 0.
m3 said that if you are in state 10, you stay in state 10 with probability 1.
The transfer matrix was built from these.
Reply With Quote