Skip to main content
added 16 characters in body
Source Link
Iosif Pinelis
  • 127.8k
  • 8
  • 107
  • 229

Suppose $n\ge4$. 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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}+2 H_{n-4}-4 H_{2 n-7}, $$ where $H_p$ is the $p$th harmonic number. The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $$2346708582182272408275807403879906977180754393543457162802747798939487\ 45206696917816972687/\ 2635106162757236442495826303084698495565581115509040892412867358728390\ 766099042109898375\approx89.0556\approx100,$$$${\scriptsize\frac{234670858218227240827580740387990697718075439354345716280274779893948745206696917816972687}{ 2635106162757236442495826303084698495565581115509040892412867358728390 766099042109898375}}\approx89.0556\approx100,$$ which makes sense.

Suppose $n\ge4$. 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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}+2 H_{n-4}-4 H_{2 n-7}, $$ where $H_p$ is the $p$th harmonic number. The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $$2346708582182272408275807403879906977180754393543457162802747798939487\ 45206696917816972687/\ 2635106162757236442495826303084698495565581115509040892412867358728390\ 766099042109898375\approx89.0556\approx100,$$ which makes sense.

Suppose $n\ge4$. 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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}+2 H_{n-4}-4 H_{2 n-7}, $$ where $H_p$ is the $p$th harmonic number. The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $${\scriptsize\frac{234670858218227240827580740387990697718075439354345716280274779893948745206696917816972687}{ 2635106162757236442495826303084698495565581115509040892412867358728390 766099042109898375}}\approx89.0556\approx100,$$ which makes sense.

added 188 characters in body
Source Link
Iosif Pinelis
  • 127.8k
  • 8
  • 107
  • 229

SupooseSuppose $n\ge4$. 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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}+2 H_{n-4}-4 H_{2 n-7}, $$ where $H_p$ is the $p$th harmonic number. The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $$\approx89.0556\approx100,$$$$2346708582182272408275807403879906977180754393543457162802747798939487\ 45206696917816972687/\ 2635106162757236442495826303084698495565581115509040892412867358728390\ 766099042109898375\approx89.0556\approx100,$$ which makes sense.

Supoose $n\ge4$. 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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}+2 H_{n-4}-4 H_{2 n-7}, $$ where $H_p$ is the $p$th harmonic number. The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $$\approx89.0556\approx100,$$ which makes sense.

Suppose $n\ge4$. 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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}+2 H_{n-4}-4 H_{2 n-7}, $$ where $H_p$ is the $p$th harmonic number. The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $$2346708582182272408275807403879906977180754393543457162802747798939487\ 45206696917816972687/\ 2635106162757236442495826303084698495565581115509040892412867358728390\ 766099042109898375\approx89.0556\approx100,$$ which makes sense.

added 1 character in body
Source Link
Iosif Pinelis
  • 127.8k
  • 8
  • 107
  • 229

Supoose $n\ge4$. 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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}-2 H_{n-7/2}-4 \ln 2, $$$$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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}+2 H_{n-4}-4 H_{2 n-7}, $$ where $H_p$ is the $p$th harmonic number. The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $$\approx89.0556\approx100,$$ which makes sense.

Supoose $n\ge4$. 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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}-2 H_{n-7/2}-4 \ln 2, $$ where $H_p$ is the $p$th harmonic number. The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $$\approx89.0556\approx100,$$ which makes sense.

Supoose $n\ge4$. 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{4 (n-3) \left(n \left(6 n^2+4 n-39\right)+23\right)}{3 (2 n-5) (2n-3) (2 n-1)}+2 H_{n-4}-4 H_{2 n-7}, $$ where $H_p$ is the $p$th harmonic number. The expected number of points you would get is $EN_H+EN_T$ for $n=100$, which is $$\approx89.0556\approx100,$$ which makes sense.

added 1 character in body
Source Link
Iosif Pinelis
  • 127.8k
  • 8
  • 107
  • 229
Loading
added 114 characters in body
Source Link
Iosif Pinelis
  • 127.8k
  • 8
  • 107
  • 229
Loading
added 45 characters in body
Source Link
Iosif Pinelis
  • 127.8k
  • 8
  • 107
  • 229
Loading
Source Link
Iosif Pinelis
  • 127.8k
  • 8
  • 107
  • 229
Loading