All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
What is the Expected Value? (Posted on 2025-01-13) Difficulty: 3 of 5
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?

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Monte Carlo Comment 3 of 3 |
A Monte Carlo sim with 10^7 reps finds:

A prob of winning: 0.7458705
Expected winnings without pot: 7.458705
Expected winnings including pot: 9.9343274

------
#  Monte Carlo
import random
A_wins = 0
B_wins = 0
A_winnings = 0
A_winnings_plus_pot = 0
reps = 10000000
for iter in range(reps):
    A = 6
    B = 4
    over = False
    while not over:
        if random.random() > .5:
            A += 1
        else:
            B += 1
        if A >= 10:
            A_wins += 1
            A_winnings += A
            A_winnings_plus_pot += 20 - B 
            over = True
        if B >= 10:
            B_wins += 1
            over = True

print('A prob of winning:', A_wins / (A_wins + B_wins))
print('Expected winnings without pot:', A_winnings / reps)
print('Expected winnings including pot:', A_winnings_plus_pot / reps)
        

  Posted by Larry on 2025-01-13 09:42:59
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (3)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information