Detailed explanation of the derivation of the expected number of coin tosses

63 Views Asked by At

In this post, I cannot understand the logic behind the approach nor can I devise an approach myself. Can anyone be so kind so as to give me a detailed explanation as to what is being done?

More specifically, why is the expected number of tosses e appearing on both side?

Doesn't the formula state something like: $e = p_1x_1 + p_2x_2+...$ where $p_1, p_2...$ are probabilities of events $x_1,x_2... $?

1

There are 1 best solutions below

0
On

Let $N$ count the number of tosses until 5 consecutive heads occur. Let $X$ count the number of heads before the first(/next) tail.

The conditional expectation of tosses until 5 consecutive heads occurs when given that $x$ heads and then $1$ tail are tossed must be $x+1$ plus the expectation of tosses until 5 heads are thrown after that. Unless $x\geqslant 5$ in which case the expectation is just $5$.

Then we use the rule of conditional expectation, followed by the definition of expectation. $\begin{align} \mathsf E[N\mid X = x] & = \begin{cases}\mathsf E[N] + x + 1 & 0\leqslant x\leqslant 4 \\ 5 & x\geqslant 5\end{cases} \\[2ex] \mathsf P(X=x) & = \frac 1 {2^{x+1}} \\[2ex] \mathsf E[N] & = \mathsf E[\mathsf E[N\mid X]] \\ & = \sum_{x=0}^{4} \mathsf P(X=x) \mathsf E[N\mid X=x] + \mathsf P(X\geqslant 5)\mathsf E[N\mid X\geqslant 5] \\[2ex] & = \substack{\mathsf P(X=0) \mathsf E[N\mid X=0] + \mathsf P(X=1) \mathsf E[N\mid X=1] + \mathsf P(X=2) \mathsf E[N\mid X=2] \\ + \mathsf P(X=3) \mathsf E[N\mid X=3] + \mathsf P(X=4) \mathsf E[N\mid X=4] + \mathsf P(X\geqslant 5) \mathsf E[N\mid X\geqslant 5] } \\[2ex] & = \frac 1 2 (\mathsf E[N]+1) + \frac 1 {2^2}(\mathsf E[N]+2) + \frac 1 {2^3}(\mathsf E[N]+3) + \frac 1 {2^4}(\mathsf E[N]+4) + \frac 1 {2^5}(\mathsf E[N]+5) + \frac 1 {2^5} 5 \\[3ex] \text{Substitute : } a & = \mathsf E[N] \\[2ex] a & = 2^{-1} (a+1) + 2^{-2}(a+2) + 2^{-3} (a+3) + 2^{-4} (a+4) + 2^{-5}(a+5) + 2^{-5}5 \\[2ex] \therefore a & = 62 \end{align}$