1

This problem has stumped me for a while now, I've tried a couple of methods but haven't been able to figure it out.

Referencing this post, I tried plugging in n = 100, p = 1/2, and m = 6 to the formula provided in the answer, and I ended up getting 0.54609 as my probability. My teacher says the answer should be around to 0.806, so I'm wondering if there is another method that I may be missing?

2 Answers2

1

What happens if a trail of heads fails? We restart with count of 1 tail instead (and vice versa).

Since we get the first for free we can then consider the problem of getting 5 in a row.

$${\bf M}=\frac12 \left[\begin{array}{cccccc}1&1&0&0&0&0\\1&0&1&0&0&0\\1&0&0&1&0&0\\1&0&0&0&1&0\\1&0&0&0&0&1\\0&0&0&0&0&2\end{array}\right]^T$$

The starting state is the first one so our vector is ${\bf v}=[1,0,0,0,0,0]^T$

What we want to calculate is

$$[0,0,0,0,0,1]{\bf M}^{(100-1)}{\bf v} \approx 0.8068205\cdots$$

The $-1$ in the exponent is because we get one heads (or tails) for "free".

mathreadler
  • 25,824
  • the complication here is in the statement " ..head or tails.." which are not independent. – G Cab Apr 14 '18 at 00:13
  • @GCab No, there is no complication. The first flip will be any of those, and we need to follow with 5 others of the same to fulfill 6 in a row, if we fail before that, then we start with 1 of the other regardless of what the first one was. The problem is symmetric in the sense that tails or heads behaves the same. – mathreadler Apr 14 '18 at 00:21
  • yes, you are right(+1) .. sorry for not catching it before ! just another question, does the matrix diagonalize ? – G Cab Apr 14 '18 at 00:26
  • It seems to diagonalize, but complex eigenvectors and eigenvalues. The eigenvector corresponding to $\lambda=1$ is the constant vector and all other eigenvectors have last element $=0$. – mathreadler Apr 14 '18 at 00:30
0

The post you're linking to answers the probability of getting at least 6 heads in a row somewhere in your 100 throws. The number you want should also include the probability of getting 6 tails in a row.

A quick and dirty way to estimate that would be to pretend that having a run of 6 heads is independent of having a run of 6 tails. Then we'd expect an answer of $$ 0.54609 + (1-0.54906)0.54906 = 0.79396 $$ The true answer must be slightly more than that, intuitively, because once we know there's a run of 6 heads, there's less room among the 100 throws to have a run of 6 tails too, so the fraction of 6-heads sequences that is also 6-tails sequences is slightly smaller than $0.54906$ -- and conversely the fraction of no-6-heads sequences that are 6-tails sequences must be slightly larger.

The easiest way to do the precise analysis, given that you've already found a nice (but scarily complex) formula would be:

Instead of throwing $100$ times "heads" or "tails", throw $99$ times "same" or "different". You're then looking for a run of $5$ or more "same", and for that you can use the formula you've found.