1

Suppose I toss a fair coin 10 times. What is the probability that there is a run of at least 4 consecutive heads?

An approach would be to use the Principle of Inclusion-Exclusion on the events $E_i$ where 4 heads occur in positions $i,i+1,i+2,i+3$, where $1\leq i\leq 7$. But this results in a big calculation.

On the other hand, I found the generalization here, but I think for this problem (with small values $10$ and $4$) maybe there is an easier way to compute the desired value. What would be an easier way?

PJ Miller
  • 8,193

1 Answers1

1

I doubt that the values 10,4 are small enough to get a solution by a method substantially different than the general one.

Using a Markov chain (as here) with 5 states $s_0, s_1 \cdots s_4$ corresponding to the maximum length of the run of heads (truncated at 4), I'd compute (Matlab/Octave code) the desired probabilty as:

  M=[ 1 1 0 0 0 ;
      1 0 1 0 0 ;
      1 0 0 1 0 ;
      1 0 0 0 1 ;
      0 0 0 0 2 ] /2 ;

  p=[1 0 0 0 0 ] * M^10 *[0 0 0 0 1]'

p =  0.24512
leonbloy
  • 63,430