A and B each put 10 coins in the
pot. A then takes a coin from the pot
and tosses it, while B calls heads or
tails. If B’s call is correct, he takes
the coin and keeps it; otherwise, A
keeps the coin. B then takes a coin
from the remaining pot and tosses it
while A calls heads or tails.
The play
continues in this way until one player
has accumulated 10 coins, whereupon
he wins the game and takes all the
coins remaining in the pot. At one
point in the play, A has six coins,
while B has only four. What is A’s
probability of winning?
When the
situation occurs in a game such that
one player has won six coins while
his opponent has won four coins,
what is the expected value of the
winnings (net number of coins) of the
player with six coins?
wlog, the starting condition is:
(A,B,P) = (6,4,10), where P is the pot.
If A ultimately wins, he can do so in as few as 4 flips or as many as 9 flips. If there are 10 more flips, and A has not won, it means B has won.
But in calculating the number of ways A can win in n more flips, keep in mind that the final flip must be a correct call for A. So, for example, if A wins in 6 more flips getting 4 more correct calls, the number of ways is not comb(6,4) but rather comb(5,3)
n p(A wins)
4 (1/2)^4 * comb(3,3)
5 (1/2)^5 * comb(4,3)
6 (1/2)^6 * comb(5,3)
7 (1/2)^7 * comb(6,3)
8 (1/2)^8 * comb(7,3)
9 (1/2)^9 * comb(8,3)
The sum of the above probabilities is the probability that A wins, given the 6 vs 4 advantage.
n winnings
4 10 + 6
5 10 + 5
6 10 + 4
7 10 + 3
8 10 + 2
9 10 + 1
... the winnings is always 20-n
Probability A wins 0.74609375
The requested expected value of A's winnings is:
9.9375
If we are looking at a conditional probability where we are assuming that A wins, then the expected winnings given that A wins is
13.319371727748692
-------------
prob_A_wins = 0
expected_winnings = 0
for flips in range(4,10):
this_prob = (1/2)**flips * combin(flips-1,4-1)
prob_A_wins += this_prob
expected_winnings += this_prob * (20-flips)
exp_winnings_Awins = expected_winnings / prob_A_wins
print('Probability A wins', prob_A_wins, '
')
print('The requested expected value of A's winnings is:
', expected_winnings)
print()
print('If we are looking at a conditional probability where we are assuming that A wins, then the expected winnings given that A wins is
', exp_winnings_Awins)
Edited on January 13, 2025, 9:07 am
|
Posted by Larry
on 2025-01-13 09:06:50 |