# Probability of exact match of peak of expected distribution for 1000 fair coin flips.

In random events such a fair coin tosses, it is easy to predict over a long run of trials (flips) how many heads and how many tails should come up. However, very rarely does that number match the expected # exactly. For example, if you flip a fair coin $1000$ times you would expect about $500$ heads and about $500$ tails but you would be much more likely not to get exactly $500$ of either. So my question is what is the probability of getting exactly $500$ heads and $500$ tails out of $1000$ fair coin flips? It happens sometimes but not often so there should be a probability of it happening. If it is not the most probable outcome, then what is? $499$ + $501$, $498$ + $502$...?

I guess another way of asking this question is what % of the area under the bell curve for the graph of the possible outcomes for 1000 fair coin flips is exactly 500 heads? Is it something like a 5% chance for example?

Another example (for reference only) is random digits like in pi. If you take say $1$ million digits after the decimal point, you would expect $100,000$ of each of the digits $0$ thru $9$ but none of them in reality have exactly $100,000$ (although digit $8$ is very close with $99,985$ occurrences). It also seems that the larger the # of trials (coinflips or digits of pi for example), the harder it is to match the normal distribution exactly.

• What do you understand by "expected normal distribution"? – Henry Oct 2 '14 at 18:34
• I don't know if that is the right term but I mean the amount that probability would tell us should happen. For example with coin flips, they say 50% heads and 50% tails but for 1000 flips you rarely see 500 of each so if my question/title is not clear, how can I word it better? – David Oct 2 '14 at 18:35
• @David First example: You can approximate the binomial distribution by the normal distribution. The greater the sample size is, the better is the appoximation. See here:en.wikipedia.org/wiki/De_Moivre%E2%80%93Laplace_theorem – callculus Oct 2 '14 at 18:48
• To also address the particular case you asked, the number $X$ of heads has a binomial distribution with parameters $n=1000$ and success probability $p=1/2$, so that $$P(X=500)={1000\choose500}(1/2)^{1000}\approx 0.02522502.$$ – binkyhorse Oct 2 '14 at 18:52
• Well that explains why it is so rare. About 2.5%. – David Oct 2 '14 at 18:57

## 2 Answers

If you are considering a small enough number $N$ of flips, you can compute the probability directly of getting $H$ heads out of $N$ flips using the binomial distribution. In general, if the probability of getting heads for one flip is $p$ then the mostly likely number of heads will be either the integer above or below $Np$.

If you don't want to calculate with the binomial distribution exactly, and instead want to use a normal distribution, then still the most likely value will be $Np$ and so if you use the value of the normal distrubtion density at that value $Np$ rounded up or down to the nearest integer and multiply the density by 1, i.e. leave it unchanged (because #heads are in increments of 1), you will get a good estimate for the probability of getting $Np$ heads either rounded up or rounded down to the nearest integer. All other numbers of heads that are more than 1 away from $Np$ will have lower probability. However it will be very unlikely that you get exactly $Np$ heads rounded up or rounded down if $Np$ is large. If you want a confidence interval (i.e. I'm $95\%$ sure the number of heads will be within $K$ of $Np$) then you can use the standard deviation of the normal distribution approximation and just take plus or minus 2 or 3 standard deviations. You can look up the normal distribution to figure out the exact width of the confidence interval and the confidence amount when you take plus or minus 2 standard deviations or 3 standard deviations.

• I am not interested in standard deviations and such but rather what is the chance of getting exactly 500 heads and 500 tails in this example. It has to be some number like 1%, 2%, 3%... so how is it computed exactly? – David Oct 2 '14 at 18:54

This problem was addressed by James D. Forbes in 1850, citing earlier work by Galloway: J.D. Forbes. “On the alleged Evidence for a Physical Connexion between Stars forming Binary or Multiple Groups, deduced from the doctrine of chances” Phil. Mag., 3rd series, 37 (1850), 401-27.

The crucial bit is in a note on page 419.