The answer is 10 through this method but I am trying to get 10 using a different method and I am wondering where I am going wrong.
E = 2(average tosses to get first head) + 1/2*(E) (if i get another heads on second toss) + 1/4*(E+2) ( If i get tails on 3rd toss) + 1/4*2( If I get T and H in second and third toss respectively) - I get the answer to be 12.
I did 1/4*2 because the first toss is already accounted by the average of 2 tosses to get a head, so I start the probability calculations from the second toss.
I didn't do 1/2*(E+1) (if I get another heads on second toss) because I thought when u get head on the second toss, that toss would be the leading head and I wouldn't have to add 1 more toss to it? Maybe this assumption was wrong? What did I do wrong?
I have tried this method with 3 consecutive heads, 5 consecutive heads etc and it seems to work. I would like to understand how to make this method work in this scenario. Thank you.
Your method was for a number of cosecutive heads, whereas here it is a mix of heads and tails. So you need to adapt your method to take into the variation. A simple method you could follow, if you don't want to use that in the link, is below It is like your method, but taking into account the twist in the problem.
The difference between HHH and HTH is that in the first case, if you fail at any toss to get to the next stage, you return to the start, whereas in the second case, you start with a H already in your pocket, so to say.
For $HHH,\; Let\; x,y,z,\; be\; E[H], E[HH], E[HHH]$
$x=2, y= x+0.5\times 1 + 0.5(y+1) \Rightarrow y=6$
$z =6 +.5\times1 + .5(z+1) \Rightarrow z = 14$
For $HTH,\; Let\; x,y,z,\; be\; E[H], E[HT], E[HTH]$
$x=2, y= 2 +2 =4$
$z =4 +.5\times1 + .5(z+1) \Rightarrow z = 10$