An unbiased coin is tossed repeatedly and outcomes are recorded. What is the expected no of toss to get HT ( one head and one tail consecutively) ?
I tried to solve above question using the following probability tree diagram.
Probability in each branch is = $0.5$. I double circled the satisfying toss events. While observing the diagram I noticed that, from 2nd toss onward our required event starts showing up. Additionally,
- in the $\text{2nd}$ toss (or the 3rd level) we have one satisfying case.
- in the $\text{3rd}$ toss (or the 4th level) we have two satisfying case.
- in the $\text{4th}$ toss (or the 5th level) we have three satisfying case.
- in the $\text{5th}$ toss (or the 6th level) we have four satisfying case.
- etc.
i.e. in the $\text{kth}$ toss we would have $(k-1)$ satisfying case. So,
$\\ E = \sum_{k=2}^{\infty } k.P(k)\ \\ E = \sum_{k=2}^{\infty } k.\left \{ (k-1)*(0.5)^k \right \}\\ \\ E = \sum_{k=2}^{\infty } \left \{ (k^2-k)*(0.5)^k \right \}\\$
I understand the series summation would converge because we have the $0.5^{k}$ term which eventually becomes zero.
But could not solve this polynomial and power series summation.
Please suggest how to solve this and or any other method.

We can describe all valid tosses as follows:
From this scheme we can derive the expectation value. We obtain following the same arrangement
\begin{align*} E[X]=\sum_{n=2}^\infty x_n p_n&=2p(HT)+3p(H^2T)+4p(H^3T)+\color{blue}{5p(H^4T)}+\cdots\\ &\qquad+3p(THT)+4p(TH^2T)+\color{blue}{5p(TH^3T)}+6p(TH^4T)+\cdots\\ &\qquad+4p(T^2HT)+\color{blue}{5p(T^2H^2T)}+6p(T^2H^3T)+7p(T^2H^4T)+\cdots\\ &\qquad+\color{blue}{5p(T^3HT)}+6p(T^3H^2T)+7p(T^3H^3T)+8p(T^3H^4T)+\cdots\\ &\qquad+\cdots\\ \end{align*}
We can add up these values along the diagonals. Note, the diagonal marked in blue has $4$ entries
$$\{HHHHT,THHHT,TTHHT,TTTHT\}$$ of length $5$.
Here we use the differential operator $D_x:=\frac{d}{dx}$ and apply it to the geometric series.