ping0222
ping0222
  • Threads: 1
  • Posts: 1
Joined: Sep 14, 2010
September 14th, 2010 at 3:53:55 AM permalink
Consider the following game: two players A and B repeatedly toss a fair coin.
A player wins if he tosses heads and his opponent tossed heads just before.
Assume player A starts. What is the probability that player B will win the game?
(do i condition on two consecutive coin tosses??)
weaselman
weaselman
  • Threads: 20
  • Posts: 2349
Joined: Jul 11, 2010
September 14th, 2010 at 5:15:23 AM permalink
This is a recursive problem, similar to Wizard's "infinite imprisonment" question of recently. Let's say, H is the probability of heads, and T is probability of tails (they are the same, but it helps to distinguish between the two events for now), and P is the probability that B wins:

P = HH + HT*P + TT*P + THTT*P + THTHTT*P + THTHTHTT*P + ...

If the first two tosses are heads, B wins. If A throws heads or tails, and B throws tails, the game is reset - A starts again, and B has the same probability P to win.
If A throws tails and B throws heads, A has to throw tails for the game to continue. If B throws tails now, game is reset (P), otherwise, A has to throw tails again etc ... Each new winning sequence gets one more TH in the middle.

Putting this in numbers:
P = 1/4 + P/4 + P/4 + P/16 + P/64 + P/256 + ... = 1/4 + P/4 + P/4*sum(1/4^n) = 1/4 + P/4 + P/4 * 4/3 = 1/4 + P/4 + P/3
P = 1/4 + 7P/12

P = 12/20 = 0.6

Or alternatively, without infinite sums:

P = HH + T*(1-P) + HT*P = 1/4 + 1/2 - P/2 + P/4 = 3/4 - P/4
5P = 3
P = 3/5 = 0.6

Or did I screw up the math somewhere again?
"When two people always agree one of them is unnecessary"
  • Jump to: