PDA

View Full Version : Coin Flip Statistics


Some Pig
01-16-2006, 02:33 PM
Let's say you're playing a coin flipping game in which you will win $9 each time you win but lose $11 each time you lose. But because of inside information, you know that you will win 63% of each toss in the long run. Your opponent does not know this. This is obviously a +EV (14%) bet for you.

How many coin flips would you need to be sure that you will be coming out ahead? In other words, what is the "long run" for this particular game?

BruceZ
01-16-2006, 02:50 PM
[ QUOTE ]
Let's say you're playing a coin flipping game in which you will win $9 each time you win but lose $11 each time you lose. But because of inside information, you know that you will win 63% of each toss in the long run. Your opponent does not know this. This is obviously a +EV (14%) bet for you.

How many coin flips would you need to be sure that you will be coming out ahead? In other words, what is the "long run" for this particular game?

[/ QUOTE ]

You can never be "sure" to be ahead, but if you play long enough, you can obtain a probability of being ahead as close to 1 as you want without actually reaching 1. Convert the probability you want into standard deviations s, and then the number of flips is (s*SD/EV)^2. This is the long run for level of confidence s standard deviations. For example, to be 99.9% sure that you are ahead, s =~ 3.09 standard deviations. You can get s from the Excel function =NORMSINV(99.9%), where you insert whatever probability you want.

The EV is 0.63*9 + 0.37*(-11) = $1.60

The SD is sqrt[ 0.63*(9)^2 + 0.37*(11)^2 - (1.60)^2 ] =~ $9.66

So to be 99.9% sure of being ahead, you need (3.09*9.66/1.60)^2 = 348 flips.

This is using a normal distribution to approximate the binomial distribution. See my next post for an exact calculation which gives 361 flips.

Some Pig
01-16-2006, 02:57 PM
Thanks.

Same numbers but this time we want to calculate how many number of coin flips will be needed to be close to the EV, which in this example is 14%?

BruceZ
01-16-2006, 05:22 PM
[ QUOTE ]
Thanks.

Same numbers but this time we want to calculate how many number of coin flips will be needed to be close to the EV, which in this example is 14%?

[/ QUOTE ]

First of all, I did an exact calculation of the first question using the binomial distribution rather than the normal approximation, and you need 361 flips to be better than a 99.9% chance of being ahead. At 348 flips, you have a 99.88% chance of being ahead, which is 3.05 standard deviations instead of 3.09. As a practical matter it doesn't make much difference, but it depends on how you want to do the problem. There is no closed form solution for the exact method; you have to use the Excel BINOMDIST function and trial and error starting with our estimate of 348. Here is the exact method:

Let N be the number of flips, and n be the number of flips that we win. The amount we win is 9*n - 11*(N - n). We want

P(9*n - 11*(N - n) < 0) < 0.1%

P(n < 11*N/20) < 0.1%

Type =Binomdist(11*N/20,N,0.63,true) in Excel where N is a cell reference, and adjust N so that this is less than 0.1%. This occurs at N = 361.

For the second question, it depends on how close you want your EV to be, and to what probability you want it to be that close. Using the normal approximation, since the SD of your winnings for 1 flip is 9.66, the standard deviation of your win rate will be 9.66/sqrt(N), where N is the number of flips. Say you want your win rate to be within 10 cents of your true EV with a probability of 99.9%. This is a 2-sided distribution this time, so if you use the NORMSINV function to get the number of standard deviations, you have to enter =Normsinv(.9995) =~ 3.29 standard deviations. Then we have

9.66*3.29/sqrt(N) = $0.1

N = 101,006 flips.

This is a large number since we are demanding a very high confidence and a very tight range.

To get this by the exact method, our win rate will be [9*n - 11*(N - n)] / N = 20*n/N - 11. Since the true EV is $1.60, we want this to lie between $1.50 and $1.70.

P(1.5 < 20n/N - 11 < 1.7) > 99.9%

P(12.5*N/20 < n < 12.7*N/20) > 99.9%

P(n < 12.7*N/20) - P(n < 12.5*N/20) > 99.9%

=Binomdist(12.7*N/20,N,0.63,true) - Binomdist(12.5*N/20,N,0.63,true) > 99.9%

I'll let you do the trial and error on this one if you need an exact answer. My old version of Excel chokes on the big numbers in this example. N should be close to 101,000. I know this equation is right because when I put in N = 1000, it gives a probability of 25.66%, which is 0.327 standard deviations. This agrees with the normal approximation 9.66*0.327/sqrt(1000) = $0.1

Some Pig
01-16-2006, 07:56 PM
Bruce Z:

Is there a way to find out, given all the info available in this thread, the worst case scenario losing streaks for heads or tails in this scenario? Assuming the +EV side is heads. And how many times would this losing streak scenario occur every 1,000 flips, or 10,000 flips, or 100,000 flips?

ThinkQuick
01-17-2006, 02:30 AM
Do you intend to put any work into understanding these answers yourself?

BruceZ
01-17-2006, 03:22 AM
[ QUOTE ]
Bruce Z:

Is there a way to find out, given all the info available in this thread, the worst case scenario losing streaks for heads or tails in this scenario? Assuming the +EV side is heads. And how many times would this losing streak scenario occur every 1,000 flips, or 10,000 flips, or 100,000 flips?

[/ QUOTE ]

I'm not sure what you're asking. There is no "worst case" for the number of losses in a row. They just become more unlikely as they get longer. If tails has probability 0.37, then the probability of getting N tails in a row starting from a certain flip is (0.37)^N. The average number losing streaks of length N or greater in M flips is:

E(streaks >=N in M flips) = [0.63*(M - N) + 1]*(0.37)^N

Derivation:

Since the probability of a streak of N losses starting on any given flip is (.37)^N, the sum of these probabilities over the flips where such a streak can start in M flips is (M - N + 1)*(0.37)^N. This would give the average number except that each streak of length N + k is counted exactly k + 1 times. Now form this sum of probabilities for streaks of at least N+1 losses, which gives (M - N)*(0.37)^(N+1). Note that this will count each streak of length N + k exactly k times. So the difference between these terms will count each streak of length N or more exactly once!

E(streaks >=N in M flips) = (M - N + 1)*(0.37)^N - (M - N)*(0.37)^(N+1)

= (M - N)*(1 - 0.37)*(0.37)^N + (0.37)^N

= [0.63*(M - N) + 1]*(0.37)^N

I derived a more elegant result by the same method for the average number of success runs which merely have to start within M trials, but not necessarily end within M trials. Then, if p is the probability of success, and q is the probability of failure, the average number of success runs of length N or greater which start in a block of M trials is M*q*p^N.

Some Pig
01-17-2006, 12:55 PM
Thanks Bruce. I'm sure you figured out very early on that I'm really talking about a heads up SNG where the rake is 10% and the ITM is 63% thus producing an expectation of 14%.

AceFace
01-17-2006, 06:18 PM
Who, some pig ?

rofl :-P