2

Question: If I flip a coin $n$ times, what is the maximum number of heads or tails in a row that I should expect?

Eric Naslund
  • 72,099
sam
  • 21
  • 2
  • As for the question of "flipping an infinite number of times," you seem to greatly misunderstand the meaning of infinity. What will be true is that with a fair coin and an "infinite" number of coinflips, that any finite-length sequence of heads/tails will appear in the sequence, such as a billion heads in a row. You cannot get an infinite string of heads however as that would contradict the notion that the coin is fair. See Normal Number. Such a sequence of heads/tails could help us create a binary normal number. – JMoravitz May 07 '15 at 19:20
  • @JMoravitz "grossly" is a bit strong – Gregory Grant May 07 '15 at 19:21
  • @JMoravitz: I cleaned up the question a bit as the part about an infinite number of flips does not seem well phrased. – Eric Naslund May 07 '15 at 19:23

1 Answers1

4

This is not an easy question.

Let $Z_0(n)$ be a random variable denoting the longest sequence of heads in a sequence of $n$ flips. In 1980, Guibas and Odlyzko showed that $$\mathbb{E}(Z_0(n)) = \log_2(n)+\frac{\gamma}{\log 2} -\frac{3}{2} +\rho_0(n)+o(1)$$ where $\gamma$ is the Euler-Mascheroni constant, and $\rho_0(n)$ is an osscilatory function of $\log (n)$ bounded in absolute value by $1.6\cdot10^{-6}$. In particular, this leads to the surprising result that $$\mathbb{E}(Z_0(n))-\log_2(n)$$ does not have a limit. See this paper, An Extreme Value Theory for Long Head Runs, by Gordon, Schilling, Waterman for more details.

Eric Naslund
  • 72,099
  • 1
    Reading the linked article, I am surprised that the variance is as low as it is, being of the form $\frac{\pi^2}{6\log_2(n)}+\frac{1}{12}+\rho_0(n)+o(1)$. Perhaps you can confirm what I'm thinking or missing from reading the article, with a fair coin, the expected longest sequence of heads tends towards the expected longest sequence of just heads or just tails, yes? – JMoravitz May 07 '15 at 19:53
  • How can one prove $\mathbb{E}(Z_0(n)) = \log_2(n)+o(\log_2(n))$ elementarily ? – Gabriel Romon May 07 '15 at 20:04