Skip to main content
2 of 7
added 45 characters in body
Iosif Pinelis
  • 127.8k
  • 8
  • 107
  • 229

For any natural $j$, let $I_j$ be the indicator of heads in the $j$th flip. Then the number of times 4 consecutive heads appear in $n$ flips is $$N_H=\sum_{j=1}^{n-3}\prod_{k=0}^3 I_{j+k}.$$ So, $$EN_H=\sum_{j=1}^{n-3}\prod_{k=0}^3 EI_{j+k} =\sum_{j=1}^{n-3}\prod_{k=0}^3\frac1{2j-1+2k}=\frac{4 n^3-18 n^2+23 n-15}{45 (2 n-5) (2 n-3) (2 n-1)}. $$ Similarly, the expected number of times 4 consecutive tails appear in $n$ flips is $$EN_T=\sum_{j=1}^{n-3}E\prod_{k=0}^3 (1-I_{j+k}) \\ =\sum_{j=1}^{n-3}\prod_{k=0}^3 (1-EI_{j+k}) =\sum_{j=1}^{n-3}\prod_{k=0}^3\Big(1-\frac1{2j-1+2k}\Big) =\frac{80 (n-3)}{77}. $$ The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $$\frac{177985559863}{1765899135}\approx100.790\approx100,$$ which makes sense.

Iosif Pinelis
  • 127.8k
  • 8
  • 107
  • 229