1

I just cant figure this out.. Should I be using binomial distribution? Chance of getting ten tail long series in 100 coin throws

Troulle
  • 13
  • Yes, you should use a binomial distribution. A chain of 100 throws is 91 overlapping sequences of 10 throws. – Doug M Jun 14 '16 at 20:44
  • @ Doug M How did you get 91 ? – Troulle Jun 14 '16 at 20:59
  • DougM's comment is misleading in my opinion. (He had also suggested the probability be calculated as $(1-(1-2^{-10})^{91}$ in a comment on a deleted answer. This is incorrect as the events are not independent). My initial reaction is to use inclusion-exclusion, but the result will be incredibly messy. He arrived at the number $91$ as it could start at flip $1$, start at flip $2$, ..., or start at flip $91$. – JMoravitz Jun 14 '16 at 21:03
  • 1
    Because links in comments: http://gregegan.customer.netspace.net.au/QUARANTINE/Runs/Runs.html – Clement C. Jun 14 '16 at 21:08

2 Answers2

3

At the moment I cannot see a neat way of doing this. So here is an inelegant way. Let $a_n$ be the number of binary sequences length $n$ with at least one run of ten 1s. Consider a sequence length $n+1$. It must begin in one of the following ways: 0,10,110,1110,11110,111110,1111110,11111110,111111110,1111111110 or 1111111111 (to save you counting the last is ten 1s). The number of sequences containing at least one run of ten 1s is $a_n,a_{n-1},\dots,a_{n-9},2^{n-9}$ respectively. That and $a_0=\dots=a_9=0$ gives us a recurrence relation.

We can ask a computer to solve it and give us the answers for sequences length 10-100:

RecurrenceTable[{a[n + 1] == a[n] + a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4] + a[n - 5] + a[n - 6] + a[n - 7] + a[n - 8] + a[n - 9] + 2^(n - 9), a[0] == 0, a[1] == 0, a[2] == 0, a[3] == 0, a[4] == 0, a[5] == 0, a[6] == 0, a[7] == 0, a[8] == 0, a[9] == 0}, a, {n, 10, 100}]

And it obliges by returning: 1,3,8,..., 55 950 584 378 441 149 993 810 452 680

We now compare this with the total number of sequences length 100 which is $2^{100}$ to get as the chance of getting a run of 10 heads: 0.0441372 or $4.4\%$.

almagest
  • 18,380
  • Not elegant perhaps, but you could put $p=1/2$, $n=100$, and $m=10$ in my answer here: http://math.stackexchange.com/questions/59738/probability-for-the-length-of-the-longest-run-in-n-bernoulli-trials/59749#59749 –  Jun 14 '16 at 21:07
  • @ByronSchmuland I feel rather stupid now, I see it is at the top of the list of linked problems on the right!. Grrrr! – almagest Jun 14 '16 at 21:11
  • @ByronSchmuland But I have just done as you suggested and got the same answer! – almagest Jun 14 '16 at 21:17
  • No worries! I like your approach and voted your answer up. The link to my answer didn't appear until I made my comment, so you couldn't have known in advance. –  Jun 14 '16 at 21:19
  • I must admit your formula is impressive. I must have a more careful look at it. :) – almagest Jun 14 '16 at 21:20
1

The probability of getting a 10 heads in 10 throws = $\frac{1}{2^{10}}$ The expected number of ten head sequence in N throws = $(N-9) * \frac{1}{2^{10}}$

A chain of 11 heads is two 10-head sequences.

To calculate the probability of getting one 10-head sequence in 100 throws, we must remove the 11+ head sequences that we are counting too many times.

$\frac{91}{2^{10}} - \frac{90}{2^{11}}$

Doug M
  • 57,877
  • This is obviously an approximation, but not a bad one: it gives a prob of 0.0449219 compared with the true value of 0.0441372, so too high by a factor 1.0178. – almagest Jun 15 '16 at 05:34
  • Right, it is the expected number of chains of 10+ heads. So, it is double counting the possibility that there are two or more in 100 flips. – Doug M Jun 15 '16 at 07:59
  • +1 Yes, and far easier to calculate than the exact number! – almagest Jun 15 '16 at 08:07