A fair coin is tossed repeatedly and independently until two consecutive heads or two consecutive tails appear. Find the PMF, the expected value, and the variance of the number of tosses. Let X be a total number of tosses And it is a problem of geometric distribution.
1)The pmf is clear for me: $ pmf = (1/2)^{k-1}$
The problem is with expected value:
2)My solution: $E[X] = 1/p = 2$
Solution of the book: $E[X] = E[Y] + 1 = 3$
I can't understand the book's solution. How we came to this? I need some explanation. Thanks.