PDA

View Full Version : "Coin-flipping" situation

gazarsgo
04-20-2005, 07:51 PM
What kind of EV are you looking at in a situation like this:
You are an 80% favorite every round.
You must pay \$5 to play.
Whether you win or lose, you get \$1. If you lose, you have to pay another \$5 to continue playing.

Is this +EV, -EV, or breakeven? If it is profitable, what size bankroll do you need to avoid going broke with 95%, 99%, and 99.9% confidence?

Intuitively, this seems like it should be a breakeven proposition, but I can't quite wrap my head around it...

mannika
04-20-2005, 08:09 PM
It's breakeven. 80% of the time you win \$1, 20% of the time you lose \$4.

Popinjay
04-20-2005, 08:10 PM
1 * .8 = .8 EV
-4 * .2 = -.8 EV

Total EV of one flip in this game = 0

However because you have to pay \$5 to start playing it is a -EV game.

gazarsgo
04-20-2005, 09:12 PM
[ QUOTE ]
However because you have to pay \$5 to start playing it is a -EV game.

[/ QUOTE ]

I guess I did not explain this clearly. It does not matter if you win or lose, you are getting \$1 for playing a round. You cannot play another round if you lose without spending another \$5.

gazarsgo
04-20-2005, 09:19 PM
[ QUOTE ]
It's breakeven. 80% of the time you win \$1, 20% of the time you lose \$4.

[/ QUOTE ]

Can you explain your logic? Am I just overthinking this?
100% of the time you win at least \$1 (net -\$4).
80% of the time you win \$2 (net -\$3), by winning the first round.
Winning twice is .8 * .8 = 64% of the time, which you win at least \$3 and net -\$2.
Winning three times is .8^3 = 51.2% of the time, in which you win at least \$4 and net -\$1
winning four times is .8^4 = 40.96% of the time, in which you win at least \$5 and breakeven.
winning five times is .8^5 = 32.768% of the time, where you profit.

Right?
I know you profit 1/3rd of the time...but do you lose more often than you break even?

mannika
04-20-2005, 10:10 PM
[ QUOTE ]
However because you have to pay \$5 to start playing it is a -EV game.

[/ QUOTE ]

This is what I thought at first, but this is not correct, because you can choose to stop playing when you lose for the first time, thereby negating the fact that you have to pony up \$5 to begin with.

mannika
04-20-2005, 10:13 PM
[ QUOTE ]
[ QUOTE ]
It's breakeven. 80% of the time you win \$1, 20% of the time you lose \$4.

[/ QUOTE ]

Can you explain your logic? Am I just overthinking this?
100% of the time you win at least \$1 (net -\$4).
80% of the time you win \$2 (net -\$3), by winning the first round.
Winning twice is .8 * .8 = 64% of the time, which you win at least \$3 and net -\$2.
Winning three times is .8^3 = 51.2% of the time, in which you win at least \$4 and net -\$1
winning four times is .8^4 = 40.96% of the time, in which you win at least \$5 and breakeven.
winning five times is .8^5 = 32.768% of the time, where you profit.

Right?
I know you profit 1/3rd of the time...but do you lose more often than you break even?

[/ QUOTE ]
Sure, you may profit only 1/3rd of the time, but you stand to gain more when you profit than when you lose. If you take the summation of (0.8 + 0.8^2 + 0.8^3 ... + 0.8^n), you come out with:

(0.8 - 0.8^infinity)/(1-0.8)
= (0.8/0.2) = 4

Therefore, the mean amount you get for winning is \$4, and you still get your dollar the last time you lose, so \$4+\$1 = \$5, therefore breakeven.

Hojglad
04-21-2005, 07:00 AM
[ QUOTE ]
[ QUOTE ]
However because you have to pay \$5 to start playing it is a -EV game.

[/ QUOTE ]

This is what I thought at first, but this is not correct, because you can choose to stop playing when you lose for the first time, thereby negating the fact that you have to pony up \$5 to begin with.

[/ QUOTE ]

This game definitely carries a negative expectation. There is no way you can play it so that you end up a winner. The fact that you have to pay 5 dollars up front to play it shows you this.

P(win 5 in a row to recoup your loss) = 0.32768
P(lose any of the first 5) = 0.67232

Keep in mind that in order to break even, you HAVE to win at least 5 in a row. I wrote some code to simulate playing this game 100 million times and the net result was that, starting with a bankroll of 1 billion dollars, you'd end up losing about 20 million.

Come on, the probability that you lose one of the first 5 times is almost twice that you win the first 5 times in a row to recoup your starting fee. Combine that with an empirical test that shows you lose money playing this game in the long run, and there is no way that this game carries a positive expectation.

Hojglad
04-21-2005, 08:04 AM
Nevermind, I completely forgot about the stipulation that you win a dollar whether or you win or lose. This game still has a negative expectation, however.

EDIT: When I added the new stipulation into my code and simulated 1 billion trials, the player wound up about 25,000 dollars behind.

mannika
04-21-2005, 09:06 AM
[ QUOTE ]
Nevermind, I completely forgot about the stipulation that you win a dollar whether or you win or lose. This game still has a negative expectation, however.

EDIT: When I added the new stipulation into my code and simulated 1 billion trials, the player wound up about 25,000 dollars behind.

[/ QUOTE ]

I have no idea how you're getting this number, when I run my simulation I only get a -EV sample mean of \$5, and that's only because the simulation tells them to play the game up to a certain number of plays, not to play the game until they lose for the last time (if this was the case, EV would be \$0).

How many times are you running this simulation, and what is the standard deviation of the sample mean? If you are running it a billion times, the standard deviation of the final amount won is likely very high, and may account for the \$25000 loss you are seeing.

jason1990
04-21-2005, 09:22 AM
Let X_n be 1 if you win the n-th coin flip and 0 if you lose. The monetary result of the first round is that you lose \$4. The monetary result of the second round is that you lose \$4 if X_1=0 and you win \$1 if X_1=1; that is, you win 5X_1-4. In general, your net profit on the n-th round (for n&gt;1) is 5X_{n-1}-4. So your overall net profit after n rounds is

-4 + sum_{j=0}^{n-1} (5X_n - 4).

Since E[5X_n-4]=0, your EV after n rounds is -4. Notice that this is different from a typical -EV game. In a typical -EV game, you have an EV of -c per round, so that your EV after n rounds is -nc. This is not the case here. Here, the magnitude of your negative EV does not increase.

On the other hand, only a fool would quit playing after he just won a coin flip. So suppose you decide to play n rounds. After the n-th round, you will have an EV of -4, but you will continue playing until the first loss, thereby winning some additional nonnegative amount of money. Your expected extra winnings are just the expected length of the next string of wins:

0(.2) + 1(.8)(.2) + 2(.8)^2(.2) + 3(.8)^3(.2) + ...
= .2 sum_{j=1}^infty j(.8)^j
= 4.

So as long as you don't quit while you're winning (and thereby give up the free money that is coming your way), your EV here will be 0.

Hojglad
04-21-2005, 07:00 PM
[ QUOTE ]
[ QUOTE ]
Nevermind, I completely forgot about the stipulation that you win a dollar whether or you win or lose. This game still has a negative expectation, however.

EDIT: When I added the new stipulation into my code and simulated 1 billion trials, the player wound up about 25,000 dollars behind.

[/ QUOTE ]

I have no idea how you're getting this number, when I run my simulation I only get a -EV sample mean of \$5, and that's only because the simulation tells them to play the game up to a certain number of plays, not to play the game until they lose for the last time (if this was the case, EV would be \$0).

How many times are you running this simulation, and what is the standard deviation of the sample mean? If you are running it a billion times, the standard deviation of the final amount won is likely very high, and may account for the \$25000 loss you are seeing.

[/ QUOTE ]

My simulation consists of the following:
1) a player is gifted 1 billion dollars to start with as a bankroll

2) he then pays 5 dollars to play this game

3) he then proceeds to play the game for 1 billion coin flips, each game has two following outcomes:
A: he wins and plays again (+1)
B: he loses and plays again (-4)

I simulate the "coinflip" in this case by using Java's built in Random class for a random number generator. I have it generate integers in the range 0-99 and give the player credit for a win on anything above a 19.

After the simulation finishes, the player is always down. The number ranges from about 25,000 to 50,000. It takes quite a while to run, but I was thinking about letting it go about 200 or so times, collecting all the data and computing the mean loss for the game (note that the player has never turned a profit).

It seems to me that the player will always lose 5 dollars when playing this game because of his initial investment. Others have pointed out the correct expectation of every run-through of the game (0). I'm very surprised to see the player turn such a significant loss over so many trials.

I will post my code for you to run if you are interested.

PairTheBoard
04-21-2005, 09:05 PM
Suppose the game was just a one shot at a time deal. No fee to play. Just 80% of the time you win \$1 and 20% of the time you lose \$4. That's clearly a 0 EV game. Now suppose you decide to play that 0 EV game repeatedly until you lose. It's still a 0 EV game isn't it? You don't change the 0 EV by using the strategy "play repeatedly until you lose". Yet the "play repeatedly till you lose" strategy turns the game into Exactly the original one described by gazar. Therefore the game described by gazar is 0 EV.

On the simulation. The standard deviation for the number of successes in 1 billion trials weighted 80-20 is about 12,000. A shortfall of 12,000 successes translates to a loss of \$60,000. So results plus or minus \$60,000 are within 1 sd of the mean. If 200 such billion trials are run and all show losses I would suspect a bug in the program.

PairTheBoard