2

Start with one coin, flip all coins, if all land on tails then stop, otherwise add another coin and repeat.

What is the mean average number of flips?

This is not a homework question.

SBF
  • 36,568
alan2here
  • 1,037

1 Answers1

6

The probability of never stopping is

$$ \prod_{k=1}^\infty\left(1-2^{-k}\right)\approx0.288788\; $$

(see Probability that a random binary matrix is invertible?, Probability that a sequence repeats itself and Evaluation of Euler's q-function).

Since this is non-zero, the average number of flips is infinite.

joriki
  • 242,601
  • These links welcomes upvoting other (nice) answers of yours :) – SBF Jan 11 '13 at 14:15
  • How is it possible to never stop, given that at on any round there is a positive chance of stopping? – alan2here Jan 11 '13 at 14:22
  • @alan2here: this chance is very small, $2^{-k}$ whenever you have $k$ coins. Just as an example, would this chance be not that small, say $\frac1k$, then the infinite product $\prod_k (1-\frac1k) =0$, but it's not the case. – SBF Jan 11 '13 at 14:26
  • @alan2here: If you're finding it difficult to get an intuition for infinite products $\prod_ka_k$, note that you can rewrite them as $\exp\left(\sum_k\log a_k\right)$, and presumably you're familiar with the fact that $\sum_k\log a_k$ need not diverge to negative infinity. – joriki Jan 11 '13 at 16:20
  • Sorry, I'm not great at those sorts of notations. I'm aproaching this purely algorytmicly and know only the basics of numeric infinite series, there sums, that they can converge and diverge and the such. It feels as if it gets to a point where it never stops, at least in affect, but which is in conflict to the way that in no round can there be no chance of a stop. I can accept that mathamaticly it is the case. – alan2here Jan 11 '13 at 19:00
  • The idea came when thinking about random numbers and how they would normally be generated inside a range, or otherwise at least be shaped in some way, for example less likely the larger the value. – alan2here Jan 11 '13 at 21:30
  • @alan2here: All you need to understand infinite products is the basics of series (that they can converge and diverge and such) plus logarithms. Multiplying up an infinite number of factors is equivalent to adding up their logarithms; then you just have to exponeniate the result to get the limit of the infinite product. If the series of the logarithms converges, so does the infinite product. If the series of the logarithms diverges to negative infinity, the infinite product converges to zero. If the series of the logarithms diverges to positive infinity, so does the infinite product. – joriki Jan 11 '13 at 23:33