# Chance of flipping 50 heads over a span of 100 flips given more than 100 flips

So I found that the chance of flipping 50 heads out of a string of 100 flips is

$$0.5^{50} (1-0.5)^{50} \binom{100}{50},$$

My question is, how do the chances of having at least 1 string of 100 flips, with heads resulting 50 times, change if I am allowed to flip the coin 101 times? In other words, I could get 50 out of 100 in flips 1-100 OR 50 out of 100 in flips 2-101 or both.

What about if I were allowed to flip the coin 200 times, but needed to get at least one string of 100 flips resulting in 50 heads?

My thinking is that there are 101 different 100 flip sequences in a 200 flip sequence, and each of those 101 sequences should have $$0.5^{50} (1-0.5)^{50} \binom{100}{50},$$ probability of yielding heads exactly 50 times, which would multiply the probability by 101 times, but since the 101 different 100 flip sequences are overlapping, rather than being independent of each other, does it change the odds?

• Shouldn´t it be $P(X=50)=0.5^{\color{red}{50}} \cdot (1-0.5)^{\color{red}{50}} \cdot \binom{100}{50}$ ? Nov 30 '16 at 16:53
• Yes. I have edited it. Nov 30 '16 at 16:55
• the dependency does change the odds, and in a significant way. Nov 30 '16 at 16:56
• Yeah, the 101 individual cases are not independent variables. For example, if the first 100 flips has 37 heads, and the last 100 flips has 54 heads, then you know there is sequence of 100 flips with 50 heads. Nov 30 '16 at 17:14
• The chances of picking a stretch of 100 flips at random with 50 heads out of a total sequence of 200 total flips would be $$0.5^{50} (1-0.5)^{50} \binom{100}{50},$$ but if that stretch were negative for a result of 50 heads, then the odds of all of the overlapping stretches of 100 flips would be less. Nov 30 '16 at 17:45

This answer gives a lower bound on the probability, not a complete answer.

Let $n_k$ be the number of heads in flips $k,k+1,\dots,k+99$. Note that $n_{k+1}$ is one of $n_{k}-1,n_{k},$ or $n_{k}+1$. Also, note that $n_{1}$ and $n_{101}$ are independent.

Now, if $n_1< 50$ and $n_{101}> 50$, there is an $n_k=50$, by the above. Similarly for $n_1>50$ and $n_{101}< 50$. So to not have some $n_k=50$, you'd need $n_1>50$ and $n_{101}>50$ or $n_{1}<50$ and $n_{101}<50$. Since $$P(n_1<50)=P(n_1>50)=P(n_{101}<50)=P(n_{101}>50)=\frac{1}{2}\left(1-0.5^{100}\binom{100}{50}\right)$$ this means the probability is at least:

\begin{align}P(n_k=50; k=1,\dots,101)&\geq 1-P(n_1<50)P(n_{101}<50)-P(n_1>50)P(n_{101}>50)\\ &=1-\frac{1}{2}\left(1-0.5^{100}\binom{100}{50}\right)^2\end{align}

This means the probability is at least $\frac{1}{2}$.

It's probably considerably higher.

This trick for the lower bound works only for a multiple of $100$ flips. If there are $100j$ flips, then you'd get that the probability is at least:

$$1-\frac{1}{2^{j-1}}\left(1-0.5^{100}\binom{100}{50}\right)^{j}$$