November 14th, 2008, 11:53 am
QuoteOriginally posted by: gbhalHi all, A and B toss, A goes first, if heads, he gets to continue, if tails, B gets a chance, and so on.....Find the prob that A accumulates x heads before B gets to y heads. Fair coin!My thanks to Curves for reviving this problem.Here's another, simpler and cleaner, recursive relation:Let p(x,y)=P{A=x before B=y} denote the probability that A gets x heads before B gets y heads given that A gets to toss first.Let R denote the result of the first toss made by A. Either R=H with probability 1/2 or R=T with probability 1/2.We will now condition p(x,y) on the first toss R:p(x,y) = (1/2)*P{A=x before B=y | R=H} + (1/2)*P{A=x before B=y | R=T} (***1***)Clearly P{A=x before B=y | R=H} = P{A=(x-1) before B=y} = p(x-1,y). (***2***)It is obvious that if R=T, then B gets to toss. At this point -- as B gets to toss the coin, hence being in the same position as A was just a moment ago -- what is the probability that A gets x heads before B gets y heads? Answer: it is the probability that B does not get y heads before A gets x heads. In other words, the answer is: 1 - P{B=y before A=x}.So, we have P{A=x before B=y | R=T} = 1 - P{B=y before A=x} = 1 - p(y,x). (***3***)Combining (***1***), (***2***), (***3***), we get:p(x,y) = (1/2)*p(x-1,y) + (1/2)*(1 - p(y,x)) (***4***)with initial conditions p(0,y)=1 fro all y in {1,2,3,....} and p(x,0)=0 for all x in {0,1,2,....}.Note that the recursive relation (***4***) agrees with Zedr0n's finding: "p(x,1) = (2/3)^x, p(1,x) = 1 - 0.5(2/3)^x" for x>0.
Last edited by
quantyst on November 13th, 2008, 11:00 pm, edited 1 time in total.