PDA

View Full Version : How many coin flips to get to nearly exactly 50% of each?


flytrap
03-09-2005, 05:45 AM
I have a theory question for the statistics wizzes out there. This might be easy, I'm not sure. My roomate and I were disagreeing on how many tosses it should take so you have a large enough sample size to be at effectively 50% heads 50% tails. In other words, what would the number be, that you could run a million trials of that number of flips, and be right at almost exactly 50% every trial.

Another issue relating to poker. I'm sure it would take way more hold'em hands than coin flips, because there are over 3700 possible hands(assuming A /images/graemlins/spade.gifk /images/graemlins/spade.gif is different from A /images/graemlins/diamond.gifk /images/graemlins/diamond.gif) How many hold'em hands would it take to get AK nearly exactly as often as you should, assuming you can run the test a million times at that number of trials.

bos
03-09-2005, 06:14 AM
[ QUOTE ]
I have a theory question for the statistics wizzes out there. This might be easy, I'm not sure. My roomate and I were disagreeing on how many tosses it should take so you have a large enough sample size to be at effectively 50% heads 50% tails. In other words, what would the number be, that you could run a million trials of that number of flips, and be right at almost exactly 50% every trial.

[/ QUOTE ]

This depends entirely on your definition of "effectively 50%" and "almost exactly 50%". Is it a 90% chance of being between 49.5% and 50.5%? A 95% chance of being within 0.1%? A 99% chance that 1 million trials will ALL be within 0.01%?

All of these are figurable, but the answers are very different.

flytrap
03-09-2005, 06:18 AM
Sorry I should have been more specific. I'd say for the coin flipping scenerio, a 99% chance of being within .1% of 50% on all trials.

bos
03-09-2005, 08:37 AM
[ QUOTE ]
Sorry I should have been more specific. I'd say for the coin flipping scenerio, a 99% chance of being within .1% of 50% on all trials.

[/ QUOTE ]

You'll need about 6 million flips per trial. You'll have a 99% chance of getting through all million trials of 6M flips without any of them deviating by more than 6k from the expected 3M heads.

BruceZ
03-09-2005, 09:49 AM
[ QUOTE ]
Sorry I should have been more specific. I'd say for the coin flipping scenerio, a 99% chance of being within .1% of 50% on all trials.

[/ QUOTE ]

If you want to do something 1 million times, and have a 99% chance of success EVERY time, then your chance of success each time must be 0.99^(1/1000000) = 0.99999998994966.

Using the normal approximation to the binomial distribution, this requires approximately 5.7*sigma or exactly +/- NORMSINV(0.99999999497483)*sigma, where NORMSINV is an Excel function that gives us the number of standard deviations corresponding to 1 - (1 - 0.99999998994966)/2 = 0.99999999497483 1-sided or 0.99999998994966 2-sided.

NORMSINV(0.99999999497483)*sigma = 0.001*N

sigma = sqrt[N*(0.5 - 0.5^2)] = sqrt(N/4).

NORMSINV(0.99999999497483)*sqrt(N/4) = 0.001*N

N =~ 8,209,306.

So about 8.2 million flips per trial should give you a 99% chance of being within 8200 flips of 4.1 million tails every trial for 1 million trials.

bos
03-09-2005, 07:51 PM
[ QUOTE ]
[ QUOTE ]
Sorry I should have been more specific. I'd say for the coin flipping scenerio, a 99% chance of being within .1% of 50% on all trials.

[/ QUOTE ]

If you want to do something 1 million times, and have a 99% chance of success EVERY time, then your chance of success each time must be 0.99^(1/1000000) = 0.99999998994966.

Using the normal approximation to the binomial distribution, this requires approximately 5.7*sigma or exactly +/- NORMSINV(0.99999999497483)*sigma, where NORMSINV is an Excel function that gives us the number of standard deviations corresponding to 1 - (1 - 0.99999998994966)/2 = 0.99999999497483 1-sided or 0.99999998994966 2-sided.

NORMSINV(0.99999999497483)*sigma = 0.001*N

sigma = sqrt[N*(0.5 - 0.5^2)] = sqrt(N/4).

NORMSINV(0.99999999497483)*sqrt(N/4) = 0.001*N

N =~ 8,209,306.

So about 8.2 million flips per trial should give you a 99% chance of being within 8200 flips of 4.1 million tails every trial for 1 million trials.

[/ QUOTE ]

This is correct. I lost two 9's in the list of 9's (probably by thinking about it as 99.999999%, and only using 0.0000005 as the lookup into the normal table) and ended up with 4.9 sigma and hence the apprx 6M flips.

Talk2BigSteve
03-09-2005, 09:21 PM
I just flipped a Quarter 2 times and got 1 heads and 1 tails for exactly 50% each!!!! So my answer is 2!

Living, Learning, and Laughing.
Big Steve /images/graemlins/cool.gif

AlienCorpse
03-10-2005, 08:04 AM
Well I did it 0 times and got 0 for each so my answer is 0.